1 | #include "dsdgen_helpers.hpp" |
---|---|
2 | |
3 | #define DECLARER |
4 | #include "build_support.h" |
5 | #include "params.h" |
6 | |
7 | #include "tdefs.h" |
8 | #include "scaling.h" |
9 | #include "address.h" |
10 | #include "dist.h" |
11 | #include "genrand.h" |
12 | |
13 | #include "config.h" |
14 | #include "porting.h" |
15 | |
16 | #include "tdefs.h" |
17 | |
18 | namespace tpcds { |
19 | |
20 | void InitializeDSDgen() { |
21 | init_params(); // among other set random seed |
22 | init_rand(); // no random numbers without this |
23 | } |
24 | |
25 | ds_key_t GetRowCount(int table_id) { |
26 | return get_rowcount(table_id); |
27 | } |
28 | |
29 | void ResetCountCount() { |
30 | resetCountCount(); |
31 | } |
32 | |
33 | tpcds_table_def GetTDefByNumber(int table_id) { |
34 | auto tdef = getSimpleTdefsByNumber(table_id); |
35 | tpcds_table_def def; |
36 | def.name = tdef->name; |
37 | def.fl_child = tdef->flags & FL_CHILD ? 1 : 0; |
38 | def.fl_small = tdef->flags & FL_SMALL ? 1 : 0; |
39 | return def; |
40 | } |
41 | |
42 | tpcds_builder_func GetTDefFunctionByNumber(int table_id) { |
43 | auto table_funcs = getTdefFunctionsByNumber(table_id); |
44 | return table_funcs->builder; |
45 | } |
46 | |
47 | } // namespace tpcds |
48 |