1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
use crate;
use crate::;
use ;
use ;
use ;
use ;
/// Generate [`PartSupp`]s in [`RecordBatch`] format
///
/// [`PartSupp`]: tpchgen::generators::PartSupp
///
/// # Example
/// ```
/// # use tpchgen::generators::{PartSuppGenerator};
/// # use tpchgen_arrow::PartSuppArrow;
///
/// // Create a SF=1.0 generator and wrap it in an Arrow generator
/// let generator = PartSuppGenerator::new(1.0, 1, 1);
/// let mut arrow_generator = PartSuppArrow::new(generator)
/// .with_batch_size(10);
/// // Read the first 10 batches
/// let batch = arrow_generator.next().unwrap();
/// // compare the output by pretty printing it
/// let formatted_batches = arrow::util::pretty::pretty_format_batches(&[batch])
/// .unwrap()
/// .to_string();
/// let lines = formatted_batches.lines().collect::<Vec<_>>();
/// assert_eq!(lines, vec![
/// "+------------+------------+-------------+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+",
/// "| ps_partkey | ps_suppkey | ps_availqty | ps_supplycost | ps_comment |",
/// "+------------+------------+-------------+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+",
/// "| 1 | 2 | 3325 | 771.64 | , even theodolites. regular, final theodolites eat after the carefully pending foxes. furiously regular deposits sleep slyly. carefully bold realms above the ironic dependencies haggle careful |",
/// "| 1 | 2502 | 8076 | 993.49 | ven ideas. quickly even packages print. pending multipliers must have to are fluff |",
/// "| 1 | 5002 | 3956 | 337.09 | after the fluffily ironic deposits? blithely special dependencies integrate furiously even excuses. blithely silent theodolites could have to haggle pending, express requests; fu |",
/// "| 1 | 7502 | 4069 | 357.84 | al, regular dependencies serve carefully after the quickly final pinto beans. furiously even deposits sleep quickly final, silent pinto beans. fluffily reg |",
/// "| 2 | 3 | 8895 | 378.49 | nic accounts. final accounts sleep furiously about the ironic, bold packages. regular, regular accounts |",
/// "| 2 | 2503 | 4969 | 915.27 | ptotes. quickly pending dependencies integrate furiously. fluffily ironic ideas impress blithely above the express accounts. furiously even epitaphs need to wak |",
/// "| 2 | 5003 | 8539 | 438.37 | blithely bold ideas. furiously stealthy packages sleep fluffily. slyly special deposits snooze furiously carefully regular accounts. regular deposits according to the accounts nag carefully slyl |",
/// "| 2 | 7503 | 3025 | 306.39 | olites. deposits wake carefully. even, express requests cajole. carefully regular ex |",
/// "| 3 | 4 | 4651 | 920.92 | ilent foxes affix furiously quickly unusual requests. even packages across the carefully even theodolites nag above the sp |",
/// "| 3 | 2504 | 4093 | 498.13 | ending dependencies haggle fluffily. regular deposits boost quickly carefully regular requests. deposits affix furiously around the pinto beans. ironic, unusual platelets across the p |",
/// "+------------+------------+-------------+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+"
/// ]);
/// ```
/// Schema for the PartSupp
static PARTSUPP_SCHEMA: = new;