1 | #include "catch.hpp" |
---|---|
2 | #include "test_helpers.hpp" |
3 | #include "tpce.hpp" |
4 | |
5 | #include <chrono> |
6 | #include <iostream> |
7 | |
8 | using namespace duckdb; |
9 | using namespace std; |
10 | |
11 | TEST_CASE("Test TPC-E", "[tpce][.]") { |
12 | DuckDB db(nullptr); |
13 | Connection con(db); |
14 | |
15 | // a higher scale factor for TPC-E means LESS data (for some reason) |
16 | // generate the TPC-E data for SF 100000 |
17 | uint32_t sf = 100000; |
18 | tpce::dbgen(db, sf); |
19 | |
20 | auto result = con.Query("SELECT * FROM sqlite_master()"); |
21 | |
22 | for (size_t i = 0; i < result->collection.count; i++) { |
23 | auto table_name = result->collection.GetValue(1, i); |
24 | |
25 | REQUIRE_NO_FAIL(con.Query("SELECT COUNT(*) FROM "+ table_name.str_value)); |
26 | |
27 | // result2->Print(); |
28 | |
29 | // result2 = con.Query("SELECT * FROM " + table_name.str_value + " LIMIT |
30 | // 3"); result2->Print(); |
31 | } |
32 | } |
33 |