Package org.apache.calcite.adapter.tpcds
Class TpcdsTest
- java.lang.Object
-
- org.apache.calcite.adapter.tpcds.TpcdsTest
-
public class TpcdsTest extends java.lang.Object
Unit test forTpcdsSchema
.Only runs if
-Dcalcite.test.slow
is specified on the command-line. (SeeCalciteAssert.ENABLE_SLOW
.)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
TPCDS_MODEL
-
Constructor Summary
Constructors Constructor Description TpcdsTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private CalciteAssert.AssertQuery
checkQuery(int i)
org.apache.calcite.tools.Frameworks.ConfigBuilder
config()
protected void
foo(CalciteAssert.AssertThat with, java.lang.String tableName, int expectedCount)
private static java.util.function.Consumer<org.apache.calcite.util.Holder<org.apache.calcite.tools.Program>>
handler(boolean bushy, int minJoinCount)
private static java.lang.String
schema(java.lang.String name, java.lang.String scaleFactor)
void
testCallCenter()
void
testCustomer5()
Tests the customer table with scale factor 5.void
testQuery01()
void
testQuery17Plan()
void
testQuery27()
void
testQuery27Builder()
Builder query 27 usingRelBuilder
.void
testQuery58()
void
testQuery72()
void
testQuery72Plan()
void
testQuery95()
void
testTableCount()
private CalciteAssert.AssertThat
with()
-
-
-
Method Detail
-
handler
private static java.util.function.Consumer<org.apache.calcite.util.Holder<org.apache.calcite.tools.Program>> handler(boolean bushy, int minJoinCount)
-
schema
private static java.lang.String schema(java.lang.String name, java.lang.String scaleFactor)
-
with
private CalciteAssert.AssertThat with()
-
testCallCenter
public void testCallCenter()
-
testTableCount
public void testTableCount()
-
foo
protected void foo(CalciteAssert.AssertThat with, java.lang.String tableName, int expectedCount)
-
testCustomer5
public void testCustomer5()
Tests the customer table with scale factor 5.
-
testQuery01
public void testQuery01()
-
testQuery17Plan
public void testQuery17Plan()
-
testQuery27
public void testQuery27()
-
testQuery58
public void testQuery58()
-
testQuery72
public void testQuery72()
-
testQuery72Plan
public void testQuery72Plan()
-
testQuery95
public void testQuery95()
-
checkQuery
private CalciteAssert.AssertQuery checkQuery(int i)
-
config
public org.apache.calcite.tools.Frameworks.ConfigBuilder config() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testQuery27Builder
public void testQuery27Builder() throws java.lang.Exception
Builder query 27 usingRelBuilder
.select i_item_id, s_state, grouping(s_state) g_state, avg(ss_quantity) agg1, avg(ss_list_price) agg2, avg(ss_coupon_amt) agg3, avg(ss_sales_price) agg4 from store_sales, customer_demographics, date_dim, store, item where ss_sold_date_sk = d_date_sk and ss_item_sk = i_item_sk and ss_store_sk = s_store_sk and ss_cdemo_sk = cd_demo_sk and cd_gender = 'dist(gender, 1, 1)' and cd_marital_status = 'dist(marital_status, 1, 1)' and cd_education_status = 'dist(education, 1, 1)' and d_year = 1998 and s_state in ('distmember(fips_county,[STATENUMBER.1], 3)', 'distmember(fips_county,[STATENUMBER.2], 3)', 'distmember(fips_county,[STATENUMBER.3], 3)', 'distmember(fips_county,[STATENUMBER.4], 3)', 'distmember(fips_county,[STATENUMBER.5], 3)', 'distmember(fips_county,[STATENUMBER.6], 3)') group by rollup (i_item_id, s_state) order by i_item_id ,s_state LIMIT 100
- Throws:
java.lang.Exception
-
-