Class TpcdsTest


  • public class TpcdsTest
    extends java.lang.Object
    Unit test for TpcdsSchema.

    Only runs if CalciteSystemProperty.TEST_SLOW is set.

    • Field Detail

      • TPCDS_MODEL

        public static final java.lang.String TPCDS_MODEL
    • Constructor Detail

      • TpcdsTest

        public TpcdsTest()
    • 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)
      • testCallCenter

        public void testCallCenter()
      • testTableCount

        public void testTableCount()
      • 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()
      • 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 using RelBuilder.
           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