pub struct LineItem {
    pub shipdate: DerefMem<i32>,
    pub discount: DerefMem<i32>,
    pub quantity: DerefMem<i32>,
    pub extendedprice: DerefMem<i32>,
}
Expand description

A columnar LineItem table for Query 6.

The table contains only those attributes used in Query 6.

The number of rows in LineItem is specified based on the Orders table. For each row in orders, there are between [1, 7] rows in LineItem. To avoid generating a Orders table, the length of LineItem is calculated based on the Central Limit Theorem. The CLM says that the sum of N variables has a normal distribution with mean = 4 * N and variance = 3, because a uniform distribution between [1, 7] has mean = 4 and variance = 3. N is specified as scale_factor * 1’500’000.

Fields

shipdate: DerefMem<i32>

l_shipdate

The date is encoded as the number of days starting from 1992-01-01.

The shipdate is based on o_orderdate. o_orderdate is sampled from dates between 1992-01-01 and 1998-12-31, minus 151 days. This range includes 2557-151 = 2406 days, whereby 1992 and 1996 are leap years. The shipdate then includes a random number of days between [0, 121] added onto the orderdate.

Overall, to sample a shipdate, the orderdate is uniformly sampled from [0, 2406] and the a uniformly sampled value between [0, 121] is added on top.

discount: DerefMem<i32>

l_discount

The discount is specified as a fixed-point decimal value between [0.00, 0.10]. It is encoded as percent, i.e., times 100.

quantity: DerefMem<i32>

l_quantity

The quantity is specified as a random integer value between [1, 50].

extendedprice: DerefMem<i32>

l_extendedprice

The exact value of extendedprice has no impact on measuring Query 6. Thus, it is sampled as a random integer between [1, MAX_INT].

Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.