diff --git a/data/conf/perf-reg/hive-site.xml b/data/conf/perf-reg/hive-site.xml
new file mode 100644
index 0000000..77bbe91
--- /dev/null
+++ b/data/conf/perf-reg/hive-site.xml
@@ -0,0 +1,285 @@
+
+
+
+
+
+
+
+ hive.in.test
+ true
+ Internal marker for test. Used for masking env-dependent values
+
+
+
+
+
+
+
+
+
+
+ hadoop.tmp.dir
+ ${test.tmp.dir}/hadoop-tmp
+ A base for other temporary directories.
+
+
+
+ hive.tez.container.size
+ 128
+
+
+
+
+ hive.merge.tezfiles
+ false
+ Merge small files at the end of a Tez DAG
+
+
+
+ hive.tez.input.format
+ org.apache.hadoop.hive.ql.io.HiveInputFormat
+ The default input format for tez. Tez groups splits in the AM.
+
+
+
+ hive.exec.scratchdir
+ ${test.tmp.dir}/scratchdir
+ Scratch space for Hive jobs
+
+
+
+ datanucleus.autoCreateSchema
+ true
+
+
+
+ datanucleus.fixedDatastore
+ false
+
+
+
+ hive.metastore.schema.verification
+ false
+
+
+
+ hive.exec.local.scratchdir
+ ${test.tmp.dir}/localscratchdir/
+ Local scratch space for Hive jobs
+
+
+
+ javax.jdo.option.ConnectionURL
+ jdbc:derby:;databaseName=${test.tmp.dir}/junit_metastore_db;create=true
+
+
+
+ javax.jdo.option.ConnectionDriverName
+ org.apache.derby.jdbc.EmbeddedDriver
+
+
+
+ javax.jdo.option.ConnectionUserName
+ APP
+
+
+
+ javax.jdo.option.ConnectionPassword
+ mine
+
+
+
+
+ hive.metastore.warehouse.dir
+ ${test.warehouse.dir}
+
+
+
+
+ hive.metastore.metadb.dir
+ file://${test.tmp.dir}/metadb/
+
+ Required by metastore server or if the uris argument below is not supplied
+
+
+
+
+ test.log.dir
+ ${test.tmp.dir}/log/
+
+
+
+
+ test.data.files
+ ${hive.root}/data/files
+
+
+
+
+ test.data.scripts
+ ${hive.root}/data/scripts
+
+
+
+
+ hive.jar.path
+ ${maven.local.repository}/org/apache/hive/hive-exec/${hive.version}/hive-exec-${hive.version}.jar
+
+
+
+
+ hive.metastore.rawstore.impl
+ org.apache.hadoop.hive.metastore.ObjectStore
+ Name of the class that implements org.apache.hadoop.hive.metastore.rawstore interface. This class is used to store and retrieval of raw metadata objects such as table, database
+
+
+
+ hive.querylog.location
+ ${test.tmp.dir}/tmp
+ Location of the structured hive logs
+
+
+
+ hive.exec.pre.hooks
+ org.apache.hadoop.hive.ql.hooks.PreExecutePrinter, org.apache.hadoop.hive.ql.hooks.EnforceReadOnlyTables
+ Pre Execute Hook for Tests
+
+
+
+ hive.exec.post.hooks
+ org.apache.hadoop.hive.ql.hooks.PostExecutePrinter
+ Post Execute Hook for Tests
+
+
+
+ hive.support.concurrency
+ false
+ Whether hive supports concurrency or not. A zookeeper instance must be up and running for the default hive lock manager to support read-write locks.
+
+
+
+ fs.pfile.impl
+ org.apache.hadoop.fs.ProxyLocalFileSystem
+ A proxy for local file system used for cross file system testing
+
+
+
+ hive.exec.mode.local.auto
+ false
+
+ Let hive determine whether to run in local mode automatically
+ Disabling this for tests so that minimr is not affected
+
+
+
+
+ hive.auto.convert.join
+ false
+ Whether Hive enable the optimization about converting common join into mapjoin based on the input file size
+
+
+
+ hive.ignore.mapjoin.hint
+ true
+ Whether Hive ignores the mapjoin hint
+
+
+
+ io.sort.mb
+ 10
+
+
+
+ hive.input.format
+ org.apache.hadoop.hive.ql.io.CombineHiveInputFormat
+ The default input format, if it is not specified, the system assigns it. It is set to HiveInputFormat for hadoop versions 17, 18 and 19, whereas it is set to CombineHiveInputFormat for hadoop 20. The user can always overwrite it - if there is a bug in CombineHiveInputFormat, it can always be manually set to HiveInputFormat.
+
+
+
+ hive.default.rcfile.serde
+ org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe
+ The default SerDe hive will use for the rcfile format
+
+
+
+ hive.stats.dbclass
+ fs
+ The default storatge that stores temporary hive statistics. Currently, fs type is supported
+
+
+
+ hive.execution.engine
+ tez
+ Whether to use MR or Tez
+
+
+
+ tez.am.node-blacklisting.enabled
+ false
+
+
+
+ hive.prewarm.enabled
+ true
+
+ Enables container prewarm for tez (hadoop 2 only)
+
+
+
+
+ hive.prewarm.numcontainers
+ 3
+
+ Controls the number of containers to prewarm for tez (hadoop 2 only)
+
+
+
+
+ hive.in.tez.test
+ true
+
+ Indicates that we are in tez testing mode.
+
+
+
+
+ hive.tez.java.opts
+ -Dlog4j.configurationFile=tez-container-log4j2.properties -Dtez.container.log.level=INFO -Dtez.container.root.logger=CLA
+
+
+
+ tez.am.launch.cmd-opts
+ -Dlog4j.configurationFile=tez-container-log4j2.properties -Dtez.container.log.level=INFO -Dtez.container.root.logger=CLA
+
+
+
+ hive.metastore.fastpath
+ true
+
+
+
+ hive.metastore.rawstore.impl
+ org.apache.hadoop.hive.metastore.ObjectStore
+
+
+
+ hive.orc.splits.ms.footer.cache.enabled
+ true
+
+
+
diff --git a/data/conf/perf-reg/tez-site.xml b/data/conf/perf-reg/tez-site.xml
new file mode 100644
index 0000000..940f390
--- /dev/null
+++ b/data/conf/perf-reg/tez-site.xml
@@ -0,0 +1,6 @@
+
+
+ tez.am.dag.scheduler.class
+ org.apache.tez.dag.app.dag.impl.DAGSchedulerNaturalOrderControlled
+
+
diff --git a/data/files/tpcds-perf/metastore_export/csv/TABLE_PARAMS.txt b/data/files/tpcds-perf/metastore_export/csv/TABLE_PARAMS.txt
new file mode 100644
index 0000000..9aa385a
--- /dev/null
+++ b/data/files/tpcds-perf/metastore_export/csv/TABLE_PARAMS.txt
@@ -0,0 +1,102 @@
+_store_,COLUMN_STATS_ACCURATE,true
+_store_,numFiles,1
+_store_,numRows,1704
+_store_,rawDataSize,3256276
+_store_,totalSize,101707
+_store_,transient_lastDdlTime,143456_customer_demographics_
+_call_center_,COLUMN_STATS_ACCURATE,true
+_call_center_,numFiles,1
+_call_center_,numRows,60
+_call_center_,rawDataSize,122700
+_call_center_,totalSize,10347
+_call_center_,transient_lastDdlTime,1434561922
+_catalog_page_,COLUMN_STATS_ACCURATE,true
+_catalog_page_,numFiles,1
+_catalog_page_,numRows,46000
+_catalog_page_,rawDataSize,21198808
+_catalog_page_,totalSize,1576662
+_catalog_page_,transient_lastDdlTime,1434561925
+_customer_,COLUMN_STATS_ACCURATE,true
+_customer_,numFiles,538
+_customer_,numRows,80000000
+_customer_,rawDataSize,68801615852
+_customer_,totalSize,3143935054
+_customer_,transient_lastDdlTime,1434561966
+_customer_address_,COLUMN_STATS_ACCURATE,true
+_customer_address_,numFiles,274
+_customer_address_,numRows,40000000
+_customer_address_,rawDataSize,40595195284
+_customer_address_,totalSize,530195843
+_customer_address_,transient_lastDdlTime,1434561994
+_customer_demographics_,COLUMN_STATS_ACCURATE,true
+_customer_demographics_,numFiles,8
+_customer_demographics_,numRows,_time_dim_800
+_customer_demographics_,rawDataSize,717_income_band_59
+_customer_demographics_,totalSize,323062
+_customer_demographics_,transient_lastDdlTime,1434562071
+_date_dim_,COLUMN_STATS_ACCURATE,true
+_date_dim_,numFiles,1
+_date_dim_,numRows,73049
+_date_dim_,rawDataSize,81741831
+_date_dim_,totalSize,362925
+_date_dim_,transient_lastDdlTime,1434562075
+_household_demographics_,COLUMN_STATS_ACCURATE,true
+_household_demographics_,numFiles,1
+_household_demographics_,numRows,7200
+_household_demographics_,rawDataSize,770400
+_household_demographics_,totalSize,901
+_household_demographics_,transient_lastDdlTime,1434562078
+_income_band_,COLUMN_STATS_ACCURATE,true
+_income_band_,numFiles,1
+_income_band_,numRows,20
+_income_band_,rawDataSize,240
+_income_band_,totalSize,399
+_income_band_,transient_lastDdlTime,1434562081
+_item_,COLUMN_STATS_ACCURATE,true
+_item_,numFiles,9
+_item_,numRows,462000
+_item_,rawDataSize,663560457
+_item_,totalSize,29760748
+_item_,transient_lastDdlTime,1434562091
+_promotion_,COLUMN_STATS_ACCURATE,true
+_promotion_,numFiles,1
+_promotion_,numRows,2300
+_promotion_,rawDataSize,2713420
+_promotion_,totalSize,63964
+_promotion_,transient_lastDdlTime,1434562093
+_reason_,COLUMN_STATS_ACCURATE,true
+_reason_,numFiles,1
+_reason_,numRows,72
+_reason_,rawDataSize,14400
+_reason_,totalSize,1024
+_reason_,transient_lastDdlTime,1434562095
+_ship_mode_,COLUMN_STATS_ACCURATE,true
+_ship_mode_,numFiles,0
+_ship_mode_,numRows,0
+_ship_mode_,rawDataSize,0
+_ship_mode_,totalSize,0
+_ship_mode_,transient_lastDdlTime,1434562097
+_time_dim_,COLUMN_STATS_ACCURATE,true
+_time_dim_,numFiles,1
+_time_dim_,numRows,86400
+_time_dim_,rawDataSize,40694400
+_time_dim_,totalSize,133902
+_time_dim_,transient_lastDdlTime,1434562099
+_warehouse_,COLUMN_STATS_ACCURATE,true
+_warehouse_,numFiles,1
+_warehouse_,numRows,27
+_warehouse_,rawDataSize,27802
+_warehouse_,totalSize,2971
+_warehouse_,transient_lastDdlTime,1434562102
+_web_page_,COLUMN_STATS_ACCURATE,true
+_web_page_,numFiles,1
+_web_page_,numRows,4602
+_web_page_,rawDataSize,2696178
+_web_page_,totalSize,50572
+_web_page_,transient_lastDdlTime,1434562104
+_web_site_,COLUMN_STATS_ACCURATE,true
+_web_site_,numFiles,1
+_web_site_,numRows,84
+_web_site_,rawDataSize,155408
+_web_site_,totalSize,11271
+_web_site_,transient_lastDdlTime,1434562107
diff --git a/data/files/tpcds-perf/metastore_export/csv/TAB_COL_STATS.txt b/data/files/tpcds-perf/metastore_export/csv/TAB_COL_STATS.txt
new file mode 100644
index 0000000..a1e54fd
--- /dev/null
+++ b/data/files/tpcds-perf/metastore_export/csv/TAB_COL_STATS.txt
@@ -0,0 +1,259 @@
+default,store,s_store_sk,int,1,1704,,,,,1507,0,,,,,1434571564,6196,_store_
+default,store,s_store_id,string,,,,,,,822,0,16,16,,,1434571564,6197,_store_
+default,store,s_rec_start_date,string,,,,,,,5,0,9.94131455399061,10,,,1434571564,6198,_store_
+default,store,s_rec_end_date,string,,,,,,,4,0,5,10,,,1434571564,6199,_store_
+default,store,s_closed_date_sk,int,2450820,2451314,,,,,214,1211,,,,,1434571564,6200,_store_
+default,store,s_store_name,string,,,,,,,11,0,3.91138497652582,5,,,1434571564,6201,_store_
+default,store,s_number_employees,int,200,300,,,,,63,13,,,,,1434571564,6202,_store_
+default,store,s_floor_space,int,5000201,9997773,,,,,1323,12,,,,,1434571564,6203,_store_
+default,store,s_hours,string,,,,,,,4,0,7.07746478873239,8,,,1434571564,6204,_store_
+default,store,s_manager,string,,,,,,,1213,0,12.6584507042254,21,,,1434571564,6205,_store_
+default,store,s_market_id,int,1,10,,,,,11,15,,,,,1434571564,6206,_store_
+default,store,s_geography_class,string,,,,,,,2,0,6.94659624413146,7,,,1434571564,6207,_store_
+default,store,s_market_desc,string,,,,,,,1382,0,57.7194835680751,100,,,1434571564,6208,_store_
+default,store,s_market_manager,string,,,,,,,896,0,12.781103286385,20,,,1434571564,6209,_store_
+default,store,s_division_id,int,1,1,,,,,1,10,,,,,1434571564,6210,_store_
+default,store,s_division_name,string,,,,,,,2,0,6.95070422535211,7,,,1434571564,6211,_store_
+default,store,s_company_id,int,1,1,,,,,1,13,,,,,1434571564,6212,_store_
+default,store,s_company_name,string,,,,,,,2,0,6.95070422535211,7,,,1434571564,6213,_store_
+default,store,s_street_number,string,,,,,,,633,0,2.87793427230047,4,,,1434571564,6214,_store_
+default,store,s_street_name,string,,,,,,,1020,0,8.58509389671362,19,,,1434571564,6215,_store_
+default,store,s_street_type,string,,,,,,,23,0,4.19307511737089,9,,,1434571564,6216,_store_
+default,store,s_suite_number,string,,,,,,,86,0,7.83978873239437,9,,,1434571564,6217,_store_
+default,store,s_city,string,,,,,,,244,0,8.53462441314554,15,,,1434571564,6218,_store_
+default,store,s_county,string,,,,,,,122,0,13.9237089201878,22,,,1434571564,6219,_store_
+default,store,s_state,string,,,,,,,49,0,1.98591549295775,2,,,1434571564,6220,_store_
+default,store,s_zip,string,,,,,,,936,0,4.96478873239437,5,,,1434571564,6221,_store_
+default,store,s_country,string,,,,,,,2,0,12.931338028169,13,,,1434571564,6222,_store_
+default,store,s_gmt_offset,float,,,-9,-5,,,5,9,,,,,1434571564,6223,_store_
+default,store,s_tax_precentage,float,,,0,0.109999999403954,,,15,12,,,,,1434571564,6224,_store_
+default,call_center,cc_call_center_sk,int,1,60,,,,,37,0,,,,,1434571573,6225,_call_center_
+default,call_center,cc_call_center_id,string,,,,,,,30,0,16,16,,,1434571573,6226,_call_center_
+default,call_center,cc_rec_start_date,string,,,,,,,4,0,10,10,,,1434571573,6227,_call_center_
+default,call_center,cc_rec_end_date,string,,,,,,,4,0,5,10,,,1434571573,6228,_call_center_
+default,call_center,cc_closed_date_sk,int,,,,,,,1,60,,,,,1434571573,6229,_call_center_
+default,call_center,cc_open_date_sk,int,2450794,2451146,,,,,21,0,,,,,1434571573,6230,_call_center_
+default,call_center,cc_name,string,,,,,,,29,0,13.85,19,,,1434571573,6231,_call_center_
+default,call_center,cc_class,string,,,,,,,3,0,5.43333333333333,6,,,1434571573,6232,_call_center_
+default,call_center,cc_employees,int,5412266,1963174023,,,,,39,0,,,,,1434571573,6233,_call_center_
+default,call_center,cc_sq_ft,int,-2108783316,2044891959,,,,,56,0,,,,,1434571573,6234,_call_center_
+default,call_center,cc_hours,string,,,,,,,3,0,7.1,8,,,1434571573,6235,_call_center_
+default,call_center,cc_manager,string,,,,,,,47,0,12.2333333333333,17,,,1434571573,6236,_call_center_
+default,call_center,cc_mkt_id,int,1,6,,,,,5,0,,,,,1434571573,6237,_call_center_
+default,call_center,cc_mkt_class,string,,,,,,,43,0,34.7,50,,,1434571573,6238,_call_center_
+default,call_center,cc_mkt_desc,string,,,,,,,41,0,61.8666666666667,100,,,1434571573,6239,_call_center_
+default,call_center,cc_market_manager,string,,,,,,,45,0,12.3833333333333,17,,,1434571573,6240,_call_center_
+default,call_center,cc_division,int,1,6,,,,,5,0,,,,,1434571573,6241,_call_center_
+default,call_center,cc_division_name,string,,,,,,,7,0,3.96666666666667,5,,,1434571573,6242,_call_center_
+default,call_center,cc_company,int,1,6,,,,,5,0,,,,,1434571573,6243,_call_center_
+default,call_center,cc_company_name,string,,,,,,,7,0,3.8,5,,,1434571573,6244,_call_center_
+default,call_center,cc_street_number,string,,,,,,,31,0,2.9,3,,,1434571573,6245,_call_center_
+default,call_center,cc_street_name,string,,,,,,,28,0,8.16666666666667,16,,,1434571573,6246,_call_center_
+default,call_center,cc_street_type,string,,,,,,,14,0,4.28333333333333,9,,,1434571573,6247,_call_center_
+default,call_center,cc_suite_number,string,,,,,,,26,0,7.63333333333333,9,,,1434571573,6248,_call_center_
+default,call_center,cc_city,string,,,,,,,33,0,9.01666666666667,15,,,1434571573,6249,_call_center_
+default,call_center,cc_county,string,,,,,,,31,0,14.1166666666667,21,,,1434571573,6250,_call_center_
+default,call_center,cc_state,string,,,,,,,18,0,2,2,,,1434571573,6251,_call_center_
+default,call_center,cc_zip,string,,,,,,,20,0,5,5,,,1434571573,6252,_call_center_
+default,call_center,cc_country,string,,,,,,,1,0,13,13,,,1434571573,6253,_call_center_
+default,call_center,cc_gmt_offset,float,,,-8,-5,,,3,0,,,,,1434571573,6254,_call_center_
+default,call_center,cc_tax_percentage,float,,,0,0.119999997317791,,,17,0,,,,,1434571573,6255,_call_center_
+default,catalog_page,cp_catalog_page_sk,int,1,46000,,,,,62562,0,,,,,1434571586,6256,_catalog_page_
+default,catalog_page,cp_catalog_page_id,string,,,,,,,38846,0,16,16,,,1434571586,6257,_catalog_page_
+default,catalog_page,cp_start_date_sk,int,2450815,2453005,,,,,112,444,,,,,1434571586,6258,_catalog_page_
+default,catalog_page,cp_end_date_sk,int,2450844,2453186,,,,,86,446,,,,,1434571586,6259,_catalog_page_
+default,catalog_page,cp_department,string,,,,,,,2,0,9.90826086956522,10,,,1434571586,6260,_catalog_page_
+default,catalog_page,cp_catalog_number,int,1,109,,,,,66,465,,,,,1434571586,6261,_catalog_page_
+default,catalog_page,cp_catalog_page_number,int,1,425,,,,,224,443,,,,,1434571586,6262,_catalog_page_
+default,catalog_page,cp_description,string,,,,,,,48242,0,73.8601956521739,99,,,1434571586,6263,_catalog_page_
+default,catalog_page,cp_type,string,,,,,,,5,0,7.59682608695652,9,,,1434571586,6264,_catalog_page_
+default,customer,c_customer_sk,int,1,80000000,,,,,72955234,0,,,,,1434571680,6265,_customer_
+default,customer,c_customer_id,string,,,,,,,66900244,0,16,16,,,1434571680,6266,_customer_
+default,customer,c_current_cdemo_sk,int,1,_time_dim_800,,,,,1835839,2798616,,,,,1434571680,6267,_customer_
+default,customer,c_current_hdemo_sk,int,1,7200,,,,,9299,2799006,,,,,1434571680,6268,_customer_
+default,customer,c_current_addr_sk,int,1,40000000,,,,,45300013,0,,,,,1434571680,6269,_customer_
+default,customer,c_first_shipto_date_sk,int,2449028,2452678,,,,,3585,2800717,,,,,1434571680,6270,_customer_
+default,customer,c_first_sales_date_sk,int,2448998,2452648,,,,,3585,2799514,,,,,1434571680,6271,_customer_
+default,customer,c_salutation,string,,,,,,,9,0,3.1285808875,4,,,1434571680,6272,_customer_
+default,customer,c_first_name,string,,,,,,,5529,0,5.6321494125,11,,,1434571680,6273,_customer_
+default,customer,c_last_name,string,,,,,,,7820,0,5.9160140875,13,,,1434571680,6274,_customer_
+default,customer,c_preferred_cust_flag,string,,,,,,,3,0,0.96499295,1,,,1434571680,6275,_customer_
+default,customer,c_birth_day,int,1,31,,,,,23,2799325,,,,,1434571680,6276,_customer_
+default,customer,c_birth_month,int,1,12,,,,,13,2800192,,,,,1434571680,6277,_customer_
+default,customer,c_birth_year,int,1924,1992,,,,,49,2798667,,,,,1434571680,6278,_customer_
+default,customer,c_birth_country,string,,,,,,,214,0,8.3879500875,20,,,1434571680,6279,_customer_
+default,customer,c_login,string,,,,,,,2,0,0,0,,,1434571680,6280,_customer_
+default,customer,c_email_address,string,,,,,,,112512351,0,26.5065306,48,,,1434571680,6281,_customer_
+default,customer,c_last_review_date,string,,,,,,,224,0,6.7549565125,7,,,1434571680,6282,_customer_
+default,customer_address,ca_address_sk,int,1,40000000,,,,,53871098,0,,,,,1434571715,6283,_customer_address_
+default,customer_address,ca_address_id,string,,,,,,,47305616,0,16,16,,,1434571715,6284,_customer_address_
+default,customer_address,ca_street_number,string,,,,,,,822,0,2.806232675,4,,,1434571715,6285,_customer_address_
+default,customer_address,ca_street_name,string,,,,,,,7488,0,8.44949205,21,,,1434571715,6286,_customer_address_
+default,customer_address,ca_street_type,string,,,,,,,23,0,4.073537425,9,,,1434571715,6287,_customer_address_
+default,customer_address,ca_suite_number,string,,,,,,,86,0,7.653062625,9,,,1434571715,6288,_customer_address_
+default,customer_address,ca_city,string,,,,,,,896,0,8.684372925,20,,,1434571715,6289,_customer_address_
+default,customer_address,ca_county,string,,,,,,,1716,0,13.543959525,28,,,1434571715,6290,_customer_address_
+default,customer_address,ca_state,string,,,,,,,51,0,1.9400121,2,,,1434571715,6291,_customer_address_
+default,customer_address,ca_zip,string,,,,,,,10141,0,4.849962,5,,,1434571715,6292,_customer_address_
+default,customer_address,ca_country,string,,,,,,,2,0,12.610234325,13,,,1434571715,6293,_customer_address_
+default,customer_address,ca_gmt_offset,float,,,-10,-5,,,5,1201179,,,,,1434571715,6294,_customer_address_
+default,customer_address,ca_location_type,string,,,,,,,4,0,8.729921525,13,,,1434571715,6295,_customer_address_
+default,customer_demographics,cd_demo_sk,int,1,_time_dim_800,,,,,1835839,0,,,,,1434571729,6296,_customer_demographics_
+default,customer_demographics,cd_gender,string,,,,,,,2,0,1,1,,,1434571729,6297,_customer_demographics_
+default,customer_demographics,cd_marital_status,string,,,,,,,7,0,1,1,,,1434571729,6298,_customer_demographics_
+default,customer_demographics,cd_education_status,string,,,,,,,9,0,9.57142857142857,15,,,1434571729,6299,_customer_demographics_
+default,customer_demographics,cd_purchase_estimate,int,500,10000,,,,,24,0,,,,,1434571729,6300,_customer_demographics_
+default,customer_demographics,cd_credit_rating,string,,,,,,,5,0,7,9,,,1434571729,6301,_customer_demographics_
+default,customer_demographics,cd_dep_count,int,0,6,,,,,5,0,,,,,1434571729,6302,_customer_demographics_
+default,customer_demographics,cd_dep_employed_count,int,0,6,,,,,5,0,,,,,1434571729,6303,_customer_demographics_
+default,customer_demographics,cd_dep_college_count,int,0,6,,,,,5,0,,,,,1434571729,6304,_customer_demographics_
+default,date_dim,d_date_sk,int,2415022,2488070,,,,,65332,0,,,,,1434571736,6305,_date_dim_
+default,date_dim,d_date_id,string,,,,,,,109875,0,16,16,,,1434571736,6306,_date_dim_
+default,date_dim,d_date,string,,,,,,,92393,0,10,10,,,1434571736,6307,_date_dim_
+default,date_dim,d_month_seq,int,0,2400,,,,,2764,0,,,,,1434571736,6308,_date_dim_
+default,date_dim,d_week_seq,int,1,10436,,,,,13152,0,,,,,1434571736,6309,_date_dim_
+default,date_dim,d_quarter_seq,int,1,801,,,,,429,0,,,,,1434571736,6310,_date_dim_
+default,date_dim,d_year,int,1900,2100,,,,,112,0,,,,,1434571736,6311,_date_dim_
+default,date_dim,d_dow,int,0,6,,,,,5,0,,,,,1434571736,6312,_date_dim_
+default,date_dim,d_moy,int,1,12,,,,,13,0,,,,,1434571736,6313,_date_dim_
+default,date_dim,d_dom,int,1,31,,,,,23,0,,,,,1434571736,6314,_date_dim_
+default,date_dim,d_qoy,int,1,4,,,,,5,0,,,,,1434571736,6315,_date_dim_
+default,date_dim,d_fy_year,int,1900,2100,,,,,112,0,,,,,1434571736,6316,_date_dim_
+default,date_dim,d_fy_quarter_seq,int,1,801,,,,,429,0,,,,,1434571736,6317,_date_dim_
+default,date_dim,d_fy_week_seq,int,1,10436,,,,,13152,0,,,,,1434571736,6318,_date_dim_
+default,date_dim,d_day_name,string,,,,,,,9,0,7.14286300976057,9,,,1434571736,6319,_date_dim_
+default,date_dim,d_quarter_name,string,,,,,,,721,0,6,6,,,1434571736,6320,_date_dim_
+default,date_dim,d_holiday,string,,,,,,,2,0,1,1,,,1434571736,6321,_date_dim_
+default,date_dim,d_weekend,string,,,,,,,2,0,1,1,,,1434571736,6322,_date_dim_
+default,date_dim,d_following_holiday,string,,,,,,,2,0,1,1,,,1434571736,6323,_date_dim_
+default,date_dim,d_first_dom,int,2415021,2488070,,,,,2226,0,,,,,1434571736,6324,_date_dim_
+default,date_dim,d_last_dom,int,2415020,2488372,,,,,2535,0,,,,,1434571736,6325,_date_dim_
+default,date_dim,d_same_day_ly,int,2414657,2487705,,,,,65332,0,,,,,1434571736,6326,_date_dim_
+default,date_dim,d_same_day_lq,int,2414930,2487978,,,,,65332,0,,,,,1434571736,6327,_date_dim_
+default,date_dim,d_current_day,string,,,,,,,1,0,1,1,,,1434571736,6328,_date_dim_
+default,date_dim,d_current_week,string,,,,,,,1,0,1,1,,,1434571736,6329,_date_dim_
+default,date_dim,d_current_month,string,,,,,,,2,0,1,1,,,1434571736,6330,_date_dim_
+default,date_dim,d_current_quarter,string,,,,,,,2,0,1,1,,,1434571736,6331,_date_dim_
+default,date_dim,d_current_year,string,,,,,,,2,0,1,1,,,1434571736,6332,_date_dim_
+default,household_demographics,hd_demo_sk,int,1,7200,,,,,9299,0,,,,,1434571741,6333,_household_demographics_
+default,household_demographics,hd_income_band_sk,int,1,20,,,,,18,0,,,,,1434571741,6334,_household_demographics_
+default,household_demographics,hd_buy_potential,string,,,,,,,5,0,7.5,10,,,1434571741,6335,_household_demographics_
+default,household_demographics,hd_dep_count,int,0,9,,,,,11,0,,,,,1434571741,6336,_household_demographics_
+default,household_demographics,hd_vehicle_count,int,-1,4,,,,,6,0,,,,,1434571741,6337,_household_demographics_
+default,income_band,ib_income_band_sk,int,1,20,,,,,18,0,,,,,1434571745,6338,_income_band_
+default,income_band,ib_lower_bound,int,0,190001,,,,,21,0,,,,,1434571745,6339,_income_band_
+default,income_band,ib_upper_bound,int,10000,200000,,,,,18,0,,,,,1434571745,6340,_income_band_
+default,item,i_item_sk,int,1,462000,,,,,439501,0,,,,,1434571764,6341,_item_
+default,item,i_item_id,string,,,,,,,310774,0,16,16,,,1434571764,6342,_item_
+default,item,i_rec_start_date,string,,,,,,,5,0,9.97480519480519,10,,,1434571764,6343,_item_
+default,item,i_rec_end_date,string,,,,,,,5,0,5,10,,,1434571764,6344,_item_
+default,item,i_item_desc,string,,,,,,,338901,0,100.203757575758,200,,,1434571764,6345,_item_
+default,item,i_current_price,float,,,0.0900000035762787,99.9899978637695,,,12060,1167,,,,,1434571764,6346,_item_
+default,item,i_wholesale_cost,float,,,0.0199999995529652,89.7399978637695,,,7820,1120,,,,,1434571764,6347,_item_
+default,item,i_brand_id,int,1001001,10016017,,,,,633,1139,,,,,1434571764,6348,_item_
+default,item,i_brand,string,,,,,,,633,0,16.1186558441558,22,,,1434571764,6349,_item_
+default,item,i_class_id,int,1,16,,,,,15,1117,,,,,1434571764,6350,_item_
+default,item,i_class,string,,,,,,,102,0,7.76902164502164,15,,,1434571764,6351,_item_
+default,item,i_category_id,int,1,10,,,,,11,1141,,,,,1434571764,6352,_item_
+default,item,i_category,string,,,,,,,10,0,5.88895454545454,11,,,1434571764,6353,_item_
+default,item,i_manufact_id,int,1,1000,,,,,691,1152,,,,,1434571764,6354,_item_
+default,item,i_manufact,string,,,,,,,1267,0,11.2630519480519,15,,,1434571764,6355,_item_
+default,item,i_size,string,,,,,,,9,0,4.32115800865801,11,,,1434571764,6356,_item_
+default,item,i_formulation,string,,,,,,,310774,0,19.9492207792208,20,,,1434571764,6357,_item_
+default,item,i_color,string,,,,,,,66,0,5.36743939393939,10,,,1434571764,6358,_item_
+default,item,i_units,string,,,,,,,18,0,4.17825541125541,7,,,1434571764,6359,_item_
+default,item,i_container,string,,,,,,,2,0,6.9825,7,,,1434571764,6360,_item_
+default,item,i_manager_id,int,1,100,,,,,63,1124,,,,,1434571764,6361,_item_
+default,item,i_product_name,string,,,,,,,522658,0,22.8322532467532,30,,,1434571764,6362,_item_
+default,promotion,p_promo_sk,int,1,2300,,,,,2764,0,,,,,1434571768,6363,_promotion_
+default,promotion,p_promo_id,string,,,,,,,2427,0,16,16,,,1434571768,6364,_promotion_
+default,promotion,p_start_date_sk,int,2450096,2450915,,,,,822,30,,,,,1434571768,6365,_promotion_
+default,promotion,p_end_date_sk,int,2450102,2450970,,,,,1066,26,,,,,1434571768,6366,_promotion_
+default,promotion,p_item_sk,int,614,461932,,,,,2132,28,,,,,1434571768,6367,_promotion_
+default,promotion,p_cost,float,,,1000,1000,,,1,28,,,,,1434571768,6368,_promotion_
+default,promotion,p_response_target,int,1,1,,,,,1,33,,,,,1434571768,6369,_promotion_
+default,promotion,p_promo_name,string,,,,,,,11,0,3.94695652173913,5,,,1434571768,6370,_promotion_
+default,promotion,p_channel_dmail,string,,,,,,,3,0,0.989565217391304,1,,,1434571768,6371,_promotion_
+default,promotion,p_channel_email,string,,,,,,,2,0,0.988260869565217,1,,,1434571768,6372,_promotion_
+default,promotion,p_channel_catalog,string,,,,,,,2,0,0.989565217391304,1,,,1434571768,6373,_promotion_
+default,promotion,p_channel_tv,string,,,,,,,2,0,0.988260869565217,1,,,1434571768,6374,_promotion_
+default,promotion,p_channel_radio,string,,,,,,,2,0,0.987826086956522,1,,,1434571768,6375,_promotion_
+default,promotion,p_channel_press,string,,,,,,,2,0,0.988695652173913,1,,,1434571768,6376,_promotion_
+default,promotion,p_channel_event,string,,,,,,,2,0,0.989565217391304,1,,,1434571768,6377,_promotion_
+default,promotion,p_channel_demo,string,,,,,,,2,0,0.988260869565217,1,,,1434571768,6378,_promotion_
+default,promotion,p_channel_details,string,,,,,,,2041,0,39.2652173913044,60,,,1434571768,6379,_promotion_
+default,promotion,p_purpose,string,,,,,,,2,0,6.92391304347826,7,,,1434571768,6380,_promotion_
+default,promotion,p_discount_active,string,,,,,,,2,0,0.986521739130435,1,,,1434571768,6381,_promotion_
+default,reason,r_reason_sk,int,1,72,,,,,47,0,,,,,1434571773,6382,_reason_
+default,reason,r_reason_id,string,,,,,,,61,0,16,16,,,1434571773,6383,_reason_
+default,reason,r_reason_desc,string,,,,,,,112,0,12.6527777777778,43,,,1434571773,6384,_reason_
+default,ship_mode,sm_ship_mode_sk,int,,,,,,,0,0,,,,,1434571776,6385,_ship_mode_
+default,ship_mode,sm_ship_mode_id,string,,,,,,,0,0,0,0,,,1434571776,6386,_ship_mode_
+default,ship_mode,sm_type,string,,,,,,,0,0,0,0,,,1434571776,6387,_ship_mode_
+default,ship_mode,sm_code,string,,,,,,,0,0,0,0,,,1434571776,6388,_ship_mode_
+default,ship_mode,sm_carrier,string,,,,,,,0,0,0,0,,,1434571776,6389,_ship_mode_
+default,ship_mode,sm_contract,string,,,,,,,0,0,0,0,,,1434571776,6390,_ship_mode_
+default,time_dim,t_time_sk,int,0,86399,,,,,125124,0,,,,,1434571782,6391,_time_dim_
+default,time_dim,t_time_id,string,,,,,,,71245,0,16,16,,,1434571782,6392,_time_dim_
+default,time_dim,t_time,int,0,86399,,,,,125124,0,,,,,1434571782,6393,_time_dim_
+default,time_dim,t_hour,int,0,23,,,,,19,0,,,,,1434571782,6394,_time_dim_
+default,time_dim,t_minute,int,0,59,,,,,37,0,,,,,1434571782,6395,_time_dim_
+default,time_dim,t_second,int,0,59,,,,,37,0,,,,,1434571782,6396,_time_dim_
+default,time_dim,t_am_pm,string,,,,,,,2,0,2,2,,,1434571782,6397,_time_dim_
+default,time_dim,t_shift,string,,,,,,,3,0,5.33333333333333,6,,,1434571782,6398,_time_dim_
+default,time_dim,t_sub_shift,string,,,,,,,5,0,6.91666666666667,9,,,1434571782,6399,_time_dim_
+default,time_dim,t_meal_time,string,,,,,,,4,0,2.875,9,,,1434571782,6400,_time_dim_
+default,warehouse,w_warehouse_sk,int,1,27,,,,,22,0,,,,,1434571790,6401,_warehouse_
+default,warehouse,w_warehouse_id,string,,,,,,,22,0,16,16,,,1434571790,6402,_warehouse_
+default,warehouse,w_warehouse_name,string,,,,,,,21,0,15.5555555555556,20,,,1434571790,6403,_warehouse_
+default,warehouse,w_warehouse_sq_ft,int,73065,977787,,,,,37,1,,,,,1434571790,6404,_warehouse_
+default,warehouse,w_street_number,string,,,,,,,28,0,2.77777777777778,3,,,1434571790,6405,_warehouse_
+default,warehouse,w_street_name,string,,,,,,,23,0,8.40740740740741,15,,,1434571790,6406,_warehouse_
+default,warehouse,w_street_type,string,,,,,,,18,0,3.92592592592593,9,,,1434571790,6407,_warehouse_
+default,warehouse,w_suite_number,string,,,,,,,21,0,7.44444444444444,9,,,1434571790,6408,_warehouse_
+default,warehouse,w_city,string,,,,,,,19,0,9.14814814814815,15,,,1434571790,6409,_warehouse_
+default,warehouse,w_county,string,,,,,,,15,0,14.4074074074074,17,,,1434571790,6410,_warehouse_
+default,warehouse,w_state,string,,,,,,,15,0,2,2,,,1434571790,6411,_warehouse_
+default,warehouse,w_zip,string,,,,,,,17,0,5,5,,,1434571790,6412,_warehouse_
+default,warehouse,w_country,string,,,,,,,1,0,13,13,,,1434571790,6413,_warehouse_
+default,warehouse,w_gmt_offset,float,,,-8,-5,,,3,1,,,,,1434571790,6414,_warehouse_
+default,web_page,wp_web_page_sk,int,1,4602,,,,,5529,0,,,,,1434571794,6415,_web_page_
+default,web_page,wp_web_page_id,string,,,,,,,2647,0,16,16,,,1434571794,6416,_web_page_
+default,web_page,wp_rec_start_date,string,,,,,,,4,0,9.88700564971751,10,,,1434571794,6417,_web_page_
+default,web_page,wp_rec_end_date,string,,,,,,,4,0,5,10,,,1434571794,6418,_web_page_
+default,web_page,wp_creation_date_sk,int,2450492,2450815,,,,,234,64,,,,,1434571794,6419,_web_page_
+default,web_page,wp_access_date_sk,int,2452548,2452648,,,,,63,58,,,,,1434571794,6420,_web_page_
+default,web_page,wp_autogen_flag,string,,,,,,,3,0,0.984789222077358,1,,,1434571794,6421,_web_page_
+default,web_page,wp_customer_sk,int,33025,79895491,,,,,1382,3263,,,,,1434571794,6422,_web_page_
+default,web_page,wp_url,string,,,,,,,2,0,17.8005215123859,18,,,1434571794,6423,_web_page_
+default,web_page,wp_type,string,,,,,,,6,0,6.30704041720991,9,,,1434571794,6424,_web_page_
+default,web_page,wp_char_count,int,303,8523,,,,,3585,65,,,,,1434571794,6425,_web_page_
+default,web_page,wp_link_count,int,2,25,,,,,16,50,,,,,1434571794,6426,_web_page_
+default,web_page,wp_image_count,int,1,7,,,,,6,48,,,,,1434571794,6427,_web_page_
+default,web_page,wp_max_ad_count,int,0,4,,,,,5,52,,,,,1434571794,6428,_web_page_
+default,web_site,web_site_sk,int,1,84,,,,,49,0,,,,,1434572787,6429,_web_site_
+default,web_site,web_site_id,string,,,,,,,53,0,16,16,,,1434572787,6430,_web_site_
+default,web_site,web_rec_start_date,string,,,,,,,5,0,9.76190476190476,10,,,1434572787,6431,_web_site_
+default,web_site,web_rec_end_date,string,,,,,,,4,0,5,10,,,1434572787,6432,_web_site_
+default,web_site,web_name,string,,,,,,,18,0,6.14285714285714,7,,,1434572787,6433,_web_site_
+default,web_site,web_open_date_sk,int,2450118,2450807,,,,,41,1,,,,,1434572787,6434,_web_site_
+default,web_site,web_close_date_sk,int,2440993,2446218,,,,,29,15,,,,,1434572787,6435,_web_site_
+default,web_site,web_class,string,,,,,,,2,0,6.91666666666667,7,,,1434572787,6436,_web_site_
+default,web_site,web_manager,string,,,,,,,61,0,12.4642857142857,19,,,1434572787,6437,_web_site_
+default,web_site,web_mkt_id,int,1,6,,,,,5,1,,,,,1434572787,6438,_web_site_
+default,web_site,web_mkt_class,string,,,,,,,79,0,34.7142857142857,49,,,1434572787,6439,_web_site_
+default,web_site,web_mkt_desc,string,,,,,,,61,0,64.6190476190476,98,,,1434572787,6440,_web_site_
+default,web_site,web_market_manager,string,,,,,,,58,0,12.7738095238095,18,,,1434572787,6441,_web_site_
+default,web_site,web_company_id,int,1,6,,,,,5,0,,,,,1434572787,6442,_web_site_
+default,web_site,web_company_name,string,,,,,,,7,0,3.79761904761905,5,,,1434572787,6443,_web_site_
+default,web_site,web_street_number,string,,,,,,,51,0,2.89285714285714,3,,,1434572787,6444,_web_site_
+default,web_site,web_street_name,string,,,,,,,102,0,8.94047619047619,16,,,1434572787,6445,_web_site_
+default,web_site,web_street_type,string,,,,,,,23,0,3.8452380952381,9,,,1434572787,6446,_web_site_
+default,web_site,web_suite_number,string,,,,,,,58,0,7.90476190476191,9,,,1434572787,6447,_web_site_
+default,web_site,web_city,string,,,,,,,37,0,8.73809523809524,15,,,1434572787,6448,_web_site_
+default,web_site,web_county,string,,,,,,,69,0,13.8333333333333,22,,,1434572787,6449,_web_site_
+default,web_site,web_state,string,,,,,,,33,0,2,2,,,1434572787,6450,_web_site_
+default,web_site,web_zip,string,,,,,,,56,0,5,5,,,1434572787,6451,_web_site_
+default,web_site,web_country,string,,,,,,,2,0,12.8452380952381,13,,,1434572787,6452,_web_site_
+default,web_site,web_gmt_offset,float,,,-8,-5,,,3,1,,,,,1434572787,6453,_web_site_
+default,web_site,web_tax_percentage,float,,,0,0.119999997317791,,,17,1,,,,,1434572787,6454,_web_site_
diff --git a/data/scripts/q_perf_test_init.sql b/data/scripts/q_perf_test_init.sql
new file mode 100644
index 0000000..d27215b
--- /dev/null
+++ b/data/scripts/q_perf_test_init.sql
@@ -0,0 +1,616 @@
+drop table if exists call_center;
+create external table call_center
+(
+ cc_call_center_sk int,
+ cc_call_center_id string,
+ cc_rec_start_date string,
+ cc_rec_end_date string,
+ cc_closed_date_sk int,
+ cc_open_date_sk int,
+ cc_name string,
+ cc_class string,
+ cc_employees int,
+ cc_sq_ft int,
+ cc_hours string,
+ cc_manager string,
+ cc_mkt_id int,
+ cc_mkt_class string,
+ cc_mkt_desc string,
+ cc_market_manager string,
+ cc_division int,
+ cc_division_name string,
+ cc_company int,
+ cc_company_name string,
+ cc_street_number string,
+ cc_street_name string,
+ cc_street_type string,
+ cc_suite_number string,
+ cc_city string,
+ cc_county string,
+ cc_state string,
+ cc_zip string,
+ cc_country string,
+ cc_gmt_offset decimal(5,2),
+ cc_tax_percentage decimal(5,2)
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+drop table if exists catalog_page;
+create external table catalog_page
+(
+ cp_catalog_page_sk int,
+ cp_catalog_page_id string,
+ cp_start_date_sk int,
+ cp_end_date_sk int,
+ cp_department string,
+ cp_catalog_number int,
+ cp_catalog_page_number int,
+ cp_description string,
+ cp_type string
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists catalog_returns;
+create external table catalog_returns
+(
+ cr_returned_date_sk int,
+ cr_returned_time_sk int,
+ cr_item_sk int,
+ cr_refunded_customer_sk int,
+ cr_refunded_cdemo_sk int,
+ cr_refunded_hdemo_sk int,
+ cr_refunded_addr_sk int,
+ cr_returning_customer_sk int,
+ cr_returning_cdemo_sk int,
+ cr_returning_hdemo_sk int,
+ cr_returning_addr_sk int,
+ cr_call_center_sk int,
+ cr_catalog_page_sk int,
+ cr_ship_mode_sk int,
+ cr_warehouse_sk int,
+ cr_reason_sk int,
+ cr_order_number int,
+ cr_return_quantity int,
+ cr_return_amount decimal(7,2),
+ cr_return_tax decimal(7,2),
+ cr_return_amt_inc_tax decimal(7,2),
+ cr_fee decimal(7,2),
+ cr_return_ship_cost decimal(7,2),
+ cr_refunded_cash decimal(7,2),
+ cr_reversed_charge decimal(7,2),
+ cr_store_credit decimal(7,2),
+ cr_net_loss decimal(7,2)
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists catalog_sales;
+create external table catalog_sales
+(
+ cs_sold_date_sk int,
+ cs_sold_time_sk int,
+ cs_ship_date_sk int,
+ cs_bill_customer_sk int,
+ cs_bill_cdemo_sk int,
+ cs_bill_hdemo_sk int,
+ cs_bill_addr_sk int,
+ cs_ship_customer_sk int,
+ cs_ship_cdemo_sk int,
+ cs_ship_hdemo_sk int,
+ cs_ship_addr_sk int,
+ cs_call_center_sk int,
+ cs_catalog_page_sk int,
+ cs_ship_mode_sk int,
+ cs_warehouse_sk int,
+ cs_item_sk int,
+ cs_promo_sk int,
+ cs_order_number int,
+ cs_quantity int,
+ cs_wholesale_cost decimal(7,2),
+ cs_list_price decimal(7,2),
+ cs_sales_price decimal(7,2),
+ cs_ext_discount_amt decimal(7,2),
+ cs_ext_sales_price decimal(7,2),
+ cs_ext_wholesale_cost decimal(7,2),
+ cs_ext_list_price decimal(7,2),
+ cs_ext_tax decimal(7,2),
+ cs_coupon_amt decimal(7,2),
+ cs_ext_ship_cost decimal(7,2),
+ cs_net_paid decimal(7,2),
+ cs_net_paid_inc_tax decimal(7,2),
+ cs_net_paid_inc_ship decimal(7,2),
+ cs_net_paid_inc_ship_tax decimal(7,2),
+ cs_net_profit decimal(7,2)
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists customer;
+create external table customer
+(
+ c_customer_sk int,
+ c_customer_id string,
+ c_current_cdemo_sk int,
+ c_current_hdemo_sk int,
+ c_current_addr_sk int,
+ c_first_shipto_date_sk int,
+ c_first_sales_date_sk int,
+ c_salutation string,
+ c_first_name string,
+ c_last_name string,
+ c_preferred_cust_flag string,
+ c_birth_day int,
+ c_birth_month int,
+ c_birth_year int,
+ c_birth_country string,
+ c_login string,
+ c_email_address string,
+ c_last_review_date string
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists customer_address;
+create external table customer_address
+(
+ ca_address_sk int,
+ ca_address_id string,
+ ca_street_number string,
+ ca_street_name string,
+ ca_street_type string,
+ ca_suite_number string,
+ ca_city string,
+ ca_county string,
+ ca_state string,
+ ca_zip string,
+ ca_country string,
+ ca_gmt_offset decimal(5,2),
+ ca_location_type string
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists customer_demographics;
+create external table customer_demographics
+(
+ cd_demo_sk int,
+ cd_gender string,
+ cd_marital_status string,
+ cd_education_status string,
+ cd_purchase_estimate int,
+ cd_credit_rating string,
+ cd_dep_count int,
+ cd_dep_employed_count int,
+ cd_dep_college_count int
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists date_dim;
+create external table date_dim
+(
+ d_date_sk int,
+ d_date_id string,
+ d_date string,
+ d_month_seq int,
+ d_week_seq int,
+ d_quarter_seq int,
+ d_year int,
+ d_dow int,
+ d_moy int,
+ d_dom int,
+ d_qoy int,
+ d_fy_year int,
+ d_fy_quarter_seq int,
+ d_fy_week_seq int,
+ d_day_name string,
+ d_quarter_name string,
+ d_holiday string,
+ d_weekend string,
+ d_following_holiday string,
+ d_first_dom int,
+ d_last_dom int,
+ d_same_day_ly int,
+ d_same_day_lq int,
+ d_current_day string,
+ d_current_week string,
+ d_current_month string,
+ d_current_quarter string,
+ d_current_year string
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists household_demographics;
+create external table household_demographics
+(
+ hd_demo_sk int,
+ hd_income_band_sk int,
+ hd_buy_potential string,
+ hd_dep_count int,
+ hd_vehicle_count int
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists income_band;
+create external table income_band
+(
+ ib_income_band_sk int,
+ ib_lower_bound int,
+ ib_upper_bound int
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists inventory;
+create external table inventory
+(
+ inv_date_sk int,
+ inv_item_sk int,
+ inv_warehouse_sk int,
+ inv_quantity_on_hand int
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists item;
+create external table item
+(
+ i_item_sk int,
+ i_item_id string,
+ i_rec_start_date string,
+ i_rec_end_date string,
+ i_item_desc string,
+ i_current_price decimal(7,2),
+ i_wholesale_cost decimal(7,2),
+ i_brand_id int,
+ i_brand string,
+ i_class_id int,
+ i_class string,
+ i_category_id int,
+ i_category string,
+ i_manufact_id int,
+ i_manufact string,
+ i_size string,
+ i_formulation string,
+ i_color string,
+ i_units string,
+ i_container string,
+ i_manager_id int,
+ i_product_name string
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists promotion;
+create external table promotion
+(
+ p_promo_sk int,
+ p_promo_id string,
+ p_start_date_sk int,
+ p_end_date_sk int,
+ p_item_sk int,
+ p_cost decimal(15,2),
+ p_response_target int,
+ p_promo_name string,
+ p_channel_dmail string,
+ p_channel_email string,
+ p_channel_catalog string,
+ p_channel_tv string,
+ p_channel_radio string,
+ p_channel_press string,
+ p_channel_event string,
+ p_channel_demo string,
+ p_channel_details string,
+ p_purpose string,
+ p_discount_active string
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists reason;
+create external table reason
+(
+ r_reason_sk int,
+ r_reason_id string,
+ r_reason_desc string
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists ship_mode;
+create external table ship_mode
+(
+ sm_ship_mode_sk int,
+ sm_ship_mode_id string,
+ sm_type string,
+ sm_code string,
+ sm_carrier string,
+ sm_contract string
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists store;
+create external table store
+(
+ s_store_sk int,
+ s_store_id string,
+ s_rec_start_date string,
+ s_rec_end_date string,
+ s_closed_date_sk int,
+ s_store_name string,
+ s_number_employees int,
+ s_floor_space int,
+ s_hours string,
+ s_manager string,
+ s_market_id int,
+ s_geography_class string,
+ s_market_desc string,
+ s_market_manager string,
+ s_division_id int,
+ s_division_name string,
+ s_company_id int,
+ s_company_name string,
+ s_street_number string,
+ s_street_name string,
+ s_street_type string,
+ s_suite_number string,
+ s_city string,
+ s_county string,
+ s_state string,
+ s_zip string,
+ s_country string,
+ s_gmt_offset decimal(5,2),
+ s_tax_precentage decimal(5,2)
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists store_returns;
+create external table store_returns
+(
+ sr_returned_date_sk int,
+ sr_return_time_sk int,
+ sr_item_sk int,
+ sr_customer_sk int,
+ sr_cdemo_sk int,
+ sr_hdemo_sk int,
+ sr_addr_sk int,
+ sr_store_sk int,
+ sr_reason_sk int,
+ sr_ticket_number int,
+ sr_return_quantity int,
+ sr_return_amt decimal(7,2),
+ sr_return_tax decimal(7,2),
+ sr_return_amt_inc_tax decimal(7,2),
+ sr_fee decimal(7,2),
+ sr_return_ship_cost decimal(7,2),
+ sr_refunded_cash decimal(7,2),
+ sr_reversed_charge decimal(7,2),
+ sr_store_credit decimal(7,2),
+ sr_net_loss decimal(7,2)
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists store_sales;
+create external table store_sales
+(
+ ss_sold_date_sk int,
+ ss_sold_time_sk int,
+ ss_item_sk int,
+ ss_customer_sk int,
+ ss_cdemo_sk int,
+ ss_hdemo_sk int,
+ ss_addr_sk int,
+ ss_store_sk int,
+ ss_promo_sk int,
+ ss_ticket_number int,
+ ss_quantity int,
+ ss_wholesale_cost decimal(7,2),
+ ss_list_price decimal(7,2),
+ ss_sales_price decimal(7,2),
+ ss_ext_discount_amt decimal(7,2),
+ ss_ext_sales_price decimal(7,2),
+ ss_ext_wholesale_cost decimal(7,2),
+ ss_ext_list_price decimal(7,2),
+ ss_ext_tax decimal(7,2),
+ ss_coupon_amt decimal(7,2),
+ ss_net_paid decimal(7,2),
+ ss_net_paid_inc_tax decimal(7,2),
+ ss_net_profit decimal(7,2)
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists time_dim;
+create external table time_dim
+(
+ t_time_sk int,
+ t_time_id string,
+ t_time int,
+ t_hour int,
+ t_minute int,
+ t_second int,
+ t_am_pm string,
+ t_shift string,
+ t_sub_shift string,
+ t_meal_time string
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists warehouse;
+create external table warehouse
+(
+ w_warehouse_sk int,
+ w_warehouse_id string,
+ w_warehouse_name string,
+ w_warehouse_sq_ft int,
+ w_street_number string,
+ w_street_name string,
+ w_street_type string,
+ w_suite_number string,
+ w_city string,
+ w_county string,
+ w_state string,
+ w_zip string,
+ w_country string,
+ w_gmt_offset decimal(5,2)
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists web_page;
+create external table web_page
+(
+ wp_web_page_sk int,
+ wp_web_page_id string,
+ wp_rec_start_date string,
+ wp_rec_end_date string,
+ wp_creation_date_sk int,
+ wp_access_date_sk int,
+ wp_autogen_flag string,
+ wp_customer_sk int,
+ wp_url string,
+ wp_type string,
+ wp_char_count int,
+ wp_link_count int,
+ wp_image_count int,
+ wp_max_ad_count int
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists web_returns;
+create external table web_returns
+(
+ wr_returned_date_sk int,
+ wr_returned_time_sk int,
+ wr_item_sk int,
+ wr_refunded_customer_sk int,
+ wr_refunded_cdemo_sk int,
+ wr_refunded_hdemo_sk int,
+ wr_refunded_addr_sk int,
+ wr_returning_customer_sk int,
+ wr_returning_cdemo_sk int,
+ wr_returning_hdemo_sk int,
+ wr_returning_addr_sk int,
+ wr_web_page_sk int,
+ wr_reason_sk int,
+ wr_order_number int,
+ wr_return_quantity int,
+ wr_return_amt decimal(7,2),
+ wr_return_tax decimal(7,2),
+ wr_return_amt_inc_tax decimal(7,2),
+ wr_fee decimal(7,2),
+ wr_return_ship_cost decimal(7,2),
+ wr_refunded_cash decimal(7,2),
+ wr_reversed_charge decimal(7,2),
+ wr_account_credit decimal(7,2),
+ wr_net_loss decimal(7,2)
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists web_sales;
+create external table web_sales
+(
+ ws_sold_date_sk int,
+ ws_sold_time_sk int,
+ ws_ship_date_sk int,
+ ws_item_sk int,
+ ws_bill_customer_sk int,
+ ws_bill_cdemo_sk int,
+ ws_bill_hdemo_sk int,
+ ws_bill_addr_sk int,
+ ws_ship_customer_sk int,
+ ws_ship_cdemo_sk int,
+ ws_ship_hdemo_sk int,
+ ws_ship_addr_sk int,
+ ws_web_page_sk int,
+ ws_web_site_sk int,
+ ws_ship_mode_sk int,
+ ws_warehouse_sk int,
+ ws_promo_sk int,
+ ws_order_number int,
+ ws_quantity int,
+ ws_wholesale_cost decimal(7,2),
+ ws_list_price decimal(7,2),
+ ws_sales_price decimal(7,2),
+ ws_ext_discount_amt decimal(7,2),
+ ws_ext_sales_price decimal(7,2),
+ ws_ext_wholesale_cost decimal(7,2),
+ ws_ext_list_price decimal(7,2),
+ ws_ext_tax decimal(7,2),
+ ws_coupon_amt decimal(7,2),
+ ws_ext_ship_cost decimal(7,2),
+ ws_net_paid decimal(7,2),
+ ws_net_paid_inc_tax decimal(7,2),
+ ws_net_paid_inc_ship decimal(7,2),
+ ws_net_paid_inc_ship_tax decimal(7,2),
+ ws_net_profit decimal(7,2)
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
+drop table if exists web_site;
+create external table web_site
+(
+ web_site_sk int,
+ web_site_id string,
+ web_rec_start_date string,
+ web_rec_end_date string,
+ web_name string,
+ web_open_date_sk int,
+ web_close_date_sk int,
+ web_class string,
+ web_manager string,
+ web_mkt_id int,
+ web_mkt_class string,
+ web_mkt_desc string,
+ web_market_manager string,
+ web_company_id int,
+ web_company_name string,
+ web_street_number string,
+ web_street_name string,
+ web_street_type string,
+ web_suite_number string,
+ web_city string,
+ web_county string,
+ web_state string,
+ web_zip string,
+ web_country string,
+ web_gmt_offset decimal(5,2),
+ web_tax_percentage decimal(5,2)
+)
+row format delimited fields terminated by '\t'
+STORED AS ORC tblproperties ("orc.compress"="ZLIB");
+
+
diff --git a/itests/qtest/pom.xml b/itests/qtest/pom.xml
index 8f6807a..c9058ed 100644
--- a/itests/qtest/pom.xml
+++ b/itests/qtest/pom.xml
@@ -396,6 +396,7 @@
+
@@ -441,6 +442,25 @@
initScript="${initScript}"
cleanupScript="q_test_cleanup.sql"/>
+
+
+
statements = new ArrayList(); // list of Statements, PreparedStatements
+
+ try {
+ Properties props = new Properties(); // connection properties
+ props.put("user", conf.get("javax.jdo.option.ConnectionUserName"));
+ props.put("password", conf.get("javax.jdo.option.ConnectionPassword"));
+ conn = DriverManager.getConnection(conf.get("javax.jdo.option.ConnectionURL"), props);
+ ResultSet rs = null;
+ Statement s = conn.createStatement();
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Connected to metastore database ");
+ }
+
+ String mdbPath = "../../data/files/tpcds-perf/metastore_export/";
+
+ // Setup the table column stats
+ BufferedReader br = new BufferedReader(new FileReader(new File("../../metastore/scripts/upgrade/derby/022-HIVE-11107.derby.sql")));
+ String command;
+
+ s.execute("DROP TABLE APP.TABLE_PARAMS");
+ s.execute("DROP TABLE APP.TAB_COL_STATS");
+ // Create the column stats table
+ while ((command = br.readLine()) != null) {
+ if (!command.endsWith(";")) {
+ continue;
+ }
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Going to run command : " + command);
+ }
+ try {
+ PreparedStatement psCommand = conn.prepareStatement(command.substring(0, command.length()-1));
+ statements.add(psCommand);
+ psCommand.execute();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("successfully completed " + command);
+ }
+ } catch (SQLException e) {
+ LOG.info("Got SQL Exception " + e.getMessage());
+ }
+ }
+ br.close();
+
+ File tabColStatsCsv = new File(mdbPath+"csv/TAB_COL_STATS.txt");
+ File tabParamsCsv = new File(mdbPath+"csv/TABLE_PARAMS.txt");
+
+ // Set up the foreign key constraints properly in the TAB_COL_STATS data
+ String tmpBaseDir = System.getProperty("test.tmp.dir");
+ File tmpFileLoc1 = new File(tmpBaseDir+"/TAB_COL_STATS.txt");
+ File tmpFileLoc2 = new File(tmpBaseDir+"/TABLE_PARAMS.txt");
+ FileUtils.copyFile(tabColStatsCsv, tmpFileLoc1);
+ FileUtils.copyFile(tabParamsCsv, tmpFileLoc2);
+
+ class MyComp implements Comparator {
+ @Override
+ public int compare(String str1, String str2) {
+ if (str2.length() != str1.length()) {
+ return str2.length() - str1.length();
+ }
+ return str1.compareTo(str2);
+ }
+ }
+
+ SortedMap tableNameToID = new TreeMap(new MyComp());
+
+ rs = s.executeQuery("SELECT * FROM APP.TBLS");
+ while(rs.next()) {
+ String tblName = rs.getString("TBL_NAME");
+ Integer tblId = rs.getInt("TBL_ID");
+ tableNameToID.put(tblName, tblId);
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Resultset : " + tblName + " | " + tblId);
+ }
+ }
+ for (Map.Entry entry : tableNameToID.entrySet()) {
+ String toReplace = "_" + entry.getKey() + "_" ;
+ String replacementString = ""+entry.getValue();
+ try {
+ String content1 = FileUtils.readFileToString(tmpFileLoc1, "UTF-8");
+ content1 = content1.replaceAll(toReplace, replacementString);
+ FileUtils.writeStringToFile(tmpFileLoc1, content1, "UTF-8");
+ String content2 = FileUtils.readFileToString(tmpFileLoc2, "UTF-8");
+ content2 = content2.replaceAll(toReplace, replacementString);
+ FileUtils.writeStringToFile(tmpFileLoc2, content2, "UTF-8");
+ } catch (IOException e) {
+ LOG.info("Generating file failed", e);
+ }
+ }
+
+ // Load the column stats and table params with 30 TB scale
+ String importStatement1 = "CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE_LOBS_FROM_EXTFILE(null, '" + "TAB_COL_STATS" +
+ "', '" + tmpFileLoc1.getAbsolutePath() +
+ "', ',', null, 'UTF-8', 1)";
+ String importStatement2 = "CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE_LOBS_FROM_EXTFILE(null, '" + "TABLE_PARAMS" +
+ "', '" + tmpFileLoc2.getAbsolutePath() +
+ "', ',', null, 'UTF-8', 1)";
+ try {
+ PreparedStatement psImport1 = conn.prepareStatement(importStatement1);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Going to execute : " + importStatement1);
+ }
+ statements.add(psImport1);
+ psImport1.execute();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("successfully completed " + importStatement1);
+ }
+ PreparedStatement psImport2 = conn.prepareStatement(importStatement2);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Going to execute : " + importStatement2);
+ }
+ statements.add(psImport2);
+ psImport2.execute();
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("successfully completed " + importStatement2);
+ }
+ } catch (SQLException e) {
+ LOG.info("Got SQL Exception " + e.getMessage());
+ }
+ } catch (FileNotFoundException e1) {
+ LOG.info("Got File not found Exception " + e1.getMessage());
+ } catch (IOException e1) {
+ LOG.info("Got IOException " + e1.getMessage());
+ } catch (SQLException e1) {
+ LOG.info("Got SQLException " + e1.getMessage());
+ } finally {
+ // Statements and PreparedStatements
+ int i = 0;
+ while (!statements.isEmpty()) {
+ // PreparedStatement extend Statement
+ Statement st = (Statement)statements.remove(i);
+ try {
+ if (st != null) {
+ st.close();
+ st = null;
+ }
+ } catch (SQLException sqle) {
+ }
+ }
+
+ //Connection
+ try {
+ if (conn != null) {
+ conn.close();
+ conn = null;
+ }
+ } catch (SQLException sqle) {
+ }
+ }
+ }
+
}
diff --git a/metastore/scripts/upgrade/derby/022-HIVE-11107.derby.sql b/metastore/scripts/upgrade/derby/022-HIVE-11107.derby.sql
new file mode 100644
index 0000000..ef08acb
--- /dev/null
+++ b/metastore/scripts/upgrade/derby/022-HIVE-11107.derby.sql
@@ -0,0 +1,2 @@
+CREATE TABLE "APP"."TAB_COL_STATS"("DB_NAME" VARCHAR(128) NOT NULL,"TABLE_NAME" VARCHAR(128) NOT NULL, "COLUMN_NAME" VARCHAR(1000) NOT NULL, "COLUMN_TYPE" VARCHAR(128) NOT NULL, "LONG_LOW_VALUE" BIGINT, "LONG_HIGH_VALUE" BIGINT, "DOUBLE_LOW_VALUE" DOUBLE, "DOUBLE_HIGH_VALUE" DOUBLE, "BIG_DECIMAL_LOW_VALUE" VARCHAR(4000),"BIG_DECIMAL_HIGH_VALUE" VARCHAR(4000),"NUM_DISTINCTS" BIGINT, "NUM_NULLS" BIGINT NOT NULL, "AVG_COL_LEN" DOUBLE, "MAX_COL_LEN" BIGINT, "NUM_TRUES" BIGINT, "NUM_FALSES" BIGINT, "LAST_ANALYZED" BIGINT, "CS_ID" BIGINT NOT NULL, "TBL_ID" BIGINT NOT NULL);
+CREATE TABLE "APP"."TABLE_PARAMS" ("TBL_ID" BIGINT NOT NULL, "PARAM_KEY" VARCHAR(256) NOT NULL, "PARAM_VALUE" VARCHAR(4000));
diff --git a/metastore/scripts/upgrade/derby/hive-schema-2.1.0.derby.sql b/metastore/scripts/upgrade/derby/hive-schema-2.1.0.derby.sql
index abc6bf4..f08de64 100644
--- a/metastore/scripts/upgrade/derby/hive-schema-2.1.0.derby.sql
+++ b/metastore/scripts/upgrade/derby/hive-schema-2.1.0.derby.sql
@@ -70,7 +70,7 @@ CREATE TABLE "APP"."SDS" ("SD_ID" BIGINT NOT NULL, "INPUT_FORMAT" VARCHAR(4000),
CREATE TABLE "APP"."SEQUENCE_TABLE" ("SEQUENCE_NAME" VARCHAR(256) NOT NULL, "NEXT_VAL" BIGINT NOT NULL);
-CREATE TABLE "APP"."TABLE_PARAMS" ("TBL_ID" BIGINT NOT NULL, "PARAM_KEY" VARCHAR(256) NOT NULL, "PARAM_VALUE" VARCHAR(4000));
+RUN '022-HIVE-11107.derby.sql';
CREATE TABLE "APP"."BUCKETING_COLS" ("SD_ID" BIGINT NOT NULL, "BUCKET_COL_NAME" VARCHAR(256), "INTEGER_IDX" INTEGER NOT NULL);
@@ -94,8 +94,6 @@ CREATE TABLE "APP"."MASTER_KEYS" ("KEY_ID" INTEGER NOT NULL generated always as
CREATE TABLE "APP"."DELEGATION_TOKENS" ( "TOKEN_IDENT" VARCHAR(767) NOT NULL, "TOKEN" VARCHAR(767));
-CREATE TABLE "APP"."TAB_COL_STATS"("DB_NAME" VARCHAR(128) NOT NULL,"TABLE_NAME" VARCHAR(128) NOT NULL, "COLUMN_NAME" VARCHAR(1000) NOT NULL, "COLUMN_TYPE" VARCHAR(128) NOT NULL, "LONG_LOW_VALUE" BIGINT, "LONG_HIGH_VALUE" BIGINT, "DOUBLE_LOW_VALUE" DOUBLE, "DOUBLE_HIGH_VALUE" DOUBLE, "BIG_DECIMAL_LOW_VALUE" VARCHAR(4000), "BIG_DECIMAL_HIGH_VALUE" VARCHAR(4000),"NUM_DISTINCTS" BIGINT, "NUM_NULLS" BIGINT NOT NULL, "AVG_COL_LEN" DOUBLE, "MAX_COL_LEN" BIGINT, "NUM_TRUES" BIGINT, "NUM_FALSES" BIGINT, "LAST_ANALYZED" BIGINT, "CS_ID" BIGINT NOT NULL, "TBL_ID" BIGINT NOT NULL);
-
CREATE TABLE "APP"."PART_COL_STATS"("DB_NAME" VARCHAR(128) NOT NULL,"TABLE_NAME" VARCHAR(128) NOT NULL, "PARTITION_NAME" VARCHAR(767) NOT NULL, "COLUMN_NAME" VARCHAR(1000) NOT NULL, "COLUMN_TYPE" VARCHAR(128) NOT NULL, "LONG_LOW_VALUE" BIGINT, "LONG_HIGH_VALUE" BIGINT, "DOUBLE_LOW_VALUE" DOUBLE, "DOUBLE_HIGH_VALUE" DOUBLE, "BIG_DECIMAL_LOW_VALUE" VARCHAR(4000), "BIG_DECIMAL_HIGH_VALUE" VARCHAR(4000),"NUM_DISTINCTS" BIGINT, "NUM_NULLS" BIGINT NOT NULL, "AVG_COL_LEN" DOUBLE, "MAX_COL_LEN" BIGINT, "NUM_TRUES" BIGINT, "NUM_FALSES" BIGINT, "LAST_ANALYZED" BIGINT, "CS_ID" BIGINT NOT NULL, "PART_ID" BIGINT NOT NULL);
CREATE TABLE "APP"."VERSION" ("VER_ID" BIGINT NOT NULL, "SCHEMA_VERSION" VARCHAR(127) NOT NULL, "VERSION_COMMENT" VARCHAR(255));
diff --git a/ql/src/test/queries/clientpositive/perf/query12.q b/ql/src/test/queries/clientpositive/perf/query12.q
new file mode 100644
index 0000000..89dd2de
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query12.q
@@ -0,0 +1 @@
+explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(ws_ext_sales_price) as itemrevenue ,sum(ws_ext_sales_price)*100/sum(sum(ws_ext_sales_price)) over (partition by i_class) as revenueratio from web_sales ,item ,date_dim where web_sales.ws_item_sk = item.i_item_sk and item.i_category in ('Jewelry', 'Sports', 'Books') and web_sales.ws_sold_date_sk = date_dim.d_date_sk and date_dim.d_date between '2001-01-12' and '2001-02-11' group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query13.q b/ql/src/test/queries/clientpositive/perf/query13.q
new file mode 100644
index 0000000..6f43d47
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query13.q
@@ -0,0 +1,54 @@
+set hive.mapred.mode=nonstrict;
+EXPLAIN SELECT Avg(ss_quantity) ,
+ Avg(ss_ext_sales_price) ,
+ Avg(ss_ext_wholesale_cost) ,
+ Sum(ss_ext_wholesale_cost)
+FROM store_sales ,
+ store ,
+ customer_demographics ,
+ household_demographics ,
+ customer_address ,
+ date_dim
+WHERE store.s_store_sk = store_sales.ss_store_sk
+AND store_sales.ss_sold_date_sk = date_dim.d_date_sk
+AND date_dim.d_year = 2001
+AND ((
+ store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk
+ AND customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk
+ AND customer_demographics.cd_marital_status = 'M'
+ AND customer_demographics.cd_education_status = '4 yr Degree'
+ AND store_sales.ss_sales_price BETWEEN 100.00 AND 150.00
+ AND household_demographics.hd_dep_count = 3 )
+ OR (
+ store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk
+ AND customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk
+ AND customer_demographics.cd_marital_status = 'D'
+ AND customer_demographics.cd_education_status = 'Primary'
+ AND store_sales.ss_sales_price BETWEEN 50.00 AND 100.00
+ AND household_demographics.hd_dep_count = 1 )
+ OR (
+ store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk
+ AND customer_demographics.cd_demo_sk = ss_cdemo_sk
+ AND customer_demographics.cd_marital_status = 'U'
+ AND customer_demographics.cd_education_status = 'Advanced Degree'
+ AND store_sales.ss_sales_price BETWEEN 150.00 AND 200.00
+ AND household_demographics.hd_dep_count = 1 ))
+AND ((
+ store_sales.ss_addr_sk = customer_address.ca_address_sk
+ AND customer_address.ca_country = 'United States'
+ AND customer_address.ca_state IN ('KY',
+ 'GA',
+ 'NM')
+ AND store_sales.ss_net_profit BETWEEN 100 AND 200 )
+ OR (
+ store_sales.ss_addr_sk = customer_address.ca_address_sk
+ AND customer_address.ca_country = 'United States'
+ AND customer_address.ca_state IN ('MT',
+ 'OR',
+ 'IN')
+ AND store_sales.ss_net_profit BETWEEN 150 AND 300 )
+ OR (
+ store_sales.ss_addr_sk = customer_address.ca_address_sk
+ AND customer_address.ca_country = 'United States'
+ AND customer_address.ca_state IN ('WI', 'MO', 'WV')
+ AND store_sales.ss_net_profit BETWEEN 50 AND 250 )) ;
\ No newline at end of file
diff --git a/ql/src/test/queries/clientpositive/perf/query15.q b/ql/src/test/queries/clientpositive/perf/query15.q
new file mode 100644
index 0000000..9f75410
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query15.q
@@ -0,0 +1 @@
+explain select ca_zip ,sum(cs_sales_price) from catalog_sales ,customer ,customer_address ,date_dim where catalog_sales.cs_bill_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and ( substr(ca_zip,1,5) in ('85669', '86197','88274','83405','86475', '85392', '85460', '80348', '81792') or customer_address.ca_state in ('CA','WA','GA') or catalog_sales.cs_sales_price > 500) and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and date_dim.d_qoy = 2 and date_dim.d_year = 2000 group by ca_zip order by ca_zip limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query17.q b/ql/src/test/queries/clientpositive/perf/query17.q
new file mode 100644
index 0000000..bb8a33b
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query17.q
@@ -0,0 +1 @@
+explain select i_item_id ,i_item_desc ,s_state ,count(ss_quantity) as store_sales_quantitycount ,avg(ss_quantity) as store_sales_quantityave ,stddev_samp(ss_quantity) as store_sales_quantitystdev ,stddev_samp(ss_quantity)/avg(ss_quantity) as store_sales_quantitycov ,count(sr_return_quantity) as_store_returns_quantitycount ,avg(sr_return_quantity) as_store_returns_quantityave ,stddev_samp(sr_return_quantity) as_store_returns_quantitystdev ,stddev_samp(sr_return_quantity)/avg(sr_return_quantity) as store_returns_quantitycov ,count(cs_quantity) as catalog_sales_quantitycount ,avg(cs_quantity) as catalog_sales_quantityave ,stddev_samp(cs_quantity)/avg(cs_quantity) as catalog_sales_quantitystdev ,stddev_samp(cs_quantity)/avg(cs_quantity) as catalog_sales_quantitycov from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_quarter_name = '2000Q1' and d1.d_date_sk = store_sales.ss_sold_date_sk and item.i_item_sk = store_sales.ss_item_sk and store.s_store_sk = store_sales.ss_store_sk and store_sales.ss_customer_sk = store_returns.sr_customer_sk and store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number and store_returns.sr_returned_date_sk = d2.d_date_sk and d2.d_quarter_name in ('2000Q1','2000Q2','2000Q3') and store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk and store_returns.sr_item_sk = catalog_sales.cs_item_sk and catalog_sales.cs_sold_date_sk = d3.d_date_sk and d3.d_quarter_name in ('2000Q1','2000Q2','2000Q3') group by i_item_id ,i_item_desc ,s_state order by i_item_id ,i_item_desc ,s_state limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query18.q b/ql/src/test/queries/clientpositive/perf/query18.q
new file mode 100644
index 0000000..e6061f5
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query18.q
@@ -0,0 +1 @@
+explain select i_item_id, ca_country, ca_state, ca_county, avg( cast(cs_quantity as decimal(12,2))) agg1, avg( cast(cs_list_price as decimal(12,2))) agg2, avg( cast(cs_coupon_amt as decimal(12,2))) agg3, avg( cast(cs_sales_price as decimal(12,2))) agg4, avg( cast(cs_net_profit as decimal(12,2))) agg5, avg( cast(c_birth_year as decimal(12,2))) agg6, avg( cast(cd1.cd_dep_count as decimal(12,2))) agg7 from catalog_sales, date_dim, customer_demographics cd1, item, customer, customer_address, customer_demographics cd2 where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and catalog_sales.cs_item_sk = item.i_item_sk and catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk and catalog_sales.cs_bill_customer_sk = customer.c_customer_sk and cd1.cd_gender = 'M' and cd1.cd_education_status = 'College' and customer.c_current_cdemo_sk = cd2.cd_demo_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and c_birth_month in (9,5,12,4,1,10) and d_year = 2001 and ca_state in ('ND','WI','AL' ,'NC','OK','MS','TN') group by i_item_id, ca_country, ca_state, ca_county with rollup order by ca_country, ca_state, ca_county, i_item_id limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query19.q b/ql/src/test/queries/clientpositive/perf/query19.q
new file mode 100644
index 0000000..cfb6218
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query19.q
@@ -0,0 +1 @@
+explain select i_brand_id brand_id, i_brand brand, i_manufact_id, i_manufact, sum(ss_ext_sales_price) ext_price from date_dim, store_sales, item,customer,customer_address,store where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and i_manager_id=7 and d_moy=11 and d_year=1999 and store_sales.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and substr(ca_zip,1,5) <> substr(s_zip,1,5) and store_sales.ss_store_sk = store.s_store_sk group by i_brand ,i_brand_id ,i_manufact_id ,i_manufact order by ext_price desc ,i_brand ,i_brand_id ,i_manufact_id ,i_manufact limit 100 ;
diff --git a/ql/src/test/queries/clientpositive/perf/query20.q b/ql/src/test/queries/clientpositive/perf/query20.q
new file mode 100644
index 0000000..d4ea10d
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query20.q
@@ -0,0 +1 @@
+explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(cs_ext_sales_price) as itemrevenue ,sum(cs_ext_sales_price)*100/sum(sum(cs_ext_sales_price)) over (partition by i_class) as revenueratio from catalog_sales ,item ,date_dim where catalog_sales.cs_item_sk = item.i_item_sk and i_category in ('Jewelry', 'Sports', 'Books') and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and d_date between '2001-01-12' and '2001-02-11' group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query21.q b/ql/src/test/queries/clientpositive/perf/query21.q
new file mode 100644
index 0000000..a7b157a
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query21.q
@@ -0,0 +1,26 @@
+explain select *
+ from(select w_warehouse_name
+ ,i_item_id
+ ,sum(case when (cast(d_date as date) < cast ('1998-04-08' as date))
+ then inv_quantity_on_hand
+ else 0 end) as inv_before
+ ,sum(case when (cast(d_date as date) >= cast ('1998-04-08' as date))
+ then inv_quantity_on_hand
+ else 0 end) as inv_after
+ from inventory
+ ,warehouse
+ ,item
+ ,date_dim
+ where i_current_price between 0.99 and 1.49
+ and item.i_item_sk = inventory.inv_item_sk
+ and inventory.inv_warehouse_sk = warehouse.w_warehouse_sk
+ and inventory.inv_date_sk = date_dim.d_date_sk
+ and d_date between '1998-03-09' and '1998-05-07'
+ group by w_warehouse_name, i_item_id) x
+ where (case when inv_before > 0
+ then inv_after / inv_before
+ else null
+ end) between 2.0/3.0 and 3.0/2.0
+ order by w_warehouse_name
+ ,i_item_id
+ limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query22.q b/ql/src/test/queries/clientpositive/perf/query22.q
new file mode 100644
index 0000000..17cece2
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query22.q
@@ -0,0 +1 @@
+explain select i_product_name ,i_brand ,i_class ,i_category ,avg(inv_quantity_on_hand) qoh from inventory ,date_dim ,item ,warehouse where inventory.inv_date_sk=date_dim.d_date_sk and inventory.inv_item_sk=item.i_item_sk and inventory.inv_warehouse_sk = warehouse.w_warehouse_sk and date_dim.d_month_seq between 1193 and 1193 + 11 group by i_product_name ,i_brand ,i_class ,i_category with rollup order by qoh, i_product_name, i_brand, i_class, i_category limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query25.q b/ql/src/test/queries/clientpositive/perf/query25.q
new file mode 100644
index 0000000..80185ab
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query25.q
@@ -0,0 +1 @@
+explain select i_item_id ,i_item_desc ,s_store_id ,s_store_name ,sum(ss_net_profit) as store_sales_profit ,sum(sr_net_loss) as store_returns_loss ,sum(cs_net_profit) as catalog_sales_profit from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_moy = 4 and d1.d_year = 1998 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_moy between 4 and 10 and d2.d_year = 1998 and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_moy between 4 and 10 and d3.d_year = 1998 group by i_item_id ,i_item_desc ,s_store_id ,s_store_name order by i_item_id ,i_item_desc ,s_store_id ,s_store_name limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query26.q b/ql/src/test/queries/clientpositive/perf/query26.q
new file mode 100644
index 0000000..0e81120
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query26.q
@@ -0,0 +1 @@
+explain select i_item_id, avg(cs_quantity) agg1, avg(cs_list_price) agg2, avg(cs_coupon_amt) agg3, avg(cs_sales_price) agg4 from catalog_sales, customer_demographics, date_dim, item, promotion where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and catalog_sales.cs_item_sk = item.i_item_sk and catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk and catalog_sales.cs_promo_sk = promotion.p_promo_sk and cd_gender = 'F' and cd_marital_status = 'W' and cd_education_status = 'Primary' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 1998 group by i_item_id order by i_item_id limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query27.q b/ql/src/test/queries/clientpositive/perf/query27.q
new file mode 100644
index 0000000..58be664
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query27.q
@@ -0,0 +1 @@
+explain select i_item_id, s_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 store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_item_sk = item.i_item_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk and customer_demographics.cd_gender = 'F' and customer_demographics.cd_marital_status = 'D' and customer_demographics.cd_education_status = 'Unknown' and date_dim.d_year = 1998 and store.s_state in ('KS','AL', 'MN', 'AL', 'SC', 'VT') group by i_item_id, s_state order by i_item_id ,s_state limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query28.q b/ql/src/test/queries/clientpositive/perf/query28.q
new file mode 100644
index 0000000..2a5f092
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query28.q
@@ -0,0 +1,52 @@
+set hive.mapred.mode=nonstrict;
+explain select *
+from (select avg(ss_list_price) B1_LP
+ ,count(ss_list_price) B1_CNT
+ ,count(distinct ss_list_price) B1_CNTD
+ from store_sales
+ where ss_quantity between 0 and 5
+ and (ss_list_price between 11 and 11+10
+ or ss_coupon_amt between 460 and 460+1000
+ or ss_wholesale_cost between 14 and 14+20)) B1,
+ (select avg(ss_list_price) B2_LP
+ ,count(ss_list_price) B2_CNT
+ ,count(distinct ss_list_price) B2_CNTD
+ from store_sales
+ where ss_quantity between 6 and 10
+ and (ss_list_price between 91 and 91+10
+ or ss_coupon_amt between 1430 and 1430+1000
+ or ss_wholesale_cost between 32 and 32+20)) B2,
+ (select avg(ss_list_price) B3_LP
+ ,count(ss_list_price) B3_CNT
+ ,count(distinct ss_list_price) B3_CNTD
+ from store_sales
+ where ss_quantity between 11 and 15
+ and (ss_list_price between 66 and 66+10
+ or ss_coupon_amt between 920 and 920+1000
+ or ss_wholesale_cost between 4 and 4+20)) B3,
+ (select avg(ss_list_price) B4_LP
+ ,count(ss_list_price) B4_CNT
+ ,count(distinct ss_list_price) B4_CNTD
+ from store_sales
+ where ss_quantity between 16 and 20
+ and (ss_list_price between 142 and 142+10
+ or ss_coupon_amt between 3054 and 3054+1000
+ or ss_wholesale_cost between 80 and 80+20)) B4,
+ (select avg(ss_list_price) B5_LP
+ ,count(ss_list_price) B5_CNT
+ ,count(distinct ss_list_price) B5_CNTD
+ from store_sales
+ where ss_quantity between 21 and 25
+ and (ss_list_price between 135 and 135+10
+ or ss_coupon_amt between 14180 and 14180+1000
+ or ss_wholesale_cost between 38 and 38+20)) B5,
+ (select avg(ss_list_price) B6_LP
+ ,count(ss_list_price) B6_CNT
+ ,count(distinct ss_list_price) B6_CNTD
+ from store_sales
+ where ss_quantity between 26 and 30
+ and (ss_list_price between 28 and 28+10
+ or ss_coupon_amt between 2513 and 2513+1000
+ or ss_wholesale_cost between 42 and 42+20)) B6
+limit 100;
+
diff --git a/ql/src/test/queries/clientpositive/perf/query29.q b/ql/src/test/queries/clientpositive/perf/query29.q
new file mode 100644
index 0000000..1634b1f
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query29.q
@@ -0,0 +1 @@
+explain select i_item_id ,i_item_desc ,s_store_id ,s_store_name ,sum(ss_quantity) as store_sales_quantity ,sum(sr_return_quantity) as store_returns_quantity ,sum(cs_quantity) as catalog_sales_quantity from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_moy = 2 and d1.d_year = 2000 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_moy between 2 and 2 + 3 and d2.d_year = 2000 and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_year in (2000,2000+1,2000+2) group by i_item_id ,i_item_desc ,s_store_id ,s_store_name order by i_item_id ,i_item_desc ,s_store_id ,s_store_name limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query3.q b/ql/src/test/queries/clientpositive/perf/query3.q
new file mode 100644
index 0000000..47dfac5
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query3.q
@@ -0,0 +1 @@
+explain select dt.d_year ,item.i_brand_id brand_id ,item.i_brand brand ,sum(ss_ext_sales_price) sum_agg from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manufact_id = 436 and dt.d_moy=12 group by dt.d_year ,item.i_brand ,item.i_brand_id order by dt.d_year ,sum_agg desc ,brand_id limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query31.q b/ql/src/test/queries/clientpositive/perf/query31.q
new file mode 100644
index 0000000..d448dc3
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query31.q
@@ -0,0 +1,2 @@
+set hive.mapred.mode=nonstrict;
+explain with ss as (select ca_county,d_qoy, d_year,sum(ss_ext_sales_price) as store_sales from store_sales,date_dim,customer_address where ss_sold_date_sk = d_date_sk and ss_addr_sk=ca_address_sk group by ca_county,d_qoy, d_year), ws as (select ca_county,d_qoy, d_year,sum(ws_ext_sales_price) as web_sales from web_sales,date_dim,customer_address where ws_sold_date_sk = d_date_sk and ws_bill_addr_sk=ca_address_sk group by ca_county,d_qoy, d_year) select ss1.ca_county ,ss1.d_year ,ws2.web_sales/ws1.web_sales web_q1_q2_increase ,ss2.store_sales/ss1.store_sales store_q1_q2_increase ,ws3.web_sales/ws2.web_sales web_q2_q3_increase ,ss3.store_sales/ss2.store_sales store_q2_q3_increase from ss ss1 ,ss ss2 ,ss ss3 ,ws ws1 ,ws ws2 ,ws ws3 where ss1.d_qoy = 1 and ss1.d_year = 1998 and ss1.ca_county = ss2.ca_county and ss2.d_qoy = 2 and ss2.d_year = 1998 and ss2.ca_county = ss3.ca_county and ss3.d_qoy = 3 and ss3.d_year = 1998 and ss1.ca_county = ws1.ca_county and ws1.d_qoy = 1 and ws1.d_year = 1998 and ws1.ca_county = ws2.ca_county and ws2.d_qoy = 2 and ws2.d_year = 1998 and ws1.ca_county = ws3.ca_county and ws3.d_qoy = 3 and ws3.d_year =1998 and case when ws1.web_sales > 0 then ws2.web_sales/ws1.web_sales else null end > case when ss1.store_sales > 0 then ss2.store_sales/ss1.store_sales else null end and case when ws2.web_sales > 0 then ws3.web_sales/ws2.web_sales else null end > case when ss2.store_sales > 0 then ss3.store_sales/ss2.store_sales else null end order by web_q1_q2_increase;
diff --git a/ql/src/test/queries/clientpositive/perf/query32.q b/ql/src/test/queries/clientpositive/perf/query32.q
new file mode 100644
index 0000000..ceb2ddb
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query32.q
@@ -0,0 +1,19 @@
+explain SELECT sum(cs1.cs_ext_discount_amt) as excess_discount_amount
+FROM (SELECT cs.cs_item_sk as cs_item_sk,
+ cs.cs_ext_discount_amt as cs_ext_discount_amt
+ FROM catalog_sales cs
+ JOIN date_dim d ON (d.d_date_sk = cs.cs_sold_date_sk)
+ WHERE d.d_date between '2000-01-27' and '2000-04-27') cs1
+JOIN item i ON (i.i_item_sk = cs1.cs_item_sk)
+JOIN (SELECT cs2.cs_item_sk as cs_item_sk,
+ 1.3 * avg(cs_ext_discount_amt) as avg_cs_ext_discount_amt
+ FROM (SELECT cs.cs_item_sk as cs_item_sk,
+ cs.cs_ext_discount_amt as cs_ext_discount_amt
+ FROM catalog_sales cs
+ JOIN date_dim d ON (d.d_date_sk = cs.cs_sold_date_sk)
+ WHERE d.d_date between '2000-01-27' and '2000-04-27') cs2
+ GROUP BY cs2.cs_item_sk) tmp1
+ON (i.i_item_sk = tmp1.cs_item_sk)
+WHERE i.i_manufact_id = 436 and
+ cs1.cs_ext_discount_amt > tmp1.avg_cs_ext_discount_amt;
+
diff --git a/ql/src/test/queries/clientpositive/perf/query34.q b/ql/src/test/queries/clientpositive/perf/query34.q
new file mode 100644
index 0000000..5c3efe1
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query34.q
@@ -0,0 +1,2 @@
+set hive.mapred.mode=nonstrict;
+explain select c_last_name ,c_first_name ,c_salutation ,c_preferred_cust_flag ,ss_ticket_number ,cnt from (select ss_ticket_number ,ss_customer_sk ,count(*) cnt from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and (date_dim.d_dom between 1 and 3 or date_dim.d_dom between 25 and 28) and (household_demographics.hd_buy_potential = '1001-5000' or household_demographics.hd_buy_potential = '5001-10000') and household_demographics.hd_vehicle_count > 0 and (case when household_demographics.hd_vehicle_count > 0 then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end) > 1.2 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_county in ('Kittitas County','Adams County','Richland County','Furnas County', 'Orange County','Appanoose County','Franklin Parish','Tehama County') group by ss_ticket_number,ss_customer_sk) dn,customer where dn.ss_customer_sk = customer.c_customer_sk and cnt between 15 and 20 order by c_last_name,c_first_name,c_salutation,c_preferred_cust_flag desc;
diff --git a/ql/src/test/queries/clientpositive/perf/query39.q b/ql/src/test/queries/clientpositive/perf/query39.q
new file mode 100644
index 0000000..c9f8f2b
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query39.q
@@ -0,0 +1,2 @@
+set hive.mapred.mode=nonstrict;
+explain with inv as (select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stdev,mean, case mean when 0 then null else stdev/mean end cov from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean from inventory ,item ,warehouse ,date_dim where inv_item_sk = i_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_year =1999 group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo where case mean when 0 then 0 else stdev/mean end > 1) select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov from inv inv1,inv inv2 where inv1.i_item_sk = inv2.i_item_sk and inv1.w_warehouse_sk = inv2.w_warehouse_sk and inv1.d_moy=3 and inv2.d_moy=3+1 order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov ,inv2.d_moy,inv2.mean, inv2.cov ; with inv as (select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stdev,mean, case mean when 0 then null else stdev/mean end cov from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean from inventory ,item ,warehouse ,date_dim where inv_item_sk = i_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_year =1999 group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo where case mean when 0 then 0 else stdev/mean end > 1) select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov from inv inv1,inv inv2 where inv1.i_item_sk = inv2.i_item_sk and inv1.w_warehouse_sk = inv2.w_warehouse_sk and inv1.d_moy=3 and inv2.d_moy=3+1 and inv1.cov > 1.5 order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov ,inv2.d_moy,inv2.mean, inv2.cov ;
diff --git a/ql/src/test/queries/clientpositive/perf/query40.q b/ql/src/test/queries/clientpositive/perf/query40.q
new file mode 100644
index 0000000..2a6c273
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query40.q
@@ -0,0 +1 @@
+explain select w_state ,i_item_id ,sum(case when (cast(d_date as date) < cast ('1998-04-08' as date)) then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_before ,sum(case when (cast(d_date as date) >= cast ('1998-04-08' as date)) then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_after from catalog_sales left outer join catalog_returns on (catalog_sales.cs_order_number = catalog_returns.cr_order_number and catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) ,warehouse ,item ,date_dim where i_current_price between 0.99 and 1.49 and item.i_item_sk = catalog_sales.cs_item_sk and catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and date_dim.d_date between '1998-03-09' and '1998-05-08' group by w_state,i_item_id order by w_state,i_item_id limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query42.q b/ql/src/test/queries/clientpositive/perf/query42.q
new file mode 100644
index 0000000..c4b115b
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query42.q
@@ -0,0 +1 @@
+explain select dt.d_year ,item.i_category_id ,item.i_category ,sum(ss_ext_sales_price) as s from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manager_id = 1 and dt.d_moy=12 and dt.d_year=1998 group by dt.d_year ,item.i_category_id ,item.i_category order by s desc,dt.d_year ,item.i_category_id ,item.i_category limit 100 ;
diff --git a/ql/src/test/queries/clientpositive/perf/query43.q b/ql/src/test/queries/clientpositive/perf/query43.q
new file mode 100644
index 0000000..f1c22e8
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query43.q
@@ -0,0 +1 @@
+explain select s_store_name, s_store_id, sum(case when (d_day_name='Sunday') then ss_sales_price else null end) sun_sales, sum(case when (d_day_name='Monday') then ss_sales_price else null end) mon_sales, sum(case when (d_day_name='Tuesday') then ss_sales_price else null end) tue_sales, sum(case when (d_day_name='Wednesday') then ss_sales_price else null end) wed_sales, sum(case when (d_day_name='Thursday') then ss_sales_price else null end) thu_sales, sum(case when (d_day_name='Friday') then ss_sales_price else null end) fri_sales, sum(case when (d_day_name='Saturday') then ss_sales_price else null end) sat_sales from date_dim, store_sales, store where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store.s_store_sk = store_sales.ss_store_sk and s_gmt_offset = -6 and d_year = 1998 group by s_store_name, s_store_id order by s_store_name, s_store_id,sun_sales,mon_sales,tue_sales,wed_sales,thu_sales,fri_sales,sat_sales limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query45.q b/ql/src/test/queries/clientpositive/perf/query45.q
new file mode 100644
index 0000000..0b34bfd
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query45.q
@@ -0,0 +1 @@
+explain select ca_zip, ca_county, sum(ws_sales_price) from web_sales JOIN customer ON web_sales.ws_bill_customer_sk = customer.c_customer_sk JOIN customer_address ON customer.c_current_addr_sk = customer_address.ca_address_sk JOIN date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk JOIN item ON web_sales.ws_item_sk = item.i_item_sk where ( item.i_item_id in (select i_item_id from item i2 where i2.i_item_sk in (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) ) ) and d_qoy = 2 and d_year = 2000 group by ca_zip, ca_county order by ca_zip, ca_county limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query46.q b/ql/src/test/queries/clientpositive/perf/query46.q
new file mode 100644
index 0000000..3e8711f
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query46.q
@@ -0,0 +1 @@
+explain select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,amt,profit from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_coupon_amt) amt ,sum(ss_net_profit) profit from store_sales,date_dim,store,household_demographics,customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and (household_demographics.hd_dep_count = 4 or household_demographics.hd_vehicle_count= 2) and date_dim.d_dow in (6,0) and date_dim.d_year in (1998,1998+1,1998+2) and store.s_city in ('Rosedale','Bethlehem','Clinton','Clifton','Springfield') group by ss_ticket_number,ss_customer_sk,ss_addr_sk,ca_city) dn,customer,customer_address current_addr where dn.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query48.q b/ql/src/test/queries/clientpositive/perf/query48.q
new file mode 100644
index 0000000..a02f630
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query48.q
@@ -0,0 +1,2 @@
+set hive.mapred.mode=nonstrict;
+explain select sum (ss_quantity) from store_sales, store, customer_demographics, customer_address, date_dim where store.s_store_sk = store_sales.ss_store_sk and store_sales.ss_sold_date_sk = date_dim.d_date_sk and d_year = 1998 and ( ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 100.00 and 150.00 ) or ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 50.00 and 100.00 ) or ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 150.00 and 200.00 ) ) and ( ( store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('KY', 'GA', 'NM') and ss_net_profit between 0 and 2000 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('MT', 'OR', 'IN') and ss_net_profit between 150 and 3000 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('WI', 'MO', 'WV') and ss_net_profit between 50 and 25000 ) ) ;
diff --git a/ql/src/test/queries/clientpositive/perf/query50.q b/ql/src/test/queries/clientpositive/perf/query50.q
new file mode 100644
index 0000000..e4bdf0a
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query50.q
@@ -0,0 +1,58 @@
+explain
+select
+ s_store_name
+ ,s_company_id
+ ,s_street_number
+ ,s_street_name
+ ,s_street_type
+ ,s_suite_number
+ ,s_city
+ ,s_county
+ ,s_state
+ ,s_zip
+ ,sum(case when (sr_returned_date_sk - ss_sold_date_sk <= 30 ) then 1 else 0 end) as 30days
+ ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 30) and
+ (sr_returned_date_sk - ss_sold_date_sk <= 60) then 1 else 0 end ) as 3160days
+ ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 60) and
+ (sr_returned_date_sk - ss_sold_date_sk <= 90) then 1 else 0 end) as 6190days
+ ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 90) and
+ (sr_returned_date_sk - ss_sold_date_sk <= 120) then 1 else 0 end) as 91120days
+ ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 120) then 1 else 0 end) as 120days
+from
+ store_sales
+ ,store_returns
+ ,store
+ ,date_dim d1
+ ,date_dim d2
+where
+ d2.d_year = 2000
+and d2.d_moy = 9
+and store_sales.ss_ticket_number = store_returns.sr_ticket_number
+and store_sales.ss_item_sk = store_returns.sr_item_sk
+and store_sales.ss_sold_date_sk = d1.d_date_sk
+and sr_returned_date_sk = d2.d_date_sk
+and store_sales.ss_customer_sk = store_returns.sr_customer_sk
+and store_sales.ss_store_sk = store.s_store_sk
+group by
+ s_store_name
+ ,s_company_id
+ ,s_street_number
+ ,s_street_name
+ ,s_street_type
+ ,s_suite_number
+ ,s_city
+ ,s_county
+ ,s_state
+ ,s_zip
+order by s_store_name
+ ,s_company_id
+ ,s_street_number
+ ,s_street_name
+ ,s_street_type
+ ,s_suite_number
+ ,s_city
+ ,s_county
+ ,s_state
+ ,s_zip
+limit 100;
+
diff --git a/ql/src/test/queries/clientpositive/perf/query51.q b/ql/src/test/queries/clientpositive/perf/query51.q
new file mode 100644
index 0000000..984280a
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query51.q
@@ -0,0 +1,42 @@
+explain WITH web_v1 as (
+select
+ ws_item_sk item_sk, d_date, sum(ws_sales_price),
+ sum(sum(ws_sales_price))
+ over (partition by ws_item_sk order by d_date rows between unbounded preceding and current row) cume_sales
+from web_sales
+ ,date_dim
+where ws_sold_date_sk=d_date_sk
+ and d_month_seq between 1193 and 1193+11
+ and ws_item_sk is not NULL
+group by ws_item_sk, d_date),
+store_v1 as (
+select
+ ss_item_sk item_sk, d_date, sum(ss_sales_price),
+ sum(sum(ss_sales_price))
+ over (partition by ss_item_sk order by d_date rows between unbounded preceding and current row) cume_sales
+from store_sales
+ ,date_dim
+where ss_sold_date_sk=d_date_sk
+ and d_month_seq between 1193 and 1193+11
+ and ss_item_sk is not NULL
+group by ss_item_sk, d_date)
+ select *
+from (select item_sk
+ ,d_date
+ ,web_sales
+ ,store_sales
+ ,max(web_sales)
+ over (partition by item_sk order by d_date rows between unbounded preceding and current row) web_cumulative
+ ,max(store_sales)
+ over (partition by item_sk order by d_date rows between unbounded preceding and current row) store_cumulative
+ from (select case when web.item_sk is not null then web.item_sk else store.item_sk end item_sk
+ ,case when web.d_date is not null then web.d_date else store.d_date end d_date
+ ,web.cume_sales web_sales
+ ,store.cume_sales store_sales
+ from web_v1 web full outer join store_v1 store on (web.item_sk = store.item_sk
+ and web.d_date = store.d_date)
+ )x )y
+where web_cumulative > store_cumulative
+order by item_sk
+ ,d_date
+limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query52.q b/ql/src/test/queries/clientpositive/perf/query52.q
new file mode 100644
index 0000000..24d0ac3
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query52.q
@@ -0,0 +1 @@
+explain select dt.d_year ,item.i_brand_id brand_id ,item.i_brand brand ,sum(ss_ext_sales_price) ext_price from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manager_id = 1 and dt.d_moy=12 and dt.d_year=1998 group by dt.d_year ,item.i_brand ,item.i_brand_id order by dt.d_year ,ext_price desc ,brand_id limit 100 ;
diff --git a/ql/src/test/queries/clientpositive/perf/query54.q b/ql/src/test/queries/clientpositive/perf/query54.q
new file mode 100644
index 0000000..b1a3e83
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query54.q
@@ -0,0 +1 @@
+explain with my_customers as ( select c_customer_sk , c_current_addr_sk from ( select cs_sold_date_sk sold_date_sk, cs_bill_customer_sk customer_sk, cs_item_sk item_sk from catalog_sales union all select ws_sold_date_sk sold_date_sk, ws_bill_customer_sk customer_sk, ws_item_sk item_sk from web_sales ) cs_or_ws_sales, item, date_dim, customer where sold_date_sk = d_date_sk and item_sk = i_item_sk and i_category = 'Jewelry' and i_class = 'football' and c_customer_sk = cs_or_ws_sales.customer_sk and d_moy = 3 and d_year = 2000 group by c_customer_sk , c_current_addr_sk ) , my_revenue as ( select c_customer_sk, sum(ss_ext_sales_price) as revenue from my_customers, store_sales, customer_address, store, date_dim where c_current_addr_sk = ca_address_sk and ca_county = s_county and ca_state = s_state and ss_sold_date_sk = d_date_sk and c_customer_sk = ss_customer_sk and d_month_seq between (1203) and (1205) group by c_customer_sk ) , segments as (select cast((revenue/50) as int) as segment from my_revenue ) select segment, count(*) as num_customers, segment*50 as segment_base from segments group by segment order by segment, num_customers limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query55.q b/ql/src/test/queries/clientpositive/perf/query55.q
new file mode 100644
index 0000000..644ba1a
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query55.q
@@ -0,0 +1 @@
+explain select i_brand_id brand_id, i_brand brand, sum(ss_ext_sales_price) ext_price from date_dim, store_sales, item where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and i_manager_id=36 and d_moy=12 and d_year=2001 group by i_brand, i_brand_id order by ext_price desc, i_brand_id limit 100 ;
diff --git a/ql/src/test/queries/clientpositive/perf/query56.q b/ql/src/test/queries/clientpositive/perf/query56.q
new file mode 100644
index 0000000..5f5119e
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query56.q
@@ -0,0 +1,65 @@
+explain with ss as (
+ select i_item_id,sum(ss_ext_sales_price) total_sales
+ from
+ store_sales,
+ date_dim,
+ customer_address,
+ item
+ where item.i_item_id in (select
+ i.i_item_id
+from item i
+where i_color in ('purple','burlywood','indian'))
+ and ss_item_sk = i_item_sk
+ and ss_sold_date_sk = d_date_sk
+ and d_year = 2001
+ and d_moy = 1
+ and ss_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id),
+ cs as (
+ select i_item_id,sum(cs_ext_sales_price) total_sales
+ from
+ catalog_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ item.i_item_id in (select
+ i.i_item_id
+from item i
+where i_color in ('purple','burlywood','indian'))
+ and cs_item_sk = i_item_sk
+ and cs_sold_date_sk = d_date_sk
+ and d_year = 2001
+ and d_moy = 1
+ and cs_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id),
+ ws as (
+ select i_item_id,sum(ws_ext_sales_price) total_sales
+ from
+ web_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ item.i_item_id in (select
+ i.i_item_id
+from item i
+where i_color in ('purple','burlywood','indian'))
+ and ws_item_sk = i_item_sk
+ and ws_sold_date_sk = d_date_sk
+ and d_year = 2001
+ and d_moy = 1
+ and ws_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id)
+ select i_item_id ,sum(total_sales) total_sales
+ from (select * from ss
+ union all
+ select * from cs
+ union all
+ select * from ws) tmp1
+ group by i_item_id
+ order by total_sales
+ limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query58.q b/ql/src/test/queries/clientpositive/perf/query58.q
new file mode 100644
index 0000000..d392ded
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query58.q
@@ -0,0 +1,47 @@
+explain select ss_items.item_id
+ ,ss_item_rev
+ ,ss_item_rev/(ss_item_rev+cs_item_rev+ws_item_rev)/3 * 100 ss_dev
+ ,cs_item_rev
+ ,cs_item_rev/(ss_item_rev+cs_item_rev+ws_item_rev)/3 * 100 cs_dev
+ ,ws_item_rev
+ ,ws_item_rev/(ss_item_rev+cs_item_rev+ws_item_rev)/3 * 100 ws_dev
+ ,(ss_item_rev+cs_item_rev+ws_item_rev)/3 average
+FROM
+( select i_item_id item_id ,sum(ss_ext_sales_price) as ss_item_rev
+ from store_sales
+ JOIN item ON store_sales.ss_item_sk = item.i_item_sk
+ JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk
+ JOIN (select d1.d_date
+ from date_dim d1 JOIN date_dim d2 ON d1.d_week_seq = d2.d_week_seq
+ where d2.d_date = '1998-08-04') sub ON date_dim.d_date = sub.d_date
+ group by i_item_id ) ss_items
+JOIN
+( select i_item_id item_id ,sum(cs_ext_sales_price) as cs_item_rev
+ from catalog_sales
+ JOIN item ON catalog_sales.cs_item_sk = item.i_item_sk
+ JOIN date_dim ON catalog_sales.cs_sold_date_sk = date_dim.d_date_sk
+ JOIN (select d1.d_date
+ from date_dim d1 JOIN date_dim d2 ON d1.d_week_seq = d2.d_week_seq
+ where d2.d_date = '1998-08-04') sub ON date_dim.d_date = sub.d_date
+ group by i_item_id ) cs_items
+ON ss_items.item_id=cs_items.item_id
+JOIN
+( select i_item_id item_id ,sum(ws_ext_sales_price) as ws_item_rev
+ from web_sales
+ JOIN item ON web_sales.ws_item_sk = item.i_item_sk
+ JOIN date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk
+ JOIN (select d1.d_date
+ from date_dim d1 JOIN date_dim d2 ON d1.d_week_seq = d2.d_week_seq
+ where d2.d_date = '1998-08-04') sub ON date_dim.d_date = sub.d_date
+ group by i_item_id ) ws_items
+ON ss_items.item_id=ws_items.item_id
+ where
+ ss_item_rev between 0.9 * cs_item_rev and 1.1 * cs_item_rev
+ and ss_item_rev between 0.9 * ws_item_rev and 1.1 * ws_item_rev
+ and cs_item_rev between 0.9 * ss_item_rev and 1.1 * ss_item_rev
+ and cs_item_rev between 0.9 * ws_item_rev and 1.1 * ws_item_rev
+ and ws_item_rev between 0.9 * ss_item_rev and 1.1 * ss_item_rev
+ and ws_item_rev between 0.9 * cs_item_rev and 1.1 * cs_item_rev
+ order by item_id ,ss_item_rev
+ limit 100;
+
diff --git a/ql/src/test/queries/clientpositive/perf/query60.q b/ql/src/test/queries/clientpositive/perf/query60.q
new file mode 100644
index 0000000..1b3c3a9
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query60.q
@@ -0,0 +1,75 @@
+explain with ss as (
+ select
+ i_item_id,sum(ss_ext_sales_price) total_sales
+ from
+ store_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ item.i_item_id in (select
+ i.i_item_id
+from
+ item i
+where i_category in ('Children'))
+ and ss_item_sk = i_item_sk
+ and ss_sold_date_sk = d_date_sk
+ and d_year = 1999
+ and d_moy = 9
+ and ss_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id),
+ cs as (
+ select
+ i_item_id,sum(cs_ext_sales_price) total_sales
+ from
+ catalog_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ item.i_item_id in (select
+ i.i_item_id
+from
+ item i
+where i_category in ('Children'))
+ and cs_item_sk = i_item_sk
+ and cs_sold_date_sk = d_date_sk
+ and d_year = 1999
+ and d_moy = 9
+ and cs_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id),
+ ws as (
+ select
+ i_item_id,sum(ws_ext_sales_price) total_sales
+ from
+ web_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ item.i_item_id in (select
+ i.i_item_id
+from
+ item i
+where i_category in ('Children'))
+ and ws_item_sk = i_item_sk
+ and ws_sold_date_sk = d_date_sk
+ and d_year = 1999
+ and d_moy = 9
+ and ws_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id)
+ select
+ i_item_id
+,sum(total_sales) total_sales
+ from (select * from ss
+ union all
+ select * from cs
+ union all
+ select * from ws) tmp1
+ group by i_item_id
+ order by i_item_id
+ ,total_sales
+ limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query64.q b/ql/src/test/queries/clientpositive/perf/query64.q
new file mode 100644
index 0000000..13ebf4a
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query64.q
@@ -0,0 +1,2 @@
+set hive.mapred.mode=nonstrict;
+explain select cs1.product_name ,cs1.store_name ,cs1.store_zip ,cs1.b_street_number ,cs1.b_streen_name ,cs1.b_city ,cs1.b_zip ,cs1.c_street_number ,cs1.c_street_name ,cs1.c_city ,cs1.c_zip ,cs1.syear ,cs1.cnt ,cs1.s1 ,cs1.s2 ,cs1.s3 ,cs2.s1 ,cs2.s2 ,cs2.s3 ,cs2.syear ,cs2.cnt from (select i_product_name as product_name ,i_item_sk as item_sk ,s_store_name as store_name ,s_zip as store_zip ,ad1.ca_street_number as b_street_number ,ad1.ca_street_name as b_streen_name ,ad1.ca_city as b_city ,ad1.ca_zip as b_zip ,ad2.ca_street_number as c_street_number ,ad2.ca_street_name as c_street_name ,ad2.ca_city as c_city ,ad2.ca_zip as c_zip ,d1.d_year as syear ,d2.d_year as fsyear ,d3.d_year as s2year ,count(*) as cnt ,sum(ss_wholesale_cost) as s1 ,sum(ss_list_price) as s2 ,sum(ss_coupon_amt) as s3 FROM store_sales JOIN store_returns ON store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk JOIN date_dim d1 ON store_sales.ss_sold_date_sk = d1.d_date_sk JOIN date_dim d2 ON customer.c_first_sales_date_sk = d2.d_date_sk JOIN date_dim d3 ON customer.c_first_shipto_date_sk = d3.d_date_sk JOIN store ON store_sales.ss_store_sk = store.s_store_sk JOIN customer_demographics cd1 ON store_sales.ss_cdemo_sk= cd1.cd_demo_sk JOIN customer_demographics cd2 ON customer.c_current_cdemo_sk = cd2.cd_demo_sk JOIN promotion ON store_sales.ss_promo_sk = promotion.p_promo_sk JOIN household_demographics hd1 ON store_sales.ss_hdemo_sk = hd1.hd_demo_sk JOIN household_demographics hd2 ON customer.c_current_hdemo_sk = hd2.hd_demo_sk JOIN customer_address ad1 ON store_sales.ss_addr_sk = ad1.ca_address_sk JOIN customer_address ad2 ON customer.c_current_addr_sk = ad2.ca_address_sk JOIN income_band ib1 ON hd1.hd_income_band_sk = ib1.ib_income_band_sk JOIN income_band ib2 ON hd2.hd_income_band_sk = ib2.ib_income_band_sk JOIN item ON store_sales.ss_item_sk = item.i_item_sk JOIN (select cs_item_sk ,sum(cs_ext_list_price) as sale,sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit) as refund from catalog_sales JOIN catalog_returns ON catalog_sales.cs_item_sk = catalog_returns.cr_item_sk and catalog_sales.cs_order_number = catalog_returns.cr_order_number group by cs_item_sk having sum(cs_ext_list_price)>2*sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit)) cs_ui ON store_sales.ss_item_sk = cs_ui.cs_item_sk WHERE cd1.cd_marital_status <> cd2.cd_marital_status and i_color in ('maroon','burnished','dim','steel','navajo','chocolate') and i_current_price between 35 and 35 + 10 and i_current_price between 35 + 1 and 35 + 15 group by i_product_name ,i_item_sk ,s_store_name ,s_zip ,ad1.ca_street_number ,ad1.ca_street_name ,ad1.ca_city ,ad1.ca_zip ,ad2.ca_street_number ,ad2.ca_street_name ,ad2.ca_city ,ad2.ca_zip ,d1.d_year ,d2.d_year ,d3.d_year ) cs1 JOIN (select i_product_name as product_name ,i_item_sk as item_sk ,s_store_name as store_name ,s_zip as store_zip ,ad1.ca_street_number as b_street_number ,ad1.ca_street_name as b_streen_name ,ad1.ca_city as b_city ,ad1.ca_zip as b_zip ,ad2.ca_street_number as c_street_number ,ad2.ca_street_name as c_street_name ,ad2.ca_city as c_city ,ad2.ca_zip as c_zip ,d1.d_year as syear ,d2.d_year as fsyear ,d3.d_year as s2year ,count(*) as cnt ,sum(ss_wholesale_cost) as s1 ,sum(ss_list_price) as s2 ,sum(ss_coupon_amt) as s3 FROM store_sales JOIN store_returns ON store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk JOIN date_dim d1 ON store_sales.ss_sold_date_sk = d1.d_date_sk JOIN date_dim d2 ON customer.c_first_sales_date_sk = d2.d_date_sk JOIN date_dim d3 ON customer.c_first_shipto_date_sk = d3.d_date_sk JOIN store ON store_sales.ss_store_sk = store.s_store_sk JOIN customer_demographics cd1 ON store_sales.ss_cdemo_sk= cd1.cd_demo_sk JOIN customer_demographics cd2 ON customer.c_current_cdemo_sk = cd2.cd_demo_sk JOIN promotion ON store_sales.ss_promo_sk = promotion.p_promo_sk JOIN household_demographics hd1 ON store_sales.ss_hdemo_sk = hd1.hd_demo_sk JOIN household_demographics hd2 ON customer.c_current_hdemo_sk = hd2.hd_demo_sk JOIN customer_address ad1 ON store_sales.ss_addr_sk = ad1.ca_address_sk JOIN customer_address ad2 ON customer.c_current_addr_sk = ad2.ca_address_sk JOIN income_band ib1 ON hd1.hd_income_band_sk = ib1.ib_income_band_sk JOIN income_band ib2 ON hd2.hd_income_band_sk = ib2.ib_income_band_sk JOIN item ON store_sales.ss_item_sk = item.i_item_sk JOIN (select cs_item_sk ,sum(cs_ext_list_price) as sale,sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit) as refund from catalog_sales JOIN catalog_returns ON catalog_sales.cs_item_sk = catalog_returns.cr_item_sk and catalog_sales.cs_order_number = catalog_returns.cr_order_number group by cs_item_sk having sum(cs_ext_list_price)>2*sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit)) cs_ui ON store_sales.ss_item_sk = cs_ui.cs_item_sk WHERE cd1.cd_marital_status <> cd2.cd_marital_status and i_color in ('maroon','burnished','dim','steel','navajo','chocolate') and i_current_price between 35 and 35 + 10 and i_current_price between 35 + 1 and 35 + 15 group by i_product_name ,i_item_sk ,s_store_name ,s_zip ,ad1.ca_street_number ,ad1.ca_street_name ,ad1.ca_city ,ad1.ca_zip ,ad2.ca_street_number ,ad2.ca_street_name ,ad2.ca_city ,ad2.ca_zip ,d1.d_year ,d2.d_year ,d3.d_year ) cs2 ON cs1.item_sk=cs2.item_sk where cs1.syear = 2000 and cs2.syear = 2000 + 1 and cs2.cnt <= cs1.cnt and cs1.store_name = cs2.store_name and cs1.store_zip = cs2.store_zip order by cs1.product_name ,cs1.store_name ,cs2.cnt;
diff --git a/ql/src/test/queries/clientpositive/perf/query65.q b/ql/src/test/queries/clientpositive/perf/query65.q
new file mode 100644
index 0000000..bd4475d
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query65.q
@@ -0,0 +1,38 @@
+set hive.mapred.mode=nonstrict;
+explain select
+ s_store_name,
+ i_item_desc,
+ sc.revenue,
+ i_current_price,
+ i_wholesale_cost,
+ i_brand
+from
+ store,
+ item,
+ (select
+ ss_store_sk, avg(revenue) as ave
+ from
+ (select
+ ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue
+ from
+ store_sales, date_dim
+ where
+ ss_sold_date_sk = d_date_sk
+ and d_month_seq between 1212 and 1212 + 11
+ group by ss_store_sk , ss_item_sk) sa
+ group by ss_store_sk) sb,
+ (select
+ ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue
+ from
+ store_sales, date_dim
+ where
+ ss_sold_date_sk = d_date_sk
+ and d_month_seq between 1212 and 1212 + 11
+ group by ss_store_sk , ss_item_sk) sc
+where
+ sb.ss_store_sk = sc.ss_store_sk
+ and sc.revenue <= 0.1 * sb.ave
+ and s_store_sk = sc.ss_store_sk
+ and i_item_sk = sc.ss_item_sk
+order by s_store_name , i_item_desc
+limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query66.q b/ql/src/test/queries/clientpositive/perf/query66.q
new file mode 100644
index 0000000..9224680
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query66.q
@@ -0,0 +1,219 @@
+explain
+select
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,ship_carriers
+ ,year
+ ,sum(jan_sales) as jan_sales
+ ,sum(feb_sales) as feb_sales
+ ,sum(mar_sales) as mar_sales
+ ,sum(apr_sales) as apr_sales
+ ,sum(may_sales) as may_sales
+ ,sum(jun_sales) as jun_sales
+ ,sum(jul_sales) as jul_sales
+ ,sum(aug_sales) as aug_sales
+ ,sum(sep_sales) as sep_sales
+ ,sum(oct_sales) as oct_sales
+ ,sum(nov_sales) as nov_sales
+ ,sum(dec_sales) as dec_sales
+ ,sum(jan_sales/w_warehouse_sq_ft) as jan_sales_per_sq_foot
+ ,sum(feb_sales/w_warehouse_sq_ft) as feb_sales_per_sq_foot
+ ,sum(mar_sales/w_warehouse_sq_ft) as mar_sales_per_sq_foot
+ ,sum(apr_sales/w_warehouse_sq_ft) as apr_sales_per_sq_foot
+ ,sum(may_sales/w_warehouse_sq_ft) as may_sales_per_sq_foot
+ ,sum(jun_sales/w_warehouse_sq_ft) as jun_sales_per_sq_foot
+ ,sum(jul_sales/w_warehouse_sq_ft) as jul_sales_per_sq_foot
+ ,sum(aug_sales/w_warehouse_sq_ft) as aug_sales_per_sq_foot
+ ,sum(sep_sales/w_warehouse_sq_ft) as sep_sales_per_sq_foot
+ ,sum(oct_sales/w_warehouse_sq_ft) as oct_sales_per_sq_foot
+ ,sum(nov_sales/w_warehouse_sq_ft) as nov_sales_per_sq_foot
+ ,sum(dec_sales/w_warehouse_sq_ft) as dec_sales_per_sq_foot
+ ,sum(jan_net) as jan_net
+ ,sum(feb_net) as feb_net
+ ,sum(mar_net) as mar_net
+ ,sum(apr_net) as apr_net
+ ,sum(may_net) as may_net
+ ,sum(jun_net) as jun_net
+ ,sum(jul_net) as jul_net
+ ,sum(aug_net) as aug_net
+ ,sum(sep_net) as sep_net
+ ,sum(oct_net) as oct_net
+ ,sum(nov_net) as nov_net
+ ,sum(dec_net) as dec_net
+ from (
+ select
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,concat('DIAMOND', ',', 'AIRBORNE') as ship_carriers
+ ,d_year as year
+ ,sum(case when d_moy = 1
+ then ws_sales_price* ws_quantity else 0 end) as jan_sales
+ ,sum(case when d_moy = 2
+ then ws_sales_price* ws_quantity else 0 end) as feb_sales
+ ,sum(case when d_moy = 3
+ then ws_sales_price* ws_quantity else 0 end) as mar_sales
+ ,sum(case when d_moy = 4
+ then ws_sales_price* ws_quantity else 0 end) as apr_sales
+ ,sum(case when d_moy = 5
+ then ws_sales_price* ws_quantity else 0 end) as may_sales
+ ,sum(case when d_moy = 6
+ then ws_sales_price* ws_quantity else 0 end) as jun_sales
+ ,sum(case when d_moy = 7
+ then ws_sales_price* ws_quantity else 0 end) as jul_sales
+ ,sum(case when d_moy = 8
+ then ws_sales_price* ws_quantity else 0 end) as aug_sales
+ ,sum(case when d_moy = 9
+ then ws_sales_price* ws_quantity else 0 end) as sep_sales
+ ,sum(case when d_moy = 10
+ then ws_sales_price* ws_quantity else 0 end) as oct_sales
+ ,sum(case when d_moy = 11
+ then ws_sales_price* ws_quantity else 0 end) as nov_sales
+ ,sum(case when d_moy = 12
+ then ws_sales_price* ws_quantity else 0 end) as dec_sales
+ ,sum(case when d_moy = 1
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as jan_net
+ ,sum(case when d_moy = 2
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as feb_net
+ ,sum(case when d_moy = 3
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as mar_net
+ ,sum(case when d_moy = 4
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as apr_net
+ ,sum(case when d_moy = 5
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as may_net
+ ,sum(case when d_moy = 6
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as jun_net
+ ,sum(case when d_moy = 7
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as jul_net
+ ,sum(case when d_moy = 8
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as aug_net
+ ,sum(case when d_moy = 9
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as sep_net
+ ,sum(case when d_moy = 10
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as oct_net
+ ,sum(case when d_moy = 11
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as nov_net
+ ,sum(case when d_moy = 12
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as dec_net
+ from
+ web_sales
+ ,warehouse
+ ,date_dim
+ ,time_dim
+ ,ship_mode
+ where
+ web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk
+ and web_sales.ws_sold_date_sk = date_dim.d_date_sk
+ and web_sales.ws_sold_time_sk = time_dim.t_time_sk
+ and web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk
+ and d_year = 2002
+ and t_time between 49530 and 49530+28800
+ and sm_carrier in ('DIAMOND','AIRBORNE')
+ group by
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,d_year
+ union all
+ select
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,concat('DIAMOND', ',', 'AIRBORNE') as ship_carriers
+ ,d_year as year
+ ,sum(case when d_moy = 1
+ then cs_ext_sales_price* cs_quantity else 0 end) as jan_sales
+ ,sum(case when d_moy = 2
+ then cs_ext_sales_price* cs_quantity else 0 end) as feb_sales
+ ,sum(case when d_moy = 3
+ then cs_ext_sales_price* cs_quantity else 0 end) as mar_sales
+ ,sum(case when d_moy = 4
+ then cs_ext_sales_price* cs_quantity else 0 end) as apr_sales
+ ,sum(case when d_moy = 5
+ then cs_ext_sales_price* cs_quantity else 0 end) as may_sales
+ ,sum(case when d_moy = 6
+ then cs_ext_sales_price* cs_quantity else 0 end) as jun_sales
+ ,sum(case when d_moy = 7
+ then cs_ext_sales_price* cs_quantity else 0 end) as jul_sales
+ ,sum(case when d_moy = 8
+ then cs_ext_sales_price* cs_quantity else 0 end) as aug_sales
+ ,sum(case when d_moy = 9
+ then cs_ext_sales_price* cs_quantity else 0 end) as sep_sales
+ ,sum(case when d_moy = 10
+ then cs_ext_sales_price* cs_quantity else 0 end) as oct_sales
+ ,sum(case when d_moy = 11
+ then cs_ext_sales_price* cs_quantity else 0 end) as nov_sales
+ ,sum(case when d_moy = 12
+ then cs_ext_sales_price* cs_quantity else 0 end) as dec_sales
+ ,sum(case when d_moy = 1
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as jan_net
+ ,sum(case when d_moy = 2
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as feb_net
+ ,sum(case when d_moy = 3
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as mar_net
+ ,sum(case when d_moy = 4
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as apr_net
+ ,sum(case when d_moy = 5
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as may_net
+ ,sum(case when d_moy = 6
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as jun_net
+ ,sum(case when d_moy = 7
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as jul_net
+ ,sum(case when d_moy = 8
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as aug_net
+ ,sum(case when d_moy = 9
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as sep_net
+ ,sum(case when d_moy = 10
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as oct_net
+ ,sum(case when d_moy = 11
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as nov_net
+ ,sum(case when d_moy = 12
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as dec_net
+ from
+ catalog_sales
+ ,warehouse
+ ,date_dim
+ ,time_dim
+ ,ship_mode
+ where
+ catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk
+ and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk
+ and catalog_sales.cs_sold_time_sk = time_dim.t_time_sk
+ and catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk
+ and d_year = 2002
+ and t_time between 49530 AND 49530+28800
+ and sm_carrier in ('DIAMOND','AIRBORNE')
+ group by
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,d_year
+ ) x
+ group by
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,ship_carriers
+ ,year
+ order by w_warehouse_name
+ limit 100;
+
diff --git a/ql/src/test/queries/clientpositive/perf/query67.q b/ql/src/test/queries/clientpositive/perf/query67.q
new file mode 100644
index 0000000..1c03537
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query67.q
@@ -0,0 +1,44 @@
+explain
+select *
+from (select i_category
+ ,i_class
+ ,i_brand
+ ,i_product_name
+ ,d_year
+ ,d_qoy
+ ,d_moy
+ ,s_store_id
+ ,sumsales
+ ,rank() over (partition by i_category order by sumsales desc) rk
+ from (select i_category
+ ,i_class
+ ,i_brand
+ ,i_product_name
+ ,d_year
+ ,d_qoy
+ ,d_moy
+ ,s_store_id
+ ,sum(coalesce(ss_sales_price*ss_quantity,0)) sumsales
+ from store_sales
+ ,date_dim
+ ,store
+ ,item
+ where store_sales.ss_sold_date_sk=date_dim.d_date_sk
+ and store_sales.ss_item_sk=item.i_item_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and d_month_seq between 1193 and 1193+11
+ group by i_category, i_class, i_brand, i_product_name, d_year, d_qoy, d_moy,s_store_id with rollup)dw1) dw2
+where rk <= 100
+order by i_category
+ ,i_class
+ ,i_brand
+ ,i_product_name
+ ,d_year
+ ,d_qoy
+ ,d_moy
+ ,s_store_id
+ ,sumsales
+ ,rk
+limit 100;
+
+
diff --git a/ql/src/test/queries/clientpositive/perf/query68.q b/ql/src/test/queries/clientpositive/perf/query68.q
new file mode 100644
index 0000000..34f87c2
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query68.q
@@ -0,0 +1 @@
+explain select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,extended_price ,extended_tax ,list_price from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_ext_sales_price) extended_price ,sum(ss_ext_list_price) list_price ,sum(ss_ext_tax) extended_tax from store_sales ,date_dim ,store ,household_demographics ,customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_dep_count = 4 or household_demographics.hd_vehicle_count= 2) and date_dim.d_year in (1998,1998+1,1998+2) and store.s_city in ('Rosedale','Bethlehem') group by ss_ticket_number ,ss_customer_sk ,ss_addr_sk,ca_city) dn ,customer ,customer_address current_addr where dn.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,ss_ticket_number limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query7.q b/ql/src/test/queries/clientpositive/perf/query7.q
new file mode 100644
index 0000000..39c4383
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query7.q
@@ -0,0 +1 @@
+explain select i_item_id, 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, item, promotion where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_item_sk = item.i_item_sk and store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk and store_sales.ss_promo_sk = promotion.p_promo_sk and cd_gender = 'F' and cd_marital_status = 'W' and cd_education_status = 'Primary' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 1998 group by i_item_id order by i_item_id limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query70.q b/ql/src/test/queries/clientpositive/perf/query70.q
new file mode 100644
index 0000000..df74bfb
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query70.q
@@ -0,0 +1 @@
+explain select sum(ss_net_profit) as total_sum ,s_state ,s_county ,grouping__id as lochierarchy , rank() over(partition by grouping__id, case when grouping__id == 2 then s_state end order by sum(ss_net_profit)) as rank_within_parent from store_sales ss join date_dim d1 on d1.d_date_sk = ss.ss_sold_date_sk join store s on s.s_store_sk = ss.ss_store_sk where d1.d_month_seq between 1193 and 1193+11 and s.s_state in ( select s_state from (select s_state as s_state, sum(ss_net_profit), rank() over ( partition by s_state order by sum(ss_net_profit) desc) as ranking from store_sales, store, date_dim where d_month_seq between 1193 and 1193+11 and date_dim.d_date_sk = store_sales.ss_sold_date_sk and store.s_store_sk = store_sales.ss_store_sk group by s_state ) tmp1 where ranking <= 5 ) group by s_state,s_county with rollup order by lochierarchy desc ,case when lochierarchy = 0 then s_state end ,rank_within_parent limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query71.q b/ql/src/test/queries/clientpositive/perf/query71.q
new file mode 100644
index 0000000..d0601d2
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query71.q
@@ -0,0 +1,2 @@
+set hive.mapred.mode=nonstrict;
+explain select i_brand_id brand_id, i_brand brand,t_hour,t_minute, sum(ext_price) ext_price from item JOIN (select ws_ext_sales_price as ext_price, ws_sold_date_sk as sold_date_sk, ws_item_sk as sold_item_sk, ws_sold_time_sk as time_sk from web_sales,date_dim where date_dim.d_date_sk = web_sales.ws_sold_date_sk and d_moy=12 and d_year=2001 union all select cs_ext_sales_price as ext_price, cs_sold_date_sk as sold_date_sk, cs_item_sk as sold_item_sk, cs_sold_time_sk as time_sk from catalog_sales,date_dim where date_dim.d_date_sk = catalog_sales.cs_sold_date_sk and d_moy=12 and d_year=2001 union all select ss_ext_sales_price as ext_price, ss_sold_date_sk as sold_date_sk, ss_item_sk as sold_item_sk, ss_sold_time_sk as time_sk from store_sales,date_dim where date_dim.d_date_sk = store_sales.ss_sold_date_sk and d_moy=12 and d_year=2001 ) tmp ON tmp.sold_item_sk = item.i_item_sk JOIN time_dim ON tmp.time_sk = time_dim.t_time_sk where i_manager_id=1 and (t_meal_time = 'breakfast' or t_meal_time = 'dinner') group by i_brand, i_brand_id,t_hour,t_minute order by ext_price desc, i_brand_id ;
diff --git a/ql/src/test/queries/clientpositive/perf/query72.q b/ql/src/test/queries/clientpositive/perf/query72.q
new file mode 100644
index 0000000..ee4c3d0
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query72.q
@@ -0,0 +1 @@
+explain select i_item_desc ,w_warehouse_name ,d1.d_week_seq ,count(case when p_promo_sk is null then 1 else 0 end) no_promo ,count(case when p_promo_sk is not null then 1 else 0 end) promo ,count(*) total_cnt from catalog_sales join inventory on (catalog_sales.cs_item_sk = inventory.inv_item_sk) join warehouse on (warehouse.w_warehouse_sk=inventory.inv_warehouse_sk) join item on (item.i_item_sk = catalog_sales.cs_item_sk) join customer_demographics on (catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk) join household_demographics on (catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk) join date_dim d1 on (catalog_sales.cs_sold_date_sk = d1.d_date_sk) join date_dim d2 on (inventory.inv_date_sk = d2.d_date_sk) join date_dim d3 on (catalog_sales.cs_ship_date_sk = d3.d_date_sk) left outer join promotion on (catalog_sales.cs_promo_sk=promotion.p_promo_sk) left outer join catalog_returns on (catalog_returns.cr_item_sk = catalog_sales.cs_item_sk and catalog_returns.cr_order_number = catalog_sales.cs_order_number) where d1.d_week_seq = d2.d_week_seq and inv_quantity_on_hand < cs_quantity and d3.d_date > d1.d_date + 5 and hd_buy_potential = '1001-5000' and d1.d_year = 2001 and hd_buy_potential = '1001-5000' and cd_marital_status = 'M' and d1.d_year = 2001 group by i_item_desc,w_warehouse_name,d1.d_week_seq order by total_cnt desc, i_item_desc, w_warehouse_name, d_week_seq limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query73.q b/ql/src/test/queries/clientpositive/perf/query73.q
new file mode 100644
index 0000000..95c4695
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query73.q
@@ -0,0 +1,2 @@
+set hive.mapred.mode=nonstrict;
+explain select c_last_name ,c_first_name ,c_salutation ,c_preferred_cust_flag ,ss_ticket_number ,cnt from (select ss_ticket_number ,ss_customer_sk ,count(*) cnt from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_buy_potential = '1001-5000' or household_demographics.hd_buy_potential = '5001-10000') and household_demographics.hd_vehicle_count > 0 and case when household_demographics.hd_vehicle_count > 0 then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end > 1 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_county in ('Kittitas County','Adams County','Richland County','Furnas County') group by ss_ticket_number,ss_customer_sk) dj,customer where dj.ss_customer_sk = customer.c_customer_sk and cnt between 1 and 5 order by cnt desc;
diff --git a/ql/src/test/queries/clientpositive/perf/query75.q b/ql/src/test/queries/clientpositive/perf/query75.q
new file mode 100644
index 0000000..a815c9e
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query75.q
@@ -0,0 +1 @@
+explain WITH all_sales AS ( SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,SUM(sales_cnt) AS sales_cnt ,SUM(sales_amt) AS sales_amt FROM (SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,cs_quantity - COALESCE(cr_return_quantity,0) AS sales_cnt ,cs_ext_sales_price - COALESCE(cr_return_amount,0.0) AS sales_amt FROM catalog_sales JOIN item ON i_item_sk=cs_item_sk JOIN date_dim ON d_date_sk=cs_sold_date_sk LEFT JOIN catalog_returns ON (cs_order_number=cr_order_number AND cs_item_sk=cr_item_sk) WHERE i_category='Sports' UNION ALL SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,ss_quantity - COALESCE(sr_return_quantity,0) AS sales_cnt ,ss_ext_sales_price - COALESCE(sr_return_amt,0.0) AS sales_amt FROM store_sales JOIN item ON i_item_sk=ss_item_sk JOIN date_dim ON d_date_sk=ss_sold_date_sk LEFT JOIN store_returns ON (ss_ticket_number=sr_ticket_number AND ss_item_sk=sr_item_sk) WHERE i_category='Sports' UNION ALL SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,ws_quantity - COALESCE(wr_return_quantity,0) AS sales_cnt ,ws_ext_sales_price - COALESCE(wr_return_amt,0.0) AS sales_amt FROM web_sales JOIN item ON i_item_sk=ws_item_sk JOIN date_dim ON d_date_sk=ws_sold_date_sk LEFT JOIN web_returns ON (ws_order_number=wr_order_number AND ws_item_sk=wr_item_sk) WHERE i_category='Sports') sales_detail GROUP BY d_year, i_brand_id, i_class_id, i_category_id, i_manufact_id) SELECT prev_yr.d_year AS prev_year ,curr_yr.d_year AS year ,curr_yr.i_brand_id ,curr_yr.i_class_id ,curr_yr.i_category_id ,curr_yr.i_manufact_id ,prev_yr.sales_cnt AS prev_yr_cnt ,curr_yr.sales_cnt AS curr_yr_cnt ,curr_yr.sales_cnt-prev_yr.sales_cnt AS sales_cnt_diff ,curr_yr.sales_amt-prev_yr.sales_amt AS sales_amt_diff FROM all_sales curr_yr, all_sales prev_yr WHERE curr_yr.i_brand_id=prev_yr.i_brand_id AND curr_yr.i_class_id=prev_yr.i_class_id AND curr_yr.i_category_id=prev_yr.i_category_id AND curr_yr.i_manufact_id=prev_yr.i_manufact_id AND curr_yr.d_year=2002 AND prev_yr.d_year=2002-1 AND CAST(curr_yr.sales_cnt AS DECIMAL(17,2))/CAST(prev_yr.sales_cnt AS DECIMAL(17,2))<0.9 ORDER BY sales_cnt_diff limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query76.q b/ql/src/test/queries/clientpositive/perf/query76.q
new file mode 100644
index 0000000..1894cf4
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query76.q
@@ -0,0 +1 @@
+explain select channel, col_name, d_year, d_qoy, i_category, COUNT(*) sales_cnt, SUM(ext_sales_price) sales_amt FROM ( SELECT 'store' as channel, 'ss_addr_sk' col_name, d_year, d_qoy, i_category, ss_ext_sales_price ext_sales_price FROM store_sales, item, date_dim WHERE ss_addr_sk IS NULL AND store_sales.ss_sold_date_sk=date_dim.d_date_sk AND store_sales.ss_item_sk=item.i_item_sk UNION ALL SELECT 'web' as channel, 'ws_web_page_sk' col_name, d_year, d_qoy, i_category, ws_ext_sales_price ext_sales_price FROM web_sales, item, date_dim WHERE ws_web_page_sk IS NULL AND web_sales.ws_sold_date_sk=date_dim.d_date_sk AND web_sales.ws_item_sk=item.i_item_sk UNION ALL SELECT 'catalog' as channel, 'cs_warehouse_sk' col_name, d_year, d_qoy, i_category, cs_ext_sales_price ext_sales_price FROM catalog_sales, item, date_dim WHERE cs_warehouse_sk IS NULL AND catalog_sales.cs_sold_date_sk=date_dim.d_date_sk AND catalog_sales.cs_item_sk=item.i_item_sk) foo GROUP BY channel, col_name, d_year, d_qoy, i_category ORDER BY channel, col_name, d_year, d_qoy, i_category limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query79.q b/ql/src/test/queries/clientpositive/perf/query79.q
new file mode 100644
index 0000000..d104602
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query79.q
@@ -0,0 +1 @@
+explain select c_last_name,c_first_name,substr(s_city,1,30) sub,ss_ticket_number,amt,profit from (select ss_ticket_number ,ss_customer_sk ,store.s_city ,sum(ss_coupon_amt) amt ,sum(ss_net_profit) profit from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and (household_demographics.hd_dep_count = 8 or household_demographics.hd_vehicle_count > 0) and date_dim.d_dow = 1 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_number_employees between 200 and 295 group by ss_ticket_number,ss_customer_sk,ss_addr_sk,store.s_city) ms,customer where ms.ss_customer_sk = customer.c_customer_sk order by c_last_name,c_first_name,sub, profit limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query80.q b/ql/src/test/queries/clientpositive/perf/query80.q
new file mode 100644
index 0000000..5ded3c5
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query80.q
@@ -0,0 +1 @@
+explain with ssr as (select s_store_id as store_id, sum(ss_ext_sales_price) as sales, sum(coalesce(sr_return_amt, 0)) as returns, sum(ss_net_profit - coalesce(sr_net_loss, 0)) as profit from store_sales left outer join store_returns on (ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number), date_dim, store, item, promotion where ss_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and ss_store_sk = s_store_sk and ss_item_sk = i_item_sk and i_current_price > 50 and ss_promo_sk = p_promo_sk and p_channel_tv = 'N' group by s_store_id) , csr as (select cp_catalog_page_id as catalog_page_id, sum(cs_ext_sales_price) as sales, sum(coalesce(cr_return_amount, 0)) as returns, sum(cs_net_profit - coalesce(cr_net_loss, 0)) as profit from catalog_sales left outer join catalog_returns on (cs_item_sk = cr_item_sk and cs_order_number = cr_order_number), date_dim, catalog_page, item, promotion where cs_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and cs_catalog_page_sk = cp_catalog_page_sk and cs_item_sk = i_item_sk and i_current_price > 50 and cs_promo_sk = p_promo_sk and p_channel_tv = 'N' group by cp_catalog_page_id) , wsr as (select web_site_id, sum(ws_ext_sales_price) as sales, sum(coalesce(wr_return_amt, 0)) as returns, sum(ws_net_profit - coalesce(wr_net_loss, 0)) as profit from web_sales left outer join web_returns on (ws_item_sk = wr_item_sk and ws_order_number = wr_order_number), date_dim, web_site, item, promotion where ws_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and ws_web_site_sk = web_site_sk and ws_item_sk = i_item_sk and i_current_price > 50 and ws_promo_sk = p_promo_sk and p_channel_tv = 'N' group by web_site_id) select channel , id , sum(sales) as sales , sum(returns) as returns , sum(profit) as profit from (select 'store channel' as channel , concat('store', store_id) as id , sales , returns , profit from ssr union all select 'catalog channel' as channel , concat('catalog_page', catalog_page_id) as id , sales , returns , profit from csr union all select 'web channel' as channel , concat('web_site', web_site_id) as id , sales , returns , profit from wsr ) x group by channel, id with rollup order by channel ,id limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query82.q b/ql/src/test/queries/clientpositive/perf/query82.q
new file mode 100644
index 0000000..aec30ea
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query82.q
@@ -0,0 +1 @@
+explain select i_item_id ,i_item_desc ,i_current_price from item, inventory, date_dim, store_sales where i_current_price between 30 and 30+30 and inv_item_sk = i_item_sk and d_date_sk=inv_date_sk and d_date between '2002-05-30' and '2002-07-30' and i_manufact_id in (437,129,727,663) and inv_quantity_on_hand between 100 and 500 and ss_item_sk = i_item_sk group by i_item_id,i_item_desc,i_current_price order by i_item_id limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query84.q b/ql/src/test/queries/clientpositive/perf/query84.q
new file mode 100644
index 0000000..bcc2f4e
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query84.q
@@ -0,0 +1 @@
+explain select c_customer_id as customer_id ,concat(c_last_name, ', ', c_first_name) as customername from customer ,customer_address ,customer_demographics ,household_demographics ,income_band ,store_returns where ca_city = 'Hopewell' and customer.c_current_addr_sk = customer_address.ca_address_sk and ib_lower_bound >= 32287 and ib_upper_bound <= 32287 + 50000 and income_band.ib_income_band_sk = household_demographics.hd_income_band_sk and customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk and household_demographics.hd_demo_sk = customer.c_current_hdemo_sk and store_returns.sr_cdemo_sk = customer_demographics.cd_demo_sk order by customer_id limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query85.q b/ql/src/test/queries/clientpositive/perf/query85.q
new file mode 100644
index 0000000..b1e2b64
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query85.q
@@ -0,0 +1 @@
+explain select substr(r_reason_desc,1,20) as r ,avg(ws_quantity) wq ,avg(wr_refunded_cash) ref ,avg(wr_fee) fee from web_sales, web_returns, web_page, customer_demographics cd1, customer_demographics cd2, customer_address, date_dim, reason where web_sales.ws_web_page_sk = web_page.wp_web_page_sk and web_sales.ws_item_sk = web_returns.wr_item_sk and web_sales.ws_order_number = web_returns.wr_order_number and web_sales.ws_sold_date_sk = date_dim.d_date_sk and d_year = 1998 and cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk and cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk and customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk and reason.r_reason_sk = web_returns.wr_reason_sk and ( ( cd1.cd_marital_status = 'M' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = '4 yr Degree' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 100.00 and 150.00 ) or ( cd1.cd_marital_status = 'D' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = 'Primary' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 50.00 and 100.00 ) or ( cd1.cd_marital_status = 'U' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = 'Advanced Degree' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 150.00 and 200.00 ) ) and ( ( ca_country = 'United States' and ca_state in ('KY', 'GA', 'NM') and ws_net_profit between 100 and 200 ) or ( ca_country = 'United States' and ca_state in ('MT', 'OR', 'IN') and ws_net_profit between 150 and 300 ) or ( ca_country = 'United States' and ca_state in ('WI', 'MO', 'WV') and ws_net_profit between 50 and 250 ) ) group by r_reason_desc order by r, wq, ref, fee limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query87.q b/ql/src/test/queries/clientpositive/perf/query87.q
new file mode 100644
index 0000000..6fd059f
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query87.q
@@ -0,0 +1 @@
+explain select count(*) from (select distinct c_last_name as l1, c_first_name as f1, d_date as d1 from store_sales JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t1 LEFT OUTER JOIN ( select distinct c_last_name as l2, c_first_name as f2, d_date as d2 from catalog_sales JOIN date_dim ON catalog_sales.cs_sold_date_sk = date_dim.d_date_sk JOIN customer ON catalog_sales.cs_bill_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t2 ON t1.l1 = t2.l2 and t1.f1 = t2.f2 and t1.d1 = t2.d2 LEFT OUTER JOIN (select distinct c_last_name as l3, c_first_name as f3, d_date as d3 from web_sales JOIN date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk JOIN customer ON web_sales.ws_bill_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t3 ON t1.l1 = t3.l3 and t1.f1 = t3.f3 and t1.d1 = t3.d3 WHERE l2 is null and l3 is null ;
diff --git a/ql/src/test/queries/clientpositive/perf/query88.q b/ql/src/test/queries/clientpositive/perf/query88.q
new file mode 100644
index 0000000..2be814e
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query88.q
@@ -0,0 +1,92 @@
+explain
+select *
+from
+ (select count(*) h8_30_to_9
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 8
+ and time_dim.t_minute >= 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s1,
+ (select count(*) h9_to_9_30
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 9
+ and time_dim.t_minute < 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s2,
+ (select count(*) h9_30_to_10
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 9
+ and time_dim.t_minute >= 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s3,
+ (select count(*) h10_to_10_30
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 10
+ and time_dim.t_minute < 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s4,
+ (select count(*) h10_30_to_11
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 10
+ and time_dim.t_minute >= 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s5,
+ (select count(*) h11_to_11_30
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 11
+ and time_dim.t_minute < 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s6,
+ (select count(*) h11_30_to_12
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 11
+ and time_dim.t_minute >= 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s7,
+ (select count(*) h12_to_12_30
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 12
+ and time_dim.t_minute < 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s8
+;
diff --git a/ql/src/test/queries/clientpositive/perf/query89.q b/ql/src/test/queries/clientpositive/perf/query89.q
new file mode 100644
index 0000000..a628c0e
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query89.q
@@ -0,0 +1,27 @@
+explain
+select *
+from(
+select i_category, i_class, i_brand,
+ s_store_name, s_company_name,
+ d_moy,
+ sum(ss_sales_price) sum_sales,
+ avg(sum(ss_sales_price)) over
+ (partition by i_category, i_brand, s_store_name, s_company_name)
+ avg_monthly_sales
+from item, store_sales, date_dim, store
+where store_sales.ss_item_sk = item.i_item_sk and
+ store_sales.ss_sold_date_sk = date_dim.d_date_sk and
+ store_sales.ss_store_sk = store.s_store_sk and
+ d_year in (2000) and
+ ((i_category in ('Home','Books','Electronics') and
+ i_class in ('wallpaper','parenting','musical')
+ )
+ or (i_category in ('Shoes','Jewelry','Men') and
+ i_class in ('womens','birdal','pants')
+ ))
+group by i_category, i_class, i_brand,
+ s_store_name, s_company_name, d_moy) tmp1
+where case when (avg_monthly_sales <> 0) then (abs(sum_sales - avg_monthly_sales) / avg_monthly_sales) else null end > 0.1
+order by sum_sales - avg_monthly_sales, s_store_name
+limit 100;
+
diff --git a/ql/src/test/queries/clientpositive/perf/query90.q b/ql/src/test/queries/clientpositive/perf/query90.q
new file mode 100644
index 0000000..515da06
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query90.q
@@ -0,0 +1,2 @@
+set hive.mapred.mode=nonstrict;
+explain select cast(amc as decimal(15,4))/cast(pmc as decimal(15,4)) am_pm_ratio from ( select count(*) amc from web_sales, household_demographics , time_dim, web_page where ws_sold_time_sk = time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 6 and 6+1 and household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 5000 and 5200) at, ( select count(*) pmc from web_sales, household_demographics , time_dim, web_page where ws_sold_time_sk = time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 14 and 14+1 and household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 5000 and 5200) pt order by am_pm_ratio limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query91.q b/ql/src/test/queries/clientpositive/perf/query91.q
new file mode 100644
index 0000000..9458c0c
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query91.q
@@ -0,0 +1,2 @@
+set hive.mapred.mode=nonstrict;
+explain select cc_call_center_id Call_Center, cc_name Call_Center_Name, cc_manager Manager, sum(cr_net_loss) Returns_Loss from call_center, catalog_returns, date_dim, customer, customer_address, customer_demographics, household_demographics where catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk and catalog_returns.cr_returned_date_sk = date_dim.d_date_sk and catalog_returns.cr_returning_customer_sk= customer.c_customer_sk and customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk and household_demographics.hd_demo_sk = customer.c_current_hdemo_sk and customer_address.ca_address_sk = customer.c_current_addr_sk and d_year = 1999 and d_moy = 11 and ( (cd_marital_status = 'M' and cd_education_status = 'Unknown') or(cd_marital_status = 'W' and cd_education_status = 'Advanced Degree')) and hd_buy_potential like '0-500%' and ca_gmt_offset = -7 group by cc_call_center_id,cc_name,cc_manager,cd_marital_status,cd_education_status order by Returns_Loss desc;
diff --git a/ql/src/test/queries/clientpositive/perf/query92.q b/ql/src/test/queries/clientpositive/perf/query92.q
new file mode 100644
index 0000000..625e99f
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query92.q
@@ -0,0 +1 @@
+explain SELECT sum(case when ssci.customer_sk is not null and csci.customer_sk is null then 1 else 0 end) as store_only, sum(case when ssci.customer_sk is null and csci.customer_sk is not null then 1 else 0 end) as catalog_only, sum(case when ssci.customer_sk is not null and csci.customer_sk is not null then 1 else 0 end) as store_and_catalog FROM (SELECT ss.ss_customer_sk as customer_sk, ss.ss_item_sk as item_sk FROM store_sales ss JOIN date_dim d1 ON (ss.ss_sold_date_sk = d1.d_date_sk) WHERE d1.d_month_seq >= 1206 and d1.d_month_seq <= 1217 GROUP BY ss.ss_customer_sk, ss.ss_item_sk) ssci FULL OUTER JOIN (SELECT cs.cs_bill_customer_sk as customer_sk, cs.cs_item_sk as item_sk FROM catalog_sales cs JOIN date_dim d2 ON (cs.cs_sold_date_sk = d2.d_date_sk) WHERE d2.d_month_seq >= 1206 and d2.d_month_seq <= 1217 GROUP BY cs.cs_bill_customer_sk, cs.cs_item_sk) csci ON (ssci.customer_sk=csci.customer_sk and ssci.item_sk = csci.item_sk);
diff --git a/ql/src/test/queries/clientpositive/perf/query93.q b/ql/src/test/queries/clientpositive/perf/query93.q
new file mode 100644
index 0000000..b60b041
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query93.q
@@ -0,0 +1 @@
+explain select ss_customer_sk ,sum(act_sales) sumsales from (select ss_item_sk ,ss_ticket_number ,ss_customer_sk ,case when sr_return_quantity is not null then (ss_quantity-sr_return_quantity)*ss_sales_price else (ss_quantity*ss_sales_price) end act_sales from store_sales left outer join store_returns on (store_returns.sr_item_sk = store_sales.ss_item_sk and store_returns.sr_ticket_number = store_sales.ss_ticket_number) ,reason where store_returns.sr_reason_sk = reason.r_reason_sk and r_reason_desc = 'Did not like the warranty') t group by ss_customer_sk order by sumsales, ss_customer_sk limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query94.q b/ql/src/test/queries/clientpositive/perf/query94.q
new file mode 100644
index 0000000..f9f4bc1
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query94.q
@@ -0,0 +1 @@
+explain SELECT count(distinct ws_order_number) as order_count, sum(ws_ext_ship_cost) as total_shipping_cost, sum(ws_net_profit) as total_net_profit FROM web_sales ws1 JOIN customer_address ca ON (ws1.ws_ship_addr_sk = ca.ca_address_sk) JOIN web_site s ON (ws1.ws_web_site_sk = s.web_site_sk) JOIN date_dim d ON (ws1.ws_ship_date_sk = d.d_date_sk) LEFT SEMI JOIN (SELECT ws2.ws_order_number as ws_order_number FROM web_sales ws2 JOIN web_sales ws3 ON (ws2.ws_order_number = ws3.ws_order_number) WHERE ws2.ws_warehouse_sk <> ws3.ws_warehouse_sk ) ws_wh1 ON (ws1.ws_order_number = ws_wh1.ws_order_number) LEFT OUTER JOIN web_returns wr1 ON (ws1.ws_order_number = wr1.wr_order_number) WHERE d.d_date between '1999-05-01' and '1999-07-01' and ca.ca_state = 'TX' and s.web_company_name = 'pri' and wr1.wr_order_number is null limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query95.q b/ql/src/test/queries/clientpositive/perf/query95.q
new file mode 100644
index 0000000..fbd2d47
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query95.q
@@ -0,0 +1 @@
+explain SELECT count(distinct ws1.ws_order_number) as order_count, sum(ws1.ws_ext_ship_cost) as total_shipping_cost, sum(ws1.ws_net_profit) as total_net_profit FROM web_sales ws1 JOIN customer_address ca ON (ws1.ws_ship_addr_sk = ca.ca_address_sk) JOIN web_site s ON (ws1.ws_web_site_sk = s.web_site_sk) JOIN date_dim d ON (ws1.ws_ship_date_sk = d.d_date_sk) LEFT SEMI JOIN (SELECT ws2.ws_order_number as ws_order_number FROM web_sales ws2 JOIN web_sales ws3 ON (ws2.ws_order_number = ws3.ws_order_number) WHERE ws2.ws_warehouse_sk <> ws3.ws_warehouse_sk ) ws_wh1 ON (ws1.ws_order_number = ws_wh1.ws_order_number) LEFT SEMI JOIN (SELECT wr_order_number FROM web_returns wr JOIN (SELECT ws4.ws_order_number as ws_order_number FROM web_sales ws4 JOIN web_sales ws5 ON (ws4.ws_order_number = ws5.ws_order_number) WHERE ws4.ws_warehouse_sk <> ws5.ws_warehouse_sk ) ws_wh2 ON (wr.wr_order_number = ws_wh2.ws_order_number)) tmp1 ON (ws1.ws_order_number = tmp1.wr_order_number) WHERE d.d_date between '2002-05-01' and '2002-06-30' and ca.ca_state = 'GA' and s.web_company_name = 'pri';
diff --git a/ql/src/test/queries/clientpositive/perf/query96.q b/ql/src/test/queries/clientpositive/perf/query96.q
new file mode 100644
index 0000000..29265ed
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query96.q
@@ -0,0 +1 @@
+explain select count(*) as c from store_sales ,household_demographics ,time_dim, store where store_sales.ss_sold_time_sk = time_dim.t_time_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_store_sk = store.s_store_sk and time_dim.t_hour = 8 and time_dim.t_minute >= 30 and household_demographics.hd_dep_count = 5 and store.s_store_name = 'ese' order by c limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query97.q b/ql/src/test/queries/clientpositive/perf/query97.q
new file mode 100644
index 0000000..4995309
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query97.q
@@ -0,0 +1 @@
+explain select sum(case when ssci.customer_sk is not null and csci.customer_sk is null then 1 else 0 end) store_only ,sum(case when ssci.customer_sk is null and csci.customer_sk is not null then 1 else 0 end) catalog_only ,sum(case when ssci.customer_sk is not null and csci.customer_sk is not null then 1 else 0 end) store_and_catalog from ( select ss_customer_sk customer_sk ,ss_item_sk item_sk from store_sales JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk where d_month_seq between 1193 and 1193 + 11 group by ss_customer_sk ,ss_item_sk) ssci full outer join ( select cs_bill_customer_sk customer_sk ,cs_item_sk item_sk from catalog_sales JOIN date_dim ON catalog_sales.cs_sold_date_sk = date_dim.d_date_sk where d_month_seq between 1193 and 1193 + 11 group by cs_bill_customer_sk ,cs_item_sk) csci on (ssci.customer_sk=csci.customer_sk and ssci.item_sk = csci.item_sk) limit 100;
diff --git a/ql/src/test/queries/clientpositive/perf/query98.q b/ql/src/test/queries/clientpositive/perf/query98.q
new file mode 100644
index 0000000..930b7ef
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/perf/query98.q
@@ -0,0 +1,2 @@
+set hive.mapred.mode=nonstrict;
+explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(ss_ext_sales_price) as itemrevenue ,sum(ss_ext_sales_price)*100/sum(sum(ss_ext_sales_price)) over (partition by i_class) as revenueratio from store_sales ,item ,date_dim where store_sales.ss_item_sk = item.i_item_sk and i_category in ('Jewelry', 'Sports', 'Books') and store_sales.ss_sold_date_sk = date_dim.d_date_sk and d_date between cast('2001-01-12' as date) and (cast('2001-02-11' as date)) group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio;
diff --git a/ql/src/test/results/clientpositive/perf/query12.q.out b/ql/src/test/results/clientpositive/perf/query12.q.out
new file mode 100644
index 0000000..0773c36
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query12.q.out
@@ -0,0 +1,129 @@
+PREHOOK: query: explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(ws_ext_sales_price) as itemrevenue ,sum(ws_ext_sales_price)*100/sum(sum(ws_ext_sales_price)) over (partition by i_class) as revenueratio from web_sales ,item ,date_dim where web_sales.ws_item_sk = item.i_item_sk and item.i_category in ('Jewelry', 'Sports', 'Books') and web_sales.ws_sold_date_sk = date_dim.d_date_sk and date_dim.d_date between '2001-01-12' and '2001-02-11' group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(ws_ext_sales_price) as itemrevenue ,sum(ws_ext_sales_price)*100/sum(sum(ws_ext_sales_price)) over (partition by i_class) as revenueratio from web_sales ,item ,date_dim where web_sales.ws_item_sk = item.i_item_sk and item.i_category in ('Jewelry', 'Sports', 'Books') and web_sales.ws_sold_date_sk = date_dim.d_date_sk and date_dim.d_date between '2001-01-12' and '2001-02-11' group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio limit 100
+POSTHOOK: type: QUERY
+Plan not optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 3 <- Map 8 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 6
+ File Output Operator [FS_26]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_25]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_24]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 17469 Data size: 25090342 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_23]
+ key expressions:_col1 (type: string), _col2 (type: string), _col4 (type: string), _col0 (type: string), _col6 (type: decimal(38,23))
+ sort order:+++++
+ Statistics:Num rows: 17469 Data size: 25090342 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: decimal(7,2)), _col5 (type: decimal(17,2))
+ Select Operator [SEL_21]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 17469 Data size: 25090342 Basic stats: COMPLETE Column stats: NONE
+ PTF Operator [PTF_20]
+ Function definitions:[{"Input definition":{"type:":"WINDOWING"}},{"name:":"windowingtablefunction","order by:":"_col3","partition by:":"_col3"}]
+ Statistics:Num rows: 17469 Data size: 25090342 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_19]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 17469 Data size: 25090342 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_18]
+ key expressions:_col3 (type: string)
+ Map-reduce partition columns:_col3 (type: string)
+ sort order:+
+ Statistics:Num rows: 17469 Data size: 25090342 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col4 (type: decimal(7,2)), _col5 (type: decimal(17,2))
+ Group By Operator [GBY_17]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: decimal(7,2))
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 17469 Data size: 25090342 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_16]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: decimal(7,2))
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: decimal(7,2))
+ sort order:+++++
+ Statistics:Num rows: 34938 Data size: 50180684 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: decimal(17,2))
+ Group By Operator [GBY_15]
+ aggregations:["sum(_col23)"]
+ keys:_col38 (type: string), _col41 (type: string), _col49 (type: string), _col47 (type: string), _col42 (type: decimal(7,2))
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 34938 Data size: 50180684 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_14]
+ outputColumnNames:["_col38","_col41","_col49","_col47","_col42","_col23"]
+ Statistics:Num rows: 34938 Data size: 50180684 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_32]
+ predicate:((_col3 = _col37) and (_col0 = _col62)) (type: boolean)
+ Statistics:Num rows: 34938 Data size: 50180684 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_37]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"d_date_sk (type: int)"}
+ | outputColumnNames:["_col0","_col3","_col23","_col37","_col38","_col41","_col42","_col47","_col49","_col62"]
+ | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_11]
+ | key expressions:d_date_sk (type: int)
+ | Map-reduce partition columns:d_date_sk (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_35]
+ | predicate:(d_date_sk is not null and d_date BETWEEN '2001-01-12' AND '2001-02-11') (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_2]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_9]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: int), _col23 (type: decimal(7,2)), _col37 (type: int), _col38 (type: string), _col41 (type: string), _col42 (type: decimal(7,2)), _col47 (type: string), _col49 (type: string)
+ Merge Join Operator [MERGEJOIN_36]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"ws_item_sk (type: int)","1":"i_item_sk (type: int)"}
+ | outputColumnNames:["_col0","_col3","_col23","_col37","_col38","_col41","_col42","_col47","_col49"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_4]
+ | key expressions:ws_item_sk (type: int)
+ | Map-reduce partition columns:ws_item_sk (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:ws_sold_date_sk (type: int), ws_ext_sales_price (type: decimal(7,2))
+ | Filter Operator [FIL_33]
+ | predicate:(ws_item_sk is not null and ws_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:web_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_6]
+ key expressions:i_item_sk (type: int)
+ Map-reduce partition columns:i_item_sk (type: int)
+ sort order:+
+ Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ value expressions:i_item_id (type: string), i_item_desc (type: string), i_current_price (type: decimal(7,2)), i_class (type: string), i_category (type: string)
+ Filter Operator [FIL_34]
+ predicate:(i_item_sk is not null and (i_category) IN ('Jewelry', 'Sports', 'Books')) (type: boolean)
+ Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_1]
+ alias:item
+ Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query13.q.out b/ql/src/test/results/clientpositive/perf/query13.q.out
new file mode 100644
index 0000000..893bdee
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query13.q.out
@@ -0,0 +1,300 @@
+PREHOOK: query: EXPLAIN SELECT Avg(ss_quantity) ,
+ Avg(ss_ext_sales_price) ,
+ Avg(ss_ext_wholesale_cost) ,
+ Sum(ss_ext_wholesale_cost)
+FROM store_sales ,
+ store ,
+ customer_demographics ,
+ household_demographics ,
+ customer_address ,
+ date_dim
+WHERE store.s_store_sk = store_sales.ss_store_sk
+AND store_sales.ss_sold_date_sk = date_dim.d_date_sk
+AND date_dim.d_year = 2001
+AND ((
+ store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk
+ AND customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk
+ AND customer_demographics.cd_marital_status = 'M'
+ AND customer_demographics.cd_education_status = '4 yr Degree'
+ AND store_sales.ss_sales_price BETWEEN 100.00 AND 150.00
+ AND household_demographics.hd_dep_count = 3 )
+ OR (
+ store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk
+ AND customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk
+ AND customer_demographics.cd_marital_status = 'D'
+ AND customer_demographics.cd_education_status = 'Primary'
+ AND store_sales.ss_sales_price BETWEEN 50.00 AND 100.00
+ AND household_demographics.hd_dep_count = 1 )
+ OR (
+ store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk
+ AND customer_demographics.cd_demo_sk = ss_cdemo_sk
+ AND customer_demographics.cd_marital_status = 'U'
+ AND customer_demographics.cd_education_status = 'Advanced Degree'
+ AND store_sales.ss_sales_price BETWEEN 150.00 AND 200.00
+ AND household_demographics.hd_dep_count = 1 ))
+AND ((
+ store_sales.ss_addr_sk = customer_address.ca_address_sk
+ AND customer_address.ca_country = 'United States'
+ AND customer_address.ca_state IN ('KY',
+ 'GA',
+ 'NM')
+ AND store_sales.ss_net_profit BETWEEN 100 AND 200 )
+ OR (
+ store_sales.ss_addr_sk = customer_address.ca_address_sk
+ AND customer_address.ca_country = 'United States'
+ AND customer_address.ca_state IN ('MT',
+ 'OR',
+ 'IN')
+ AND store_sales.ss_net_profit BETWEEN 150 AND 300 )
+ OR (
+ store_sales.ss_addr_sk = customer_address.ca_address_sk
+ AND customer_address.ca_country = 'United States'
+ AND customer_address.ca_state IN ('WI', 'MO', 'WV')
+ AND store_sales.ss_net_profit BETWEEN 50 AND 250 ))
+PREHOOK: type: QUERY
+POSTHOOK: query: EXPLAIN SELECT Avg(ss_quantity) ,
+ Avg(ss_ext_sales_price) ,
+ Avg(ss_ext_wholesale_cost) ,
+ Sum(ss_ext_wholesale_cost)
+FROM store_sales ,
+ store ,
+ customer_demographics ,
+ household_demographics ,
+ customer_address ,
+ date_dim
+WHERE store.s_store_sk = store_sales.ss_store_sk
+AND store_sales.ss_sold_date_sk = date_dim.d_date_sk
+AND date_dim.d_year = 2001
+AND ((
+ store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk
+ AND customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk
+ AND customer_demographics.cd_marital_status = 'M'
+ AND customer_demographics.cd_education_status = '4 yr Degree'
+ AND store_sales.ss_sales_price BETWEEN 100.00 AND 150.00
+ AND household_demographics.hd_dep_count = 3 )
+ OR (
+ store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk
+ AND customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk
+ AND customer_demographics.cd_marital_status = 'D'
+ AND customer_demographics.cd_education_status = 'Primary'
+ AND store_sales.ss_sales_price BETWEEN 50.00 AND 100.00
+ AND household_demographics.hd_dep_count = 1 )
+ OR (
+ store_sales.ss_hdemo_sk=household_demographics.hd_demo_sk
+ AND customer_demographics.cd_demo_sk = ss_cdemo_sk
+ AND customer_demographics.cd_marital_status = 'U'
+ AND customer_demographics.cd_education_status = 'Advanced Degree'
+ AND store_sales.ss_sales_price BETWEEN 150.00 AND 200.00
+ AND household_demographics.hd_dep_count = 1 ))
+AND ((
+ store_sales.ss_addr_sk = customer_address.ca_address_sk
+ AND customer_address.ca_country = 'United States'
+ AND customer_address.ca_state IN ('KY',
+ 'GA',
+ 'NM')
+ AND store_sales.ss_net_profit BETWEEN 100 AND 200 )
+ OR (
+ store_sales.ss_addr_sk = customer_address.ca_address_sk
+ AND customer_address.ca_country = 'United States'
+ AND customer_address.ca_state IN ('MT',
+ 'OR',
+ 'IN')
+ AND store_sales.ss_net_profit BETWEEN 150 AND 300 )
+ OR (
+ store_sales.ss_addr_sk = customer_address.ca_address_sk
+ AND customer_address.ca_country = 'United States'
+ AND customer_address.ca_state IN ('WI', 'MO', 'WV')
+ AND store_sales.ss_net_profit BETWEEN 50 AND 250 ))
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 11 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 12 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_73]
+ compressed:false
+ Statistics:Num rows: 1 Data size: 344 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Group By Operator [GBY_71]
+ | aggregations:["avg(VALUE._col0)","avg(VALUE._col1)","avg(VALUE._col2)","sum(VALUE._col3)"]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 344 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_70]
+ sort order:
+ Statistics:Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: struct), _col1 (type: struct), _col2 (type: struct), _col3 (type: decimal(17,2))
+ Group By Operator [GBY_69]
+ aggregations:["avg(_col5)","avg(_col7)","avg(_col8)","sum(_col8)"]
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_106]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col5","_col7","_col8"]
+ | Statistics:Num rows: 9075000 Data size: 9210035328 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_66]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_62]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_101]
+ | predicate:((d_year = 2001) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_60]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_64]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 8250000 Data size: 8372759208 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: int), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2))
+ Select Operator [SEL_59]
+ outputColumnNames:["_col0","_col5","_col7","_col8"]
+ Statistics:Num rows: 8250000 Data size: 8372759208 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_94]
+ predicate:(((_col17) IN ('KY', 'GA', 'NM') and _col9 BETWEEN 100 AND 200) or ((_col17) IN ('MT', 'OR', 'IN') and _col9 BETWEEN 150 AND 300) or ((_col17) IN ('WI', 'MO', 'WV') and _col9 BETWEEN 50 AND 250)) (type: boolean)
+ Statistics:Num rows: 8250000 Data size: 8372759208 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_105]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col5","_col7","_col8","_col9","_col17"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_56]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_48]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_100]
+ | predicate:((((ca_state) IN ('KY', 'GA', 'NM') or (ca_state) IN ('MT', 'OR', 'IN') or (ca_state) IN ('WI', 'MO', 'WV')) and (ca_country = 'United States')) and ca_address_sk is not null) (type: boolean)
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_46]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_54]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 2244 Data size: 812719 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col5 (type: int), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2)), _col9 (type: decimal(7,2))
+ Select Operator [SEL_45]
+ outputColumnNames:["_col0","_col3","_col5","_col7","_col8","_col9"]
+ Statistics:Num rows: 2244 Data size: 812719 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_95]
+ predicate:(((_col12 = 'M') and (_col13 = '4 yr Degree') and _col6 BETWEEN 100.0 AND 150.0 and (_col15 = 3)) or ((_col12 = 'D') and (_col13 = 'Primary') and _col6 BETWEEN 50.0 AND 100.0 and (_col15 = 1)) or ((_col12 = 'U') and (_col13 = 'Advanced Degree') and _col6 BETWEEN 150.0 AND 200.0 and (_col15 = 1))) (type: boolean)
+ Statistics:Num rows: 2244 Data size: 812719 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_104]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col3","_col5","_col6","_col7","_col8","_col9","_col12","_col13","_col15"]
+ | Statistics:Num rows: 11979 Data size: 4338489 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_42]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int)
+ | Select Operator [SEL_24]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_99]
+ | predicate:(((hd_dep_count = 3) or (hd_dep_count = 1)) and hd_demo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_22]
+ | alias:household_demographics
+ | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_40]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 10890 Data size: 3944081 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2)), _col9 (type: decimal(7,2)), _col12 (type: string), _col13 (type: string)
+ Merge Join Operator [MERGEJOIN_103]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col3","_col5","_col6","_col7","_col8","_col9","_col12","_col13"]
+ | Statistics:Num rows: 10890 Data size: 3944081 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_37]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string)
+ | Select Operator [SEL_15]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_98]
+ | predicate:((((cd_marital_status = 'M') or (cd_marital_status = 'D') or (cd_marital_status = 'U')) and ((cd_education_status = '4 yr Degree') or (cd_education_status = 'Primary') or (cd_education_status = 'Advanced Degree'))) and cd_demo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_13]
+ | alias:customer_demographics
+ | Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_35]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 937 Data size: 1790951 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2)), _col9 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_102]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col5","_col6","_col7","_col8","_col9"]
+ | Statistics:Num rows: 937 Data size: 1790951 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_30]
+ | key expressions:_col4 (type: int)
+ | Map-reduce partition columns:_col4 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2)), _col9 (type: decimal(7,2))
+ | Select Operator [SEL_2]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_96]
+ | predicate:(((((((ss_sales_price BETWEEN 100.0 AND 150.0 or ss_sales_price BETWEEN 50.0 AND 100.0 or ss_sales_price BETWEEN 150.0 AND 200.0) and (ss_net_profit BETWEEN 100 AND 200 or ss_net_profit BETWEEN 150 AND 300 or ss_net_profit BETWEEN 50 AND 250)) and ss_store_sk is not null) and ss_cdemo_sk is not null) and ss_hdemo_sk is not null) and ss_addr_sk is not null) and ss_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_32]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_12]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_97]
+ predicate:s_store_sk is not null (type: boolean)
+ Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_11]
+ alias:store
+ Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query15.q.out b/ql/src/test/results/clientpositive/perf/query15.q.out
new file mode 100644
index 0000000..46f5997
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query15.q.out
@@ -0,0 +1,153 @@
+PREHOOK: query: explain select ca_zip ,sum(cs_sales_price) from catalog_sales ,customer ,customer_address ,date_dim where catalog_sales.cs_bill_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and ( substr(ca_zip,1,5) in ('85669', '86197','88274','83405','86475', '85392', '85460', '80348', '81792') or customer_address.ca_state in ('CA','WA','GA') or catalog_sales.cs_sales_price > 500) and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and date_dim.d_qoy = 2 and date_dim.d_year = 2000 group by ca_zip order by ca_zip limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select ca_zip ,sum(cs_sales_price) from catalog_sales ,customer ,customer_address ,date_dim where catalog_sales.cs_bill_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and ( substr(ca_zip,1,5) in ('85669', '86197','88274','83405','86475', '85392', '85460', '80348', '81792') or customer_address.ca_state in ('CA','WA','GA') or catalog_sales.cs_sales_price > 500) and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and date_dim.d_qoy = 2 and date_dim.d_year = 2000 group by ca_zip order by ca_zip limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 3 <- Map 8 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 9 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 6
+ File Output Operator [FS_34]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_33]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_32]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 13310000 Data size: 11446869580 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_31]
+ key expressions:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 13310000 Data size: 11446869580 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: decimal(17,2))
+ Group By Operator [GBY_29]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 13310000 Data size: 11446869580 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_28]
+ key expressions:_col0 (type: string)
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 26620000 Data size: 22893739161 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: decimal(17,2))
+ Group By Operator [GBY_27]
+ aggregations:["sum(_col2)"]
+ keys:_col7 (type: string)
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 26620000 Data size: 22893739161 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_26]
+ outputColumnNames:["_col7","_col2"]
+ Statistics:Num rows: 26620000 Data size: 22893739161 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_51]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col2","_col7"]
+ | Statistics:Num rows: 26620000 Data size: 22893739161 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_24]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_20]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_48]
+ | predicate:(((d_qoy = 2) and (d_year = 2000)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_18]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_22]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(7,2)), _col7 (type: string)
+ Select Operator [SEL_17]
+ outputColumnNames:["_col0","_col2","_col7"]
+ Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_44]
+ predicate:((substr(_col7, 1, 5)) IN ('85669', '86197', '88274', '83405', '86475', '85392', '85460', '80348', '81792') or (_col6) IN ('CA', 'WA', 'GA') or (_col2 > 500)) (type: boolean)
+ Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_50]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col6","_col7"]
+ | Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_14]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string)
+ | Select Operator [SEL_5]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_47]
+ | predicate:ca_address_sk is not null (type: boolean)
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_4]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_12]
+ key expressions:_col4 (type: int)
+ Map-reduce partition columns:_col4 (type: int)
+ sort order:+
+ Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_49]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col4"]
+ | Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_7]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col2 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_45]
+ | predicate:(cs_bill_customer_sk is not null and cs_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:catalog_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_9]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int)
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_46]
+ predicate:(c_customer_sk is not null and c_current_addr_sk is not null) (type: boolean)
+ Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:customer
+ Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query17.q.out b/ql/src/test/results/clientpositive/perf/query17.q.out
new file mode 100644
index 0000000..1769ec2
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query17.q.out
@@ -0,0 +1,264 @@
+PREHOOK: query: explain select i_item_id ,i_item_desc ,s_state ,count(ss_quantity) as store_sales_quantitycount ,avg(ss_quantity) as store_sales_quantityave ,stddev_samp(ss_quantity) as store_sales_quantitystdev ,stddev_samp(ss_quantity)/avg(ss_quantity) as store_sales_quantitycov ,count(sr_return_quantity) as_store_returns_quantitycount ,avg(sr_return_quantity) as_store_returns_quantityave ,stddev_samp(sr_return_quantity) as_store_returns_quantitystdev ,stddev_samp(sr_return_quantity)/avg(sr_return_quantity) as store_returns_quantitycov ,count(cs_quantity) as catalog_sales_quantitycount ,avg(cs_quantity) as catalog_sales_quantityave ,stddev_samp(cs_quantity)/avg(cs_quantity) as catalog_sales_quantitystdev ,stddev_samp(cs_quantity)/avg(cs_quantity) as catalog_sales_quantitycov from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_quarter_name = '2000Q1' and d1.d_date_sk = store_sales.ss_sold_date_sk and item.i_item_sk = store_sales.ss_item_sk and store.s_store_sk = store_sales.ss_store_sk and store_sales.ss_customer_sk = store_returns.sr_customer_sk and store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number and store_returns.sr_returned_date_sk = d2.d_date_sk and d2.d_quarter_name in ('2000Q1','2000Q2','2000Q3') and store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk and store_returns.sr_item_sk = catalog_sales.cs_item_sk and catalog_sales.cs_sold_date_sk = d3.d_date_sk and d3.d_quarter_name in ('2000Q1','2000Q2','2000Q3') group by i_item_id ,i_item_desc ,s_state order by i_item_id ,i_item_desc ,s_state limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_item_id ,i_item_desc ,s_state ,count(ss_quantity) as store_sales_quantitycount ,avg(ss_quantity) as store_sales_quantityave ,stddev_samp(ss_quantity) as store_sales_quantitystdev ,stddev_samp(ss_quantity)/avg(ss_quantity) as store_sales_quantitycov ,count(sr_return_quantity) as_store_returns_quantitycount ,avg(sr_return_quantity) as_store_returns_quantityave ,stddev_samp(sr_return_quantity) as_store_returns_quantitystdev ,stddev_samp(sr_return_quantity)/avg(sr_return_quantity) as store_returns_quantitycov ,count(cs_quantity) as catalog_sales_quantitycount ,avg(cs_quantity) as catalog_sales_quantityave ,stddev_samp(cs_quantity)/avg(cs_quantity) as catalog_sales_quantitystdev ,stddev_samp(cs_quantity)/avg(cs_quantity) as catalog_sales_quantitycov from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_quarter_name = '2000Q1' and d1.d_date_sk = store_sales.ss_sold_date_sk and item.i_item_sk = store_sales.ss_item_sk and store.s_store_sk = store_sales.ss_store_sk and store_sales.ss_customer_sk = store_returns.sr_customer_sk and store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number and store_returns.sr_returned_date_sk = d2.d_date_sk and d2.d_quarter_name in ('2000Q1','2000Q2','2000Q3') and store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk and store_returns.sr_item_sk = catalog_sales.cs_item_sk and catalog_sales.cs_sold_date_sk = d3.d_date_sk and d3.d_quarter_name in ('2000Q1','2000Q2','2000Q3') group by i_item_id ,i_item_desc ,s_state order by i_item_id ,i_item_desc ,s_state limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Reducer 9 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 11 (SIMPLE_EDGE)
+Reducer 3 <- Map 12 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 13 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 14 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 15 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 16 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Map 17 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 10
+ File Output Operator [FS_63]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_62]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_61]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_60]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ sort order:+++
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: bigint), _col4 (type: double), _col5 (type: double), _col6 (type: double), _col7 (type: bigint), _col8 (type: double), _col9 (type: double), _col10 (type: double), _col11 (type: bigint), _col12 (type: double), _col13 (type: double)
+ Select Operator [SEL_58]
+ outputColumnNames:["_col0","_col1","_col10","_col11","_col12","_col13","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_57]
+ | aggregations:["count(VALUE._col0)","avg(VALUE._col1)","stddev_samp(VALUE._col2)","count(VALUE._col3)","avg(VALUE._col4)","stddev_samp(VALUE._col5)","count(VALUE._col6)","avg(VALUE._col7)","stddev_samp(VALUE._col8)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_56]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ sort order:+++
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: bigint), _col4 (type: struct), _col5 (type: struct), _col6 (type: bigint), _col7 (type: struct), _col8 (type: struct), _col9 (type: bigint), _col10 (type: struct), _col11 (type: struct)
+ Group By Operator [GBY_55]
+ aggregations:["count(_col5)","avg(_col5)","stddev_samp(_col5)","count(_col10)","avg(_col10)","stddev_samp(_col10)","count(_col14)","avg(_col14)","stddev_samp(_col14)"]
+ keys:_col22 (type: string), _col24 (type: string), _col25 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_54]
+ outputColumnNames:["_col22","_col24","_col25","_col5","_col10","_col14"]
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_113]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col5","_col10","_col14","_col22","_col24","_col25"]
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_52]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string)
+ | Select Operator [SEL_18]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_106]
+ | predicate:i_item_sk is not null (type: boolean)
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_17]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_50]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 26735 Data size: 29919145 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: int), _col10 (type: int), _col14 (type: int), _col22 (type: string)
+ Merge Join Operator [MERGEJOIN_112]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col5","_col10","_col14","_col22"]
+ | Statistics:Num rows: 26735 Data size: 29919145 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 16 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_47]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_16]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_105]
+ | predicate:s_store_sk is not null (type: boolean)
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_15]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_45]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 24305 Data size: 27199223 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col5 (type: int), _col10 (type: int), _col14 (type: int)
+ Merge Join Operator [MERGEJOIN_111]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col11 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col5","_col10","_col14"]
+ | Statistics:Num rows: 24305 Data size: 27199223 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_42]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_14]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_104]
+ | predicate:((d_quarter_name) IN ('2000Q1', '2000Q2', '2000Q3') and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_12]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_40]
+ key expressions:_col11 (type: int)
+ Map-reduce partition columns:_col11 (type: int)
+ sort order:+
+ Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col10 (type: int), _col14 (type: int)
+ Merge Join Operator [MERGEJOIN_110]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col6 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col5","_col10","_col11","_col14"]
+ | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_37]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_11]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_103]
+ | predicate:((d_quarter_name) IN ('2000Q1', '2000Q2', '2000Q3') and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_9]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_35]
+ key expressions:_col6 (type: int)
+ Map-reduce partition columns:_col6 (type: int)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col10 (type: int), _col11 (type: int), _col14 (type: int)
+ Merge Join Operator [MERGEJOIN_109]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col5","_col6","_col10","_col11","_col14"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_32]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_8]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_102]
+ | predicate:((d_quarter_name = '2000Q1') and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_6]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_30]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: int), _col10 (type: int), _col11 (type: int), _col14 (type: int)
+ Merge Join Operator [MERGEJOIN_108]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col8 (type: int), _col7 (type: int)","1":"_col1 (type: int), _col2 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col3","_col5","_col6","_col10","_col11","_col14"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_27]
+ | key expressions:_col1 (type: int), _col2 (type: int)
+ | Map-reduce partition columns:_col1 (type: int), _col2 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col3 (type: int)
+ | Select Operator [SEL_5]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_101]
+ | predicate:((cs_bill_customer_sk is not null and cs_item_sk is not null) and cs_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_4]
+ | alias:catalog_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_25]
+ key expressions:_col8 (type: int), _col7 (type: int)
+ Map-reduce partition columns:_col8 (type: int), _col7 (type: int)
+ sort order:++
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col1 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: int), _col10 (type: int)
+ Merge Join Operator [MERGEJOIN_107]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int), _col1 (type: int), _col4 (type: int)","1":"_col2 (type: int), _col1 (type: int), _col3 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col3","_col5","_col6","_col7","_col8","_col10"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_20]
+ | key expressions:_col2 (type: int), _col1 (type: int), _col4 (type: int)
+ | Map-reduce partition columns:_col2 (type: int), _col1 (type: int), _col4 (type: int)
+ | sort order:+++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col3 (type: int), _col5 (type: int)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_99]
+ | predicate:((((ss_customer_sk is not null and ss_item_sk is not null) and ss_ticket_number is not null) and ss_sold_date_sk is not null) and ss_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_22]
+ key expressions:_col2 (type: int), _col1 (type: int), _col3 (type: int)
+ Map-reduce partition columns:_col2 (type: int), _col1 (type: int), _col3 (type: int)
+ sort order:+++
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col4 (type: int)
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_100]
+ predicate:(((sr_customer_sk is not null and sr_item_sk is not null) and sr_ticket_number is not null) and sr_returned_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_2]
+ alias:store_returns
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query18.q.out b/ql/src/test/results/clientpositive/perf/query18.q.out
new file mode 100644
index 0000000..9712a4d
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query18.q.out
@@ -0,0 +1,236 @@
+PREHOOK: query: explain select i_item_id, ca_country, ca_state, ca_county, avg( cast(cs_quantity as decimal(12,2))) agg1, avg( cast(cs_list_price as decimal(12,2))) agg2, avg( cast(cs_coupon_amt as decimal(12,2))) agg3, avg( cast(cs_sales_price as decimal(12,2))) agg4, avg( cast(cs_net_profit as decimal(12,2))) agg5, avg( cast(c_birth_year as decimal(12,2))) agg6, avg( cast(cd1.cd_dep_count as decimal(12,2))) agg7 from catalog_sales, date_dim, customer_demographics cd1, item, customer, customer_address, customer_demographics cd2 where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and catalog_sales.cs_item_sk = item.i_item_sk and catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk and catalog_sales.cs_bill_customer_sk = customer.c_customer_sk and cd1.cd_gender = 'M' and cd1.cd_education_status = 'College' and customer.c_current_cdemo_sk = cd2.cd_demo_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and c_birth_month in (9,5,12,4,1,10) and d_year = 2001 and ca_state in ('ND','WI','AL' ,'NC','OK','MS','TN') group by i_item_id, ca_country, ca_state, ca_county with rollup order by ca_country, ca_state, ca_county, i_item_id limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_item_id, ca_country, ca_state, ca_county, avg( cast(cs_quantity as decimal(12,2))) agg1, avg( cast(cs_list_price as decimal(12,2))) agg2, avg( cast(cs_coupon_amt as decimal(12,2))) agg3, avg( cast(cs_sales_price as decimal(12,2))) agg4, avg( cast(cs_net_profit as decimal(12,2))) agg5, avg( cast(c_birth_year as decimal(12,2))) agg6, avg( cast(cd1.cd_dep_count as decimal(12,2))) agg7 from catalog_sales, date_dim, customer_demographics cd1, item, customer, customer_address, customer_demographics cd2 where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and catalog_sales.cs_item_sk = item.i_item_sk and catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk and catalog_sales.cs_bill_customer_sk = customer.c_customer_sk and cd1.cd_gender = 'M' and cd1.cd_education_status = 'College' and customer.c_current_cdemo_sk = cd2.cd_demo_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and c_birth_month in (9,5,12,4,1,10) and d_year = 2001 and ca_state in ('ND','WI','AL' ,'NC','OK','MS','TN') group by i_item_id, ca_country, ca_state, ca_county with rollup order by ca_country, ca_state, ca_county, i_item_id limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 10 (SIMPLE_EDGE)
+Reducer 3 <- Map 11 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 12 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 13 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 14 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 15 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 9
+ File Output Operator [FS_57]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 101400 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_56]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 101400 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_55]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"]
+ | Statistics:Num rows: 30250000 Data size: 30700117762 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_54]
+ key expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col0 (type: string)
+ sort order:++++
+ Statistics:Num rows: 30250000 Data size: 30700117762 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: decimal(16,6)), _col5 (type: decimal(16,6)), _col6 (type: decimal(16,6)), _col7 (type: decimal(16,6)), _col8 (type: decimal(16,6)), _col9 (type: decimal(16,6)), _col10 (type: decimal(16,6))
+ Select Operator [SEL_53]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"]
+ Statistics:Num rows: 30250000 Data size: 30700117762 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_52]
+ | aggregations:["avg(VALUE._col0)","avg(VALUE._col1)","avg(VALUE._col2)","avg(VALUE._col3)","avg(VALUE._col4)","avg(VALUE._col5)","avg(VALUE._col6)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
+ | Statistics:Num rows: 30250000 Data size: 30700117762 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_51]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ sort order:+++++
+ Statistics:Num rows: 60500000 Data size: 61400235525 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: struct), _col6 (type: struct), _col7 (type: struct), _col8 (type: struct), _col9 (type: struct), _col10 (type: struct), _col11 (type: struct)
+ Group By Operator [GBY_50]
+ aggregations:["avg(_col4)","avg(_col5)","avg(_col6)","avg(_col7)","avg(_col8)","avg(_col9)","avg(_col10)"]
+ keys:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), '0' (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
+ Statistics:Num rows: 60500000 Data size: 61400235525 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_48]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"]
+ Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_97]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col18 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col5","_col6","_col7","_col8","_col14","_col16","_col21","_col23","_col24","_col25"]
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_46]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_17]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_91]
+ | predicate:cd_demo_sk is not null (type: boolean)
+ | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_16]
+ | alias:cd1
+ | Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_44]
+ key expressions:_col18 (type: int)
+ Map-reduce partition columns:_col18 (type: int)
+ sort order:+
+ Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2)), _col14 (type: int), _col16 (type: string), _col21 (type: int), _col23 (type: string), _col24 (type: string), _col25 (type: string)
+ Merge Join Operator [MERGEJOIN_96]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col19 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col5","_col6","_col7","_col8","_col14","_col16","_col18","_col21","_col23","_col24","_col25"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_41]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string)
+ | Select Operator [SEL_15]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_90]
+ | predicate:((ca_state) IN ('ND', 'WI', 'AL', 'NC', 'OK', 'MS', 'TN') and ca_address_sk is not null) (type: boolean)
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_13]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_39]
+ key expressions:_col19 (type: int)
+ Map-reduce partition columns:_col19 (type: int)
+ sort order:+
+ Statistics:Num rows: 5500000 Data size: 4730111191 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2)), _col14 (type: int), _col16 (type: string), _col18 (type: int), _col21 (type: int)
+ Merge Join Operator [MERGEJOIN_95]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col5","_col6","_col7","_col8","_col14","_col16","_col18","_col19","_col21"]
+ | Statistics:Num rows: 5500000 Data size: 4730111191 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_36]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 5000000 Data size: 4300100990 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col4 (type: int)
+ | Select Operator [SEL_12]
+ | outputColumnNames:["_col0","_col1","_col2","_col4"]
+ | Statistics:Num rows: 5000000 Data size: 4300100990 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_89]
+ | predicate:((((c_birth_month) IN (9, 5, 12, 4, 1, 10) and c_customer_sk is not null) and c_current_addr_sk is not null) and c_current_cdemo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 5000000 Data size: 4300100990 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_10]
+ | alias:customer
+ | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_34]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2)), _col14 (type: int), _col16 (type: string)
+ Merge Join Operator [MERGEJOIN_94]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col4","_col5","_col6","_col7","_col8","_col14","_col16"]
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_31]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_9]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_88]
+ | predicate:i_item_sk is not null (type: boolean)
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_8]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_29]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2)), _col14 (type: int)
+ Merge Join Operator [MERGEJOIN_93]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col4","_col5","_col6","_col7","_col8","_col14"]
+ | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_26]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: int)
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0","_col3"]
+ | Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_87]
+ | predicate:(((cd_gender = 'M') and (cd_education_status = 'College')) and cd_demo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:cd1
+ | Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_24]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_92]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_19]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_85]
+ | predicate:(((cs_sold_date_sk is not null and cs_bill_cdemo_sk is not null) and cs_item_sk is not null) and cs_bill_customer_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:catalog_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_21]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_86]
+ predicate:((d_year = 2001) and d_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:date_dim
+ Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query19.q.out b/ql/src/test/results/clientpositive/perf/query19.q.out
new file mode 100644
index 0000000..d56a80d
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query19.q.out
@@ -0,0 +1,207 @@
+PREHOOK: query: explain select i_brand_id brand_id, i_brand brand, i_manufact_id, i_manufact, sum(ss_ext_sales_price) ext_price from date_dim, store_sales, item,customer,customer_address,store where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and i_manager_id=7 and d_moy=11 and d_year=1999 and store_sales.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and substr(ca_zip,1,5) <> substr(s_zip,1,5) and store_sales.ss_store_sk = store.s_store_sk group by i_brand ,i_brand_id ,i_manufact_id ,i_manufact order by ext_price desc ,i_brand ,i_brand_id ,i_manufact_id ,i_manufact limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_brand_id brand_id, i_brand brand, i_manufact_id, i_manufact, sum(ss_ext_sales_price) ext_price from date_dim, store_sales, item,customer,customer_address,store where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and i_manager_id=7 and d_moy=11 and d_year=1999 and store_sales.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = customer_address.ca_address_sk and substr(ca_zip,1,5) <> substr(s_zip,1,5) and store_sales.ss_store_sk = store.s_store_sk group by i_brand ,i_brand_id ,i_manufact_id ,i_manufact order by ext_price desc ,i_brand ,i_brand_id ,i_manufact_id ,i_manufact limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 9 (SIMPLE_EDGE)
+Reducer 3 <- Map 10 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 11 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 12 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 13 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Reducer 7 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 8
+ File Output Operator [FS_49]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_48]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_47]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 13310000 Data size: 11446869580 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_46]
+ key expressions:_col4 (type: decimal(17,2)), _col1 (type: string), _col0 (type: int), _col2 (type: int), _col3 (type: string)
+ sort order:-++++
+ Statistics:Num rows: 13310000 Data size: 11446869580 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_43]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: string), KEY._col2 (type: int), KEY._col3 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 13310000 Data size: 11446869580 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_42]
+ key expressions:_col0 (type: int), _col1 (type: string), _col2 (type: int), _col3 (type: string)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: string), _col2 (type: int), _col3 (type: string)
+ sort order:++++
+ Statistics:Num rows: 26620000 Data size: 22893739161 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: decimal(17,2))
+ Group By Operator [GBY_41]
+ aggregations:["sum(_col7)"]
+ keys:_col9 (type: int), _col10 (type: string), _col11 (type: int), _col12 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 26620000 Data size: 22893739161 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_40]
+ outputColumnNames:["_col9","_col10","_col11","_col12","_col7"]
+ Statistics:Num rows: 26620000 Data size: 22893739161 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_70]
+ predicate:(substr(_col17, 1, 5) <> substr(_col19, 1, 5)) (type: boolean)
+ Statistics:Num rows: 26620000 Data size: 22893739161 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_81]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col6 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col7","_col9","_col10","_col11","_col12","_col17","_col19"]
+ | Statistics:Num rows: 26620000 Data size: 22893739161 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_37]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_13]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_76]
+ | predicate:s_store_sk is not null (type: boolean)
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_12]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_35]
+ key expressions:_col6 (type: int)
+ Map-reduce partition columns:_col6 (type: int)
+ sort order:+
+ Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col7 (type: decimal(7,2)), _col9 (type: int), _col10 (type: string), _col11 (type: int), _col12 (type: string), _col17 (type: string)
+ Merge Join Operator [MERGEJOIN_80]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col15 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col6","_col7","_col9","_col10","_col11","_col12","_col17"]
+ | Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_32]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_11]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_75]
+ | predicate:ca_address_sk is not null (type: boolean)
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_10]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_30]
+ key expressions:_col15 (type: int)
+ Map-reduce partition columns:_col15 (type: int)
+ sort order:+
+ Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col6 (type: int), _col7 (type: decimal(7,2)), _col9 (type: int), _col10 (type: string), _col11 (type: int), _col12 (type: string)
+ Merge Join Operator [MERGEJOIN_79]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col5 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col6","_col7","_col9","_col10","_col11","_col12","_col15"]
+ | Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_27]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int)
+ | Select Operator [SEL_9]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_74]
+ | predicate:(c_customer_sk is not null and c_current_addr_sk is not null) (type: boolean)
+ | Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_8]
+ | alias:customer
+ | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_25]
+ key expressions:_col5 (type: int)
+ Map-reduce partition columns:_col5 (type: int)
+ sort order:+
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col6 (type: int), _col7 (type: decimal(7,2)), _col9 (type: int), _col10 (type: string), _col11 (type: int), _col12 (type: string)
+ Merge Join Operator [MERGEJOIN_78]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col5","_col6","_col7","_col9","_col10","_col11","_col12"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_22]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: string), _col3 (type: int), _col4 (type: string)
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_73]
+ | predicate:((i_manager_id = 7) and i_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col4 (type: int)
+ Map-reduce partition columns:_col4 (type: int)
+ sort order:+
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: int), _col6 (type: int), _col7 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_77]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_15]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_2]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_71]
+ | predicate:(((d_moy = 11) and (d_year = 1999)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_0]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_17]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2))
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_72]
+ predicate:(((ss_sold_date_sk is not null and ss_item_sk is not null) and ss_customer_sk is not null) and ss_store_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_3]
+ alias:store_sales
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query20.q.out b/ql/src/test/results/clientpositive/perf/query20.q.out
new file mode 100644
index 0000000..6934e45
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query20.q.out
@@ -0,0 +1,138 @@
+PREHOOK: query: explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(cs_ext_sales_price) as itemrevenue ,sum(cs_ext_sales_price)*100/sum(sum(cs_ext_sales_price)) over (partition by i_class) as revenueratio from catalog_sales ,item ,date_dim where catalog_sales.cs_item_sk = item.i_item_sk and i_category in ('Jewelry', 'Sports', 'Books') and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and d_date between '2001-01-12' and '2001-02-11' group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(cs_ext_sales_price) as itemrevenue ,sum(cs_ext_sales_price)*100/sum(sum(cs_ext_sales_price)) over (partition by i_class) as revenueratio from catalog_sales ,item ,date_dim where catalog_sales.cs_item_sk = item.i_item_sk and i_category in ('Jewelry', 'Sports', 'Books') and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and d_date between '2001-01-12' and '2001-02-11' group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 3 <- Map 8 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 6
+ File Output Operator [FS_31]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_30]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_29]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_28]
+ key expressions:_col1 (type: string), _col2 (type: string), _col4 (type: string), _col0 (type: string), _col6 (type: decimal(38,23))
+ sort order:+++++
+ Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: decimal(7,2)), _col5 (type: decimal(17,2))
+ Select Operator [SEL_26]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ PTF Operator [PTF_25]
+ Function definitions:[{"Input definition":{"type:":"WINDOWING"}},{"name:":"windowingtablefunction","order by:":"_col3","partition by:":"_col3"}]
+ Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_24]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_23]
+ key expressions:_col3 (type: string)
+ Map-reduce partition columns:_col3 (type: string)
+ sort order:+
+ Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col4 (type: decimal(7,2)), _col5 (type: decimal(17,2))
+ Select Operator [SEL_22]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_21]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: decimal(7,2)), KEY._col3 (type: string), KEY._col4 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: decimal(7,2)), _col3 (type: string), _col4 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: decimal(7,2)), _col3 (type: string), _col4 (type: string)
+ sort order:+++++
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: decimal(17,2))
+ Group By Operator [GBY_19]
+ aggregations:["sum(_col2)"]
+ keys:_col4 (type: string), _col5 (type: string), _col6 (type: decimal(7,2)), _col7 (type: string), _col8 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_18]
+ outputColumnNames:["_col4","_col5","_col6","_col7","_col8","_col2"]
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_41]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col2","_col4","_col5","_col6","_col7","_col8"]
+ | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_16]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_39]
+ | predicate:(d_date BETWEEN '2001-01-12' AND '2001-02-11' and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_14]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(7,2)), _col4 (type: string), _col5 (type: string), _col6 (type: decimal(7,2)), _col7 (type: string), _col8 (type: string)
+ Merge Join Operator [MERGEJOIN_40]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col4","_col5","_col6","_col7","_col8"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_9]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col2 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_37]
+ | predicate:(cs_item_sk is not null and cs_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:catalog_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_11]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: decimal(7,2)), _col4 (type: string), _col5 (type: string)
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_38]
+ predicate:((i_category) IN ('Jewelry', 'Sports', 'Books') and i_item_sk is not null) (type: boolean)
+ Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:item
+ Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query21.q.out b/ql/src/test/results/clientpositive/perf/query21.q.out
new file mode 100644
index 0000000..f9bcd30
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query21.q.out
@@ -0,0 +1,201 @@
+PREHOOK: query: explain select *
+ from(select w_warehouse_name
+ ,i_item_id
+ ,sum(case when (cast(d_date as date) < cast ('1998-04-08' as date))
+ then inv_quantity_on_hand
+ else 0 end) as inv_before
+ ,sum(case when (cast(d_date as date) >= cast ('1998-04-08' as date))
+ then inv_quantity_on_hand
+ else 0 end) as inv_after
+ from inventory
+ ,warehouse
+ ,item
+ ,date_dim
+ where i_current_price between 0.99 and 1.49
+ and item.i_item_sk = inventory.inv_item_sk
+ and inventory.inv_warehouse_sk = warehouse.w_warehouse_sk
+ and inventory.inv_date_sk = date_dim.d_date_sk
+ and d_date between '1998-03-09' and '1998-05-07'
+ group by w_warehouse_name, i_item_id) x
+ where (case when inv_before > 0
+ then inv_after / inv_before
+ else null
+ end) between 2.0/3.0 and 3.0/2.0
+ order by w_warehouse_name
+ ,i_item_id
+ limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select *
+ from(select w_warehouse_name
+ ,i_item_id
+ ,sum(case when (cast(d_date as date) < cast ('1998-04-08' as date))
+ then inv_quantity_on_hand
+ else 0 end) as inv_before
+ ,sum(case when (cast(d_date as date) >= cast ('1998-04-08' as date))
+ then inv_quantity_on_hand
+ else 0 end) as inv_after
+ from inventory
+ ,warehouse
+ ,item
+ ,date_dim
+ where i_current_price between 0.99 and 1.49
+ and item.i_item_sk = inventory.inv_item_sk
+ and inventory.inv_warehouse_sk = warehouse.w_warehouse_sk
+ and inventory.inv_date_sk = date_dim.d_date_sk
+ and d_date between '1998-03-09' and '1998-05-07'
+ group by w_warehouse_name, i_item_id) x
+ where (case when inv_before > 0
+ then inv_after / inv_before
+ else null
+ end) between 2.0/3.0 and 3.0/2.0
+ order by w_warehouse_name
+ ,i_item_id
+ limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 3 <- Map 8 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 9 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 6
+ File Output Operator [FS_35]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_34]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_33]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 34938 Data size: 50180683 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_32]
+ key expressions:_col0 (type: string), _col1 (type: string)
+ sort order:++
+ Statistics:Num rows: 34938 Data size: 50180683 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: bigint), _col3 (type: bigint)
+ Filter Operator [FIL_45]
+ predicate:CASE WHEN ((_col2 > 0)) THEN ((UDFToDouble(_col3) / UDFToDouble(_col2))) ELSE (null) END BETWEEN 0.6666666666666666 AND 1.5 (type: boolean)
+ Statistics:Num rows: 34938 Data size: 50180683 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_29]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_28]
+ key expressions:_col0 (type: string), _col1 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string)
+ sort order:++
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: bigint), _col3 (type: bigint)
+ Group By Operator [GBY_27]
+ aggregations:["sum(_col2)","sum(_col3)"]
+ keys:_col0 (type: string), _col1 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_25]
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_52]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col3","_col5","_col7","_col10"]
+ | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_23]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_9]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_49]
+ | predicate:(d_date BETWEEN '1998-03-09' AND '1998-05-07' and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_7]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_21]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: int), _col5 (type: string), _col7 (type: string)
+ Merge Join Operator [MERGEJOIN_51]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col3","_col5","_col7"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_18]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_6]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_48]
+ | predicate:(i_current_price BETWEEN 0.99 AND 1.49 and i_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_4]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_16]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 15 Data size: 15856 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col3 (type: int), _col5 (type: string)
+ Merge Join Operator [MERGEJOIN_50]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col3","_col5"]
+ | Statistics:Num rows: 15 Data size: 15856 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_11]
+ | key expressions:_col2 (type: int)
+ | Map-reduce partition columns:_col2 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: int), _col3 (type: int)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_46]
+ | predicate:((inv_warehouse_sk is not null and inv_item_sk is not null) and inv_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:inventory
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_13]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string)
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_47]
+ predicate:w_warehouse_sk is not null (type: boolean)
+ Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:warehouse
+ Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query22.q.out b/ql/src/test/results/clientpositive/perf/query22.q.out
new file mode 100644
index 0000000..feb0a06
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query22.q.out
@@ -0,0 +1,148 @@
+PREHOOK: query: explain select i_product_name ,i_brand ,i_class ,i_category ,avg(inv_quantity_on_hand) qoh from inventory ,date_dim ,item ,warehouse where inventory.inv_date_sk=date_dim.d_date_sk and inventory.inv_item_sk=item.i_item_sk and inventory.inv_warehouse_sk = warehouse.w_warehouse_sk and date_dim.d_month_seq between 1193 and 1193 + 11 group by i_product_name ,i_brand ,i_class ,i_category with rollup order by qoh, i_product_name, i_brand, i_class, i_category limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_product_name ,i_brand ,i_class ,i_category ,avg(inv_quantity_on_hand) qoh from inventory ,date_dim ,item ,warehouse where inventory.inv_date_sk=date_dim.d_date_sk and inventory.inv_item_sk=item.i_item_sk and inventory.inv_warehouse_sk = warehouse.w_warehouse_sk and date_dim.d_month_seq between 1193 and 1193 + 11 group by i_product_name ,i_brand ,i_class ,i_category with rollup order by qoh, i_product_name, i_brand, i_class, i_category limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 3 <- Map 8 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 9 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 6
+ File Output Operator [FS_33]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_32]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_31]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 698775 Data size: 1003635230 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_30]
+ key expressions:_col4 (type: double), _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
+ sort order:+++++
+ Statistics:Num rows: 698775 Data size: 1003635230 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_28]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 698775 Data size: 1003635230 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_27]
+ | aggregations:["avg(VALUE._col0)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col5"]
+ | Statistics:Num rows: 698775 Data size: 1003635230 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_26]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ sort order:+++++
+ Statistics:Num rows: 1397550 Data size: 2007270460 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: struct)
+ Group By Operator [GBY_25]
+ aggregations:["avg(_col3)"]
+ keys:_col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string), '0' (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 1397550 Data size: 2007270460 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_24]
+ outputColumnNames:["_col7","_col8","_col9","_col10","_col3"]
+ Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_49]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col3","_col7","_col8","_col9","_col10"]
+ | Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_22]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_8]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_46]
+ | predicate:w_warehouse_sk is not null (type: boolean)
+ | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_7]
+ | alias:warehouse
+ | Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: int), _col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string)
+ Merge Join Operator [MERGEJOIN_48]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col2","_col3","_col7","_col8","_col9","_col10"]
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_17]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ | Select Operator [SEL_6]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_45]
+ | predicate:i_item_sk is not null (type: boolean)
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_15]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: int), _col3 (type: int)
+ Merge Join Operator [MERGEJOIN_47]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_10]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_43]
+ | predicate:((inv_date_sk is not null and inv_item_sk is not null) and inv_warehouse_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:inventory
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_12]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_44]
+ predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:date_dim
+ Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query25.q.out b/ql/src/test/results/clientpositive/perf/query25.q.out
new file mode 100644
index 0000000..6908ba6
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query25.q.out
@@ -0,0 +1,264 @@
+PREHOOK: query: explain select i_item_id ,i_item_desc ,s_store_id ,s_store_name ,sum(ss_net_profit) as store_sales_profit ,sum(sr_net_loss) as store_returns_loss ,sum(cs_net_profit) as catalog_sales_profit from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_moy = 4 and d1.d_year = 1998 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_moy between 4 and 10 and d2.d_year = 1998 and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_moy between 4 and 10 and d3.d_year = 1998 group by i_item_id ,i_item_desc ,s_store_id ,s_store_name order by i_item_id ,i_item_desc ,s_store_id ,s_store_name limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_item_id ,i_item_desc ,s_store_id ,s_store_name ,sum(ss_net_profit) as store_sales_profit ,sum(sr_net_loss) as store_returns_loss ,sum(cs_net_profit) as catalog_sales_profit from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_moy = 4 and d1.d_year = 1998 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_moy between 4 and 10 and d2.d_year = 1998 and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_moy between 4 and 10 and d3.d_year = 1998 group by i_item_id ,i_item_desc ,s_store_id ,s_store_name order by i_item_id ,i_item_desc ,s_store_id ,s_store_name limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Reducer 9 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 11 (SIMPLE_EDGE)
+Reducer 3 <- Map 12 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 13 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 14 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 15 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 16 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Map 17 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 10
+ File Output Operator [FS_62]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_61]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_60]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_59]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
+ sort order:++++
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2))
+ Select Operator [SEL_58]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_57]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_56]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
+ sort order:++++
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2))
+ Group By Operator [GBY_55]
+ aggregations:["sum(_col5)","sum(_col10)","sum(_col14)"]
+ keys:_col25 (type: string), _col26 (type: string), _col28 (type: string), _col29 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_54]
+ outputColumnNames:["_col25","_col26","_col28","_col29","_col5","_col10","_col14"]
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_112]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col5","_col10","_col14","_col25","_col26","_col28","_col29"]
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_52]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string)
+ | Select Operator [SEL_18]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_105]
+ | predicate:i_item_sk is not null (type: boolean)
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_17]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_50]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 13367 Data size: 14959572 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col14 (type: decimal(7,2)), _col25 (type: string), _col26 (type: string)
+ Merge Join Operator [MERGEJOIN_111]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col5","_col10","_col14","_col25","_col26"]
+ | Statistics:Num rows: 13367 Data size: 14959572 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 16 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_47]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string)
+ | Select Operator [SEL_16]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_104]
+ | predicate:s_store_sk is not null (type: boolean)
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_15]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_45]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 12152 Data size: 13599611 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col5 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col14 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_110]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col11 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col5","_col10","_col14"]
+ | Statistics:Num rows: 12152 Data size: 13599611 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_42]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_14]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_103]
+ | predicate:((d_moy BETWEEN 4 AND 10 and (d_year = 1998)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_12]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_40]
+ key expressions:_col11 (type: int)
+ Map-reduce partition columns:_col11 (type: int)
+ sort order:+
+ Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col14 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_109]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col6 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col5","_col10","_col11","_col14"]
+ | Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_37]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_11]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_102]
+ | predicate:((d_moy BETWEEN 4 AND 10 and (d_year = 1998)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_9]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_35]
+ key expressions:_col6 (type: int)
+ Map-reduce partition columns:_col6 (type: int)
+ sort order:+
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: int), _col14 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_108]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col5","_col6","_col10","_col11","_col14"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_32]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_8]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_101]
+ | predicate:(((d_moy = 4) and (d_year = 1998)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_6]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_30]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: decimal(7,2)), _col6 (type: int), _col10 (type: decimal(7,2)), _col11 (type: int), _col14 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_107]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col8 (type: int), _col7 (type: int)","1":"_col1 (type: int), _col2 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col3","_col5","_col6","_col10","_col11","_col14"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_27]
+ | key expressions:_col1 (type: int), _col2 (type: int)
+ | Map-reduce partition columns:_col1 (type: int), _col2 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col3 (type: decimal(7,2))
+ | Select Operator [SEL_5]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_100]
+ | predicate:((cs_bill_customer_sk is not null and cs_item_sk is not null) and cs_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_4]
+ | alias:catalog_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_25]
+ key expressions:_col8 (type: int), _col7 (type: int)
+ Map-reduce partition columns:_col8 (type: int), _col7 (type: int)
+ sort order:++
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col1 (type: int), _col3 (type: int), _col5 (type: decimal(7,2)), _col6 (type: int), _col10 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_106]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int), _col1 (type: int), _col4 (type: int)","1":"_col2 (type: int), _col1 (type: int), _col3 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col3","_col5","_col6","_col7","_col8","_col10"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_20]
+ | key expressions:_col2 (type: int), _col1 (type: int), _col4 (type: int)
+ | Map-reduce partition columns:_col2 (type: int), _col1 (type: int), _col4 (type: int)
+ | sort order:+++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col3 (type: int), _col5 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_98]
+ | predicate:((((ss_customer_sk is not null and ss_item_sk is not null) and ss_ticket_number is not null) and ss_sold_date_sk is not null) and ss_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_22]
+ key expressions:_col2 (type: int), _col1 (type: int), _col3 (type: int)
+ Map-reduce partition columns:_col2 (type: int), _col1 (type: int), _col3 (type: int)
+ sort order:+++
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col4 (type: decimal(7,2))
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_99]
+ predicate:(((sr_customer_sk is not null and sr_item_sk is not null) and sr_ticket_number is not null) and sr_returned_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_2]
+ alias:store_returns
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query26.q.out b/ql/src/test/results/clientpositive/perf/query26.q.out
new file mode 100644
index 0000000..7700c4a
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query26.q.out
@@ -0,0 +1,174 @@
+PREHOOK: query: explain select i_item_id, avg(cs_quantity) agg1, avg(cs_list_price) agg2, avg(cs_coupon_amt) agg3, avg(cs_sales_price) agg4 from catalog_sales, customer_demographics, date_dim, item, promotion where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and catalog_sales.cs_item_sk = item.i_item_sk and catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk and catalog_sales.cs_promo_sk = promotion.p_promo_sk and cd_gender = 'F' and cd_marital_status = 'W' and cd_education_status = 'Primary' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 1998 group by i_item_id order by i_item_id limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_item_id, avg(cs_quantity) agg1, avg(cs_list_price) agg2, avg(cs_coupon_amt) agg3, avg(cs_sales_price) agg4 from catalog_sales, customer_demographics, date_dim, item, promotion where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and catalog_sales.cs_item_sk = item.i_item_sk and catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk and catalog_sales.cs_promo_sk = promotion.p_promo_sk and cd_gender = 'F' and cd_marital_status = 'W' and cd_education_status = 'Primary' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 1998 group by i_item_id order by i_item_id limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 11 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_41]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_40]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_39]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_38]
+ key expressions:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: double), _col2 (type: decimal(11,6)), _col3 (type: decimal(11,6)), _col4 (type: decimal(11,6))
+ Group By Operator [GBY_36]
+ | aggregations:["avg(VALUE._col0)","avg(VALUE._col1)","avg(VALUE._col2)","avg(VALUE._col3)"]
+ | keys:KEY._col0 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_35]
+ key expressions:_col0 (type: string)
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: struct), _col2 (type: struct), _col3 (type: struct), _col4 (type: struct)
+ Group By Operator [GBY_34]
+ aggregations:["avg(_col4)","avg(_col5)","avg(_col7)","avg(_col6)"]
+ keys:_col15 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_33]
+ outputColumnNames:["_col15","_col4","_col5","_col7","_col6"]
+ Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_64]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col5","_col6","_col7","_col15"]
+ | Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_31]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1150 Data size: 1356710 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_12]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1150 Data size: 1356710 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_60]
+ | predicate:(((p_channel_email = 'N') or (p_channel_event = 'N')) and p_promo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1150 Data size: 1356710 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_10]
+ | alias:promotion
+ | Statistics:Num rows: 2300 Data size: 2713420 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_29]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col15 (type: string)
+ Merge Join Operator [MERGEJOIN_63]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col3","_col4","_col5","_col6","_col7","_col15"]
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_26]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_9]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_59]
+ | predicate:i_item_sk is not null (type: boolean)
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_8]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_24]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_62]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col2","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_21]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_58]
+ | predicate:((d_year = 1998) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_19]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1361 Data size: 493209 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_61]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 1361 Data size: 493209 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_14]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_56]
+ | predicate:(((cs_bill_cdemo_sk is not null and cs_sold_date_sk is not null) and cs_item_sk is not null) and cs_promo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:catalog_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_16]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1238 Data size: 448372 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1238 Data size: 448372 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_57]
+ predicate:((((cd_gender = 'F') and (cd_marital_status = 'W')) and (cd_education_status = 'Primary')) and cd_demo_sk is not null) (type: boolean)
+ Statistics:Num rows: 1238 Data size: 448372 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:customer_demographics
+ Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query27.q.out b/ql/src/test/results/clientpositive/perf/query27.q.out
new file mode 100644
index 0000000..f3bea74
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query27.q.out
@@ -0,0 +1,178 @@
+PREHOOK: query: explain select i_item_id, s_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 store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_item_sk = item.i_item_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk and customer_demographics.cd_gender = 'F' and customer_demographics.cd_marital_status = 'D' and customer_demographics.cd_education_status = 'Unknown' and date_dim.d_year = 1998 and store.s_state in ('KS','AL', 'MN', 'AL', 'SC', 'VT') group by i_item_id, s_state order by i_item_id ,s_state limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_item_id, s_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 store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_item_sk = item.i_item_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk and customer_demographics.cd_gender = 'F' and customer_demographics.cd_marital_status = 'D' and customer_demographics.cd_education_status = 'Unknown' and date_dim.d_year = 1998 and store.s_state in ('KS','AL', 'MN', 'AL', 'SC', 'VT') group by i_item_id, s_state order by i_item_id ,s_state limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 11 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_41]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_40]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_39]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_38]
+ key expressions:_col0 (type: string), _col1 (type: string)
+ sort order:++
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: double), _col3 (type: decimal(11,6)), _col4 (type: decimal(11,6)), _col5 (type: decimal(11,6))
+ Select Operator [SEL_37]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_36]
+ | aggregations:["avg(VALUE._col0)","avg(VALUE._col1)","avg(VALUE._col2)","avg(VALUE._col3)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_35]
+ key expressions:_col0 (type: string), _col1 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string)
+ sort order:++
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: struct), _col3 (type: struct), _col4 (type: struct), _col5 (type: struct)
+ Group By Operator [GBY_34]
+ aggregations:["avg(_col4)","avg(_col5)","avg(_col7)","avg(_col6)"]
+ keys:_col15 (type: string), _col17 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_33]
+ outputColumnNames:["_col15","_col17","_col4","_col5","_col7","_col6"]
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_64]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col5","_col6","_col7","_col15","_col17"]
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_31]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_12]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_60]
+ | predicate:i_item_sk is not null (type: boolean)
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_11]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_29]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col15 (type: string)
+ Merge Join Operator [MERGEJOIN_63]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col4","_col5","_col6","_col7","_col15"]
+ | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_26]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_10]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_59]
+ | predicate:((s_state) IN ('KS', 'AL', 'MN', 'AL', 'SC', 'VT') and s_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_8]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_24]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_62]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_21]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_58]
+ | predicate:((d_year = 1998) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_19]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1361 Data size: 493209 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_61]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 1361 Data size: 493209 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_14]
+ | key expressions:_col2 (type: int)
+ | Map-reduce partition columns:_col2 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_56]
+ | predicate:(((ss_cdemo_sk is not null and ss_sold_date_sk is not null) and ss_store_sk is not null) and ss_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_16]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1238 Data size: 448372 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1238 Data size: 448372 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_57]
+ predicate:((((cd_gender = 'F') and (cd_marital_status = 'D')) and (cd_education_status = 'Unknown')) and cd_demo_sk is not null) (type: boolean)
+ Statistics:Num rows: 1238 Data size: 448372 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:customer_demographics
+ Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query28.q.out b/ql/src/test/results/clientpositive/perf/query28.q.out
new file mode 100644
index 0000000..51ae16f
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query28.q.out
@@ -0,0 +1,357 @@
+Warning: Shuffle Join MERGEJOIN[76][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 3' is a cross product
+Warning: Shuffle Join MERGEJOIN[77][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Reducer 4' is a cross product
+Warning: Shuffle Join MERGEJOIN[78][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3]] in Stage 'Reducer 5' is a cross product
+Warning: Shuffle Join MERGEJOIN[79][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3, $hdt$_4]] in Stage 'Reducer 6' is a cross product
+Warning: Shuffle Join MERGEJOIN[80][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3, $hdt$_4, $hdt$_5]] in Stage 'Reducer 7' is a cross product
+PREHOOK: query: explain select *
+from (select avg(ss_list_price) B1_LP
+ ,count(ss_list_price) B1_CNT
+ ,count(distinct ss_list_price) B1_CNTD
+ from store_sales
+ where ss_quantity between 0 and 5
+ and (ss_list_price between 11 and 11+10
+ or ss_coupon_amt between 460 and 460+1000
+ or ss_wholesale_cost between 14 and 14+20)) B1,
+ (select avg(ss_list_price) B2_LP
+ ,count(ss_list_price) B2_CNT
+ ,count(distinct ss_list_price) B2_CNTD
+ from store_sales
+ where ss_quantity between 6 and 10
+ and (ss_list_price between 91 and 91+10
+ or ss_coupon_amt between 1430 and 1430+1000
+ or ss_wholesale_cost between 32 and 32+20)) B2,
+ (select avg(ss_list_price) B3_LP
+ ,count(ss_list_price) B3_CNT
+ ,count(distinct ss_list_price) B3_CNTD
+ from store_sales
+ where ss_quantity between 11 and 15
+ and (ss_list_price between 66 and 66+10
+ or ss_coupon_amt between 920 and 920+1000
+ or ss_wholesale_cost between 4 and 4+20)) B3,
+ (select avg(ss_list_price) B4_LP
+ ,count(ss_list_price) B4_CNT
+ ,count(distinct ss_list_price) B4_CNTD
+ from store_sales
+ where ss_quantity between 16 and 20
+ and (ss_list_price between 142 and 142+10
+ or ss_coupon_amt between 3054 and 3054+1000
+ or ss_wholesale_cost between 80 and 80+20)) B4,
+ (select avg(ss_list_price) B5_LP
+ ,count(ss_list_price) B5_CNT
+ ,count(distinct ss_list_price) B5_CNTD
+ from store_sales
+ where ss_quantity between 21 and 25
+ and (ss_list_price between 135 and 135+10
+ or ss_coupon_amt between 14180 and 14180+1000
+ or ss_wholesale_cost between 38 and 38+20)) B5,
+ (select avg(ss_list_price) B6_LP
+ ,count(ss_list_price) B6_CNT
+ ,count(distinct ss_list_price) B6_CNTD
+ from store_sales
+ where ss_quantity between 26 and 30
+ and (ss_list_price between 28 and 28+10
+ or ss_coupon_amt between 2513 and 2513+1000
+ or ss_wholesale_cost between 42 and 42+20)) B6
+limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select *
+from (select avg(ss_list_price) B1_LP
+ ,count(ss_list_price) B1_CNT
+ ,count(distinct ss_list_price) B1_CNTD
+ from store_sales
+ where ss_quantity between 0 and 5
+ and (ss_list_price between 11 and 11+10
+ or ss_coupon_amt between 460 and 460+1000
+ or ss_wholesale_cost between 14 and 14+20)) B1,
+ (select avg(ss_list_price) B2_LP
+ ,count(ss_list_price) B2_CNT
+ ,count(distinct ss_list_price) B2_CNTD
+ from store_sales
+ where ss_quantity between 6 and 10
+ and (ss_list_price between 91 and 91+10
+ or ss_coupon_amt between 1430 and 1430+1000
+ or ss_wholesale_cost between 32 and 32+20)) B2,
+ (select avg(ss_list_price) B3_LP
+ ,count(ss_list_price) B3_CNT
+ ,count(distinct ss_list_price) B3_CNTD
+ from store_sales
+ where ss_quantity between 11 and 15
+ and (ss_list_price between 66 and 66+10
+ or ss_coupon_amt between 920 and 920+1000
+ or ss_wholesale_cost between 4 and 4+20)) B3,
+ (select avg(ss_list_price) B4_LP
+ ,count(ss_list_price) B4_CNT
+ ,count(distinct ss_list_price) B4_CNTD
+ from store_sales
+ where ss_quantity between 16 and 20
+ and (ss_list_price between 142 and 142+10
+ or ss_coupon_amt between 3054 and 3054+1000
+ or ss_wholesale_cost between 80 and 80+20)) B4,
+ (select avg(ss_list_price) B5_LP
+ ,count(ss_list_price) B5_CNT
+ ,count(distinct ss_list_price) B5_CNTD
+ from store_sales
+ where ss_quantity between 21 and 25
+ and (ss_list_price between 135 and 135+10
+ or ss_coupon_amt between 14180 and 14180+1000
+ or ss_wholesale_cost between 38 and 38+20)) B5,
+ (select avg(ss_list_price) B6_LP
+ ,count(ss_list_price) B6_CNT
+ ,count(distinct ss_list_price) B6_CNTD
+ from store_sales
+ where ss_quantity between 26 and 30
+ and (ss_list_price between 28 and 28+10
+ or ss_coupon_amt between 2513 and 2513+1000
+ or ss_wholesale_cost between 42 and 42+20)) B6
+limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 11 <- Map 10 (SIMPLE_EDGE)
+Reducer 13 <- Map 12 (SIMPLE_EDGE)
+Reducer 15 <- Map 14 (SIMPLE_EDGE)
+Reducer 17 <- Map 16 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 11 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 13 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 15 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 17 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 9 <- Map 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_64]
+ compressed:false
+ Statistics:Num rows: 1 Data size: 215 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_63]
+ Number of rows:100
+ Statistics:Num rows: 1 Data size: 215 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_62]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17"]
+ Statistics:Num rows: 1 Data size: 215 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_80]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17"]
+ | Statistics:Num rows: 1 Data size: 215 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_60]
+ | sort order:
+ | Statistics:Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: decimal(11,6)), _col1 (type: bigint), _col2 (type: bigint)
+ | Group By Operator [GBY_40]
+ | | aggregations:["avg(VALUE._col0)","count(VALUE._col1)","count(DISTINCT KEY._col0:0._col0)"]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 16 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_39]
+ | key expressions:_col0 (type: decimal(7,2))
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: struct), _col2 (type: bigint)
+ | Group By Operator [GBY_38]
+ | aggregations:["avg(ss_list_price)","count(ss_list_price)","count(DISTINCT ss_list_price)"]
+ | keys:ss_list_price (type: decimal(7,2))
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Select Operator [SEL_37]
+ | outputColumnNames:["ss_list_price"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_75]
+ | predicate:(ss_quantity BETWEEN 6 AND 10 and (ss_list_price BETWEEN 91 AND 101 or ss_coupon_amt BETWEEN 1430 AND 2430 or ss_wholesale_cost BETWEEN 32 AND 52)) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_35]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_59]
+ sort order:
+ Statistics:Num rows: 1 Data size: 196 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: decimal(11,6)), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(11,6)), _col4 (type: bigint), _col5 (type: bigint), _col6 (type: decimal(11,6)), _col7 (type: bigint), _col8 (type: bigint), _col9 (type: decimal(11,6)), _col10 (type: bigint), _col11 (type: bigint), _col12 (type: decimal(11,6)), _col13 (type: bigint), _col14 (type: bigint)
+ Merge Join Operator [MERGEJOIN_79]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
+ | Statistics:Num rows: 1 Data size: 196 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_57]
+ | sort order:
+ | Statistics:Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: decimal(11,6)), _col1 (type: bigint), _col2 (type: bigint)
+ | Group By Operator [GBY_33]
+ | | aggregations:["avg(VALUE._col0)","count(VALUE._col1)","count(DISTINCT KEY._col0:0._col0)"]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_32]
+ | key expressions:_col0 (type: decimal(7,2))
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: struct), _col2 (type: bigint)
+ | Group By Operator [GBY_31]
+ | aggregations:["avg(ss_list_price)","count(ss_list_price)","count(DISTINCT ss_list_price)"]
+ | keys:ss_list_price (type: decimal(7,2))
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Select Operator [SEL_30]
+ | outputColumnNames:["ss_list_price"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_74]
+ | predicate:(ss_quantity BETWEEN 11 AND 15 and (ss_list_price BETWEEN 66 AND 76 or ss_coupon_amt BETWEEN 920 AND 1920 or ss_wholesale_cost BETWEEN 4 AND 24)) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_28]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_56]
+ sort order:
+ Statistics:Num rows: 1 Data size: 179 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: decimal(11,6)), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(11,6)), _col4 (type: bigint), _col5 (type: bigint), _col6 (type: decimal(11,6)), _col7 (type: bigint), _col8 (type: bigint), _col9 (type: decimal(11,6)), _col10 (type: bigint), _col11 (type: bigint)
+ Merge Join Operator [MERGEJOIN_78]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
+ | Statistics:Num rows: 1 Data size: 179 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_54]
+ | sort order:
+ | Statistics:Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: decimal(11,6)), _col1 (type: bigint), _col2 (type: bigint)
+ | Group By Operator [GBY_26]
+ | | aggregations:["avg(VALUE._col0)","count(VALUE._col1)","count(DISTINCT KEY._col0:0._col0)"]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_25]
+ | key expressions:_col0 (type: decimal(7,2))
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: struct), _col2 (type: bigint)
+ | Group By Operator [GBY_24]
+ | aggregations:["avg(ss_list_price)","count(ss_list_price)","count(DISTINCT ss_list_price)"]
+ | keys:ss_list_price (type: decimal(7,2))
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Select Operator [SEL_23]
+ | outputColumnNames:["ss_list_price"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_73]
+ | predicate:(ss_quantity BETWEEN 16 AND 20 and (ss_list_price BETWEEN 142 AND 152 or ss_coupon_amt BETWEEN 3054 AND 4054 or ss_wholesale_cost BETWEEN 80 AND 100)) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_21]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_53]
+ sort order:
+ Statistics:Num rows: 1 Data size: 163 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: decimal(11,6)), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(11,6)), _col4 (type: bigint), _col5 (type: bigint), _col6 (type: decimal(11,6)), _col7 (type: bigint), _col8 (type: bigint)
+ Merge Join Operator [MERGEJOIN_77]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+ | Statistics:Num rows: 1 Data size: 163 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_51]
+ | sort order:
+ | Statistics:Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: decimal(11,6)), _col1 (type: bigint), _col2 (type: bigint)
+ | Group By Operator [GBY_19]
+ | | aggregations:["avg(VALUE._col0)","count(VALUE._col1)","count(DISTINCT KEY._col0:0._col0)"]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_18]
+ | key expressions:_col0 (type: decimal(7,2))
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: struct), _col2 (type: bigint)
+ | Group By Operator [GBY_17]
+ | aggregations:["avg(ss_list_price)","count(ss_list_price)","count(DISTINCT ss_list_price)"]
+ | keys:ss_list_price (type: decimal(7,2))
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Select Operator [SEL_16]
+ | outputColumnNames:["ss_list_price"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_72]
+ | predicate:(ss_quantity BETWEEN 21 AND 25 and (ss_list_price BETWEEN 135 AND 145 or ss_coupon_amt BETWEEN 14180 AND 15180 or ss_wholesale_cost BETWEEN 38 AND 58)) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_14]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_50]
+ sort order:
+ Statistics:Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: decimal(11,6)), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(11,6)), _col4 (type: bigint), _col5 (type: bigint)
+ Merge Join Operator [MERGEJOIN_76]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 1 Data size: 149 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_47]
+ | sort order:
+ | Statistics:Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: decimal(11,6)), _col1 (type: bigint), _col2 (type: bigint)
+ | Group By Operator [GBY_5]
+ | | aggregations:["avg(VALUE._col0)","count(VALUE._col1)","count(DISTINCT KEY._col0:0._col0)"]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_4]
+ | key expressions:_col0 (type: decimal(7,2))
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: struct), _col2 (type: bigint)
+ | Group By Operator [GBY_3]
+ | aggregations:["avg(ss_list_price)","count(ss_list_price)","count(DISTINCT ss_list_price)"]
+ | keys:ss_list_price (type: decimal(7,2))
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Select Operator [SEL_2]
+ | outputColumnNames:["ss_list_price"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_70]
+ | predicate:(ss_quantity BETWEEN 0 AND 5 and (ss_list_price BETWEEN 11 AND 21 or ss_coupon_amt BETWEEN 460 AND 1460 or ss_wholesale_cost BETWEEN 14 AND 34)) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_48]
+ sort order:
+ Statistics:Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: decimal(11,6)), _col1 (type: bigint), _col2 (type: bigint)
+ Group By Operator [GBY_12]
+ | aggregations:["avg(VALUE._col0)","count(VALUE._col1)","count(DISTINCT KEY._col0:0._col0)"]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 136 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_11]
+ key expressions:_col0 (type: decimal(7,2))
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: struct), _col2 (type: bigint)
+ Group By Operator [GBY_10]
+ aggregations:["avg(ss_list_price)","count(ss_list_price)","count(DISTINCT ss_list_price)"]
+ keys:ss_list_price (type: decimal(7,2))
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Select Operator [SEL_9]
+ outputColumnNames:["ss_list_price"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_71]
+ predicate:(ss_quantity BETWEEN 26 AND 30 and (ss_list_price BETWEEN 28 AND 38 or ss_coupon_amt BETWEEN 2513 AND 3513 or ss_wholesale_cost BETWEEN 42 AND 62)) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_7]
+ alias:store_sales
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query29.q.out b/ql/src/test/results/clientpositive/perf/query29.q.out
new file mode 100644
index 0000000..cd7f131
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query29.q.out
@@ -0,0 +1,264 @@
+PREHOOK: query: explain select i_item_id ,i_item_desc ,s_store_id ,s_store_name ,sum(ss_quantity) as store_sales_quantity ,sum(sr_return_quantity) as store_returns_quantity ,sum(cs_quantity) as catalog_sales_quantity from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_moy = 2 and d1.d_year = 2000 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_moy between 2 and 2 + 3 and d2.d_year = 2000 and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_year in (2000,2000+1,2000+2) group by i_item_id ,i_item_desc ,s_store_id ,s_store_name order by i_item_id ,i_item_desc ,s_store_id ,s_store_name limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_item_id ,i_item_desc ,s_store_id ,s_store_name ,sum(ss_quantity) as store_sales_quantity ,sum(sr_return_quantity) as store_returns_quantity ,sum(cs_quantity) as catalog_sales_quantity from store_sales ,store_returns ,catalog_sales ,date_dim d1 ,date_dim d2 ,date_dim d3 ,store ,item where d1.d_moy = 2 and d1.d_year = 2000 and d1.d_date_sk = ss_sold_date_sk and i_item_sk = ss_item_sk and s_store_sk = ss_store_sk and ss_customer_sk = sr_customer_sk and ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number and sr_returned_date_sk = d2.d_date_sk and d2.d_moy between 2 and 2 + 3 and d2.d_year = 2000 and sr_customer_sk = cs_bill_customer_sk and sr_item_sk = cs_item_sk and cs_sold_date_sk = d3.d_date_sk and d3.d_year in (2000,2000+1,2000+2) group by i_item_id ,i_item_desc ,s_store_id ,s_store_name order by i_item_id ,i_item_desc ,s_store_id ,s_store_name limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Reducer 9 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 11 (SIMPLE_EDGE)
+Reducer 3 <- Map 12 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 13 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 14 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 15 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 16 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Map 17 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 10
+ File Output Operator [FS_62]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_61]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_60]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_59]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
+ sort order:++++
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: bigint), _col5 (type: bigint), _col6 (type: bigint)
+ Select Operator [SEL_58]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_57]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_56]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
+ sort order:++++
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: bigint), _col5 (type: bigint), _col6 (type: bigint)
+ Group By Operator [GBY_55]
+ aggregations:["sum(_col5)","sum(_col10)","sum(_col14)"]
+ keys:_col24 (type: string), _col25 (type: string), _col27 (type: string), _col28 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_54]
+ outputColumnNames:["_col24","_col25","_col27","_col28","_col5","_col10","_col14"]
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_112]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col5","_col10","_col14","_col24","_col25","_col27","_col28"]
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_52]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string)
+ | Select Operator [SEL_18]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_105]
+ | predicate:i_item_sk is not null (type: boolean)
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_17]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_50]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: int), _col10 (type: int), _col14 (type: int), _col24 (type: string), _col25 (type: string)
+ Merge Join Operator [MERGEJOIN_111]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col5","_col10","_col14","_col24","_col25"]
+ | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 16 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_47]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string)
+ | Select Operator [SEL_16]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_104]
+ | predicate:s_store_sk is not null (type: boolean)
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_15]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_45]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col5 (type: int), _col10 (type: int), _col14 (type: int)
+ Merge Join Operator [MERGEJOIN_110]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col11 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col5","_col10","_col14"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_42]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_14]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_103]
+ | predicate:((d_year) IN (2000, 2001, 2002) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_12]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_40]
+ key expressions:_col11 (type: int)
+ Map-reduce partition columns:_col11 (type: int)
+ sort order:+
+ Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col10 (type: int), _col14 (type: int)
+ Merge Join Operator [MERGEJOIN_109]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col6 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col5","_col10","_col11","_col14"]
+ | Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_37]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_11]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_102]
+ | predicate:((d_moy BETWEEN 2 AND 5 and (d_year = 2000)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_9]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_35]
+ key expressions:_col6 (type: int)
+ Map-reduce partition columns:_col6 (type: int)
+ sort order:+
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col10 (type: int), _col11 (type: int), _col14 (type: int)
+ Merge Join Operator [MERGEJOIN_108]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col5","_col6","_col10","_col11","_col14"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_32]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_8]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_101]
+ | predicate:(((d_moy = 2) and (d_year = 2000)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_6]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_30]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: int), _col10 (type: int), _col11 (type: int), _col14 (type: int)
+ Merge Join Operator [MERGEJOIN_107]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col8 (type: int), _col7 (type: int)","1":"_col1 (type: int), _col2 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col3","_col5","_col6","_col10","_col11","_col14"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_27]
+ | key expressions:_col1 (type: int), _col2 (type: int)
+ | Map-reduce partition columns:_col1 (type: int), _col2 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col3 (type: int)
+ | Select Operator [SEL_5]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_100]
+ | predicate:((cs_bill_customer_sk is not null and cs_item_sk is not null) and cs_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_4]
+ | alias:catalog_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_25]
+ key expressions:_col8 (type: int), _col7 (type: int)
+ Map-reduce partition columns:_col8 (type: int), _col7 (type: int)
+ sort order:++
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col1 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: int), _col10 (type: int)
+ Merge Join Operator [MERGEJOIN_106]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int), _col1 (type: int), _col4 (type: int)","1":"_col2 (type: int), _col1 (type: int), _col3 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col3","_col5","_col6","_col7","_col8","_col10"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_20]
+ | key expressions:_col2 (type: int), _col1 (type: int), _col4 (type: int)
+ | Map-reduce partition columns:_col2 (type: int), _col1 (type: int), _col4 (type: int)
+ | sort order:+++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col3 (type: int), _col5 (type: int)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_98]
+ | predicate:((((ss_customer_sk is not null and ss_item_sk is not null) and ss_ticket_number is not null) and ss_sold_date_sk is not null) and ss_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_22]
+ key expressions:_col2 (type: int), _col1 (type: int), _col3 (type: int)
+ Map-reduce partition columns:_col2 (type: int), _col1 (type: int), _col3 (type: int)
+ sort order:+++
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col4 (type: int)
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_99]
+ predicate:(((sr_customer_sk is not null and sr_item_sk is not null) and sr_ticket_number is not null) and sr_returned_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_2]
+ alias:store_returns
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query3.q.out b/ql/src/test/results/clientpositive/perf/query3.q.out
new file mode 100644
index 0000000..389dd5e
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query3.q.out
@@ -0,0 +1,119 @@
+PREHOOK: query: explain select dt.d_year ,item.i_brand_id brand_id ,item.i_brand brand ,sum(ss_ext_sales_price) sum_agg from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manufact_id = 436 and dt.d_moy=12 group by dt.d_year ,item.i_brand ,item.i_brand_id order by dt.d_year ,sum_agg desc ,brand_id limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select dt.d_year ,item.i_brand_id brand_id ,item.i_brand brand ,sum(ss_ext_sales_price) sum_agg from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manufact_id = 436 and dt.d_moy=12 group by dt.d_year ,item.i_brand ,item.i_brand_id order by dt.d_year ,sum_agg desc ,brand_id limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 3 <- Map 7 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 5
+ File Output Operator [FS_27]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_26]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_25]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 63525 Data size: 91239564 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_24]
+ key expressions:_col0 (type: int), _col3 (type: decimal(17,2)), _col1 (type: int)
+ sort order:+-+
+ Statistics:Num rows: 63525 Data size: 91239564 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: string)
+ Group By Operator [GBY_21]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 63525 Data size: 91239564 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ sort order:+++
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: decimal(17,2))
+ Group By Operator [GBY_19]
+ aggregations:["sum(_col5)"]
+ keys:_col1 (type: int), _col7 (type: int), _col8 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_18]
+ outputColumnNames:["_col1","_col7","_col8","_col5"]
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_37]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col5","_col7","_col8"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_16]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: string)
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_35]
+ | predicate:((i_manufact_id = 436) and i_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_14]
+ key expressions:_col4 (type: int)
+ Map-reduce partition columns:_col4 (type: int)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col5 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_36]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col4","_col5"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_9]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int)
+ | Select Operator [SEL_2]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_33]
+ | predicate:((d_moy = 12) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_0]
+ | alias:dt
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_11]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_34]
+ predicate:(ss_sold_date_sk is not null and ss_item_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_3]
+ alias:store_sales
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query31.q.out b/ql/src/test/results/clientpositive/perf/query31.q.out
new file mode 100644
index 0000000..3af3dee
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query31.q.out
@@ -0,0 +1,641 @@
+PREHOOK: query: explain with ss as (select ca_county,d_qoy, d_year,sum(ss_ext_sales_price) as store_sales from store_sales,date_dim,customer_address where ss_sold_date_sk = d_date_sk and ss_addr_sk=ca_address_sk group by ca_county,d_qoy, d_year), ws as (select ca_county,d_qoy, d_year,sum(ws_ext_sales_price) as web_sales from web_sales,date_dim,customer_address where ws_sold_date_sk = d_date_sk and ws_bill_addr_sk=ca_address_sk group by ca_county,d_qoy, d_year) select ss1.ca_county ,ss1.d_year ,ws2.web_sales/ws1.web_sales web_q1_q2_increase ,ss2.store_sales/ss1.store_sales store_q1_q2_increase ,ws3.web_sales/ws2.web_sales web_q2_q3_increase ,ss3.store_sales/ss2.store_sales store_q2_q3_increase from ss ss1 ,ss ss2 ,ss ss3 ,ws ws1 ,ws ws2 ,ws ws3 where ss1.d_qoy = 1 and ss1.d_year = 1998 and ss1.ca_county = ss2.ca_county and ss2.d_qoy = 2 and ss2.d_year = 1998 and ss2.ca_county = ss3.ca_county and ss3.d_qoy = 3 and ss3.d_year = 1998 and ss1.ca_county = ws1.ca_county and ws1.d_qoy = 1 and ws1.d_year = 1998 and ws1.ca_county = ws2.ca_county and ws2.d_qoy = 2 and ws2.d_year = 1998 and ws1.ca_county = ws3.ca_county and ws3.d_qoy = 3 and ws3.d_year =1998 and case when ws1.web_sales > 0 then ws2.web_sales/ws1.web_sales else null end > case when ss1.store_sales > 0 then ss2.store_sales/ss1.store_sales else null end and case when ws2.web_sales > 0 then ws3.web_sales/ws2.web_sales else null end > case when ss2.store_sales > 0 then ss3.store_sales/ss2.store_sales else null end order by web_q1_q2_increase
+PREHOOK: type: QUERY
+POSTHOOK: query: explain with ss as (select ca_county,d_qoy, d_year,sum(ss_ext_sales_price) as store_sales from store_sales,date_dim,customer_address where ss_sold_date_sk = d_date_sk and ss_addr_sk=ca_address_sk group by ca_county,d_qoy, d_year), ws as (select ca_county,d_qoy, d_year,sum(ws_ext_sales_price) as web_sales from web_sales,date_dim,customer_address where ws_sold_date_sk = d_date_sk and ws_bill_addr_sk=ca_address_sk group by ca_county,d_qoy, d_year) select ss1.ca_county ,ss1.d_year ,ws2.web_sales/ws1.web_sales web_q1_q2_increase ,ss2.store_sales/ss1.store_sales store_q1_q2_increase ,ws3.web_sales/ws2.web_sales web_q2_q3_increase ,ss3.store_sales/ss2.store_sales store_q2_q3_increase from ss ss1 ,ss ss2 ,ss ss3 ,ws ws1 ,ws ws2 ,ws ws3 where ss1.d_qoy = 1 and ss1.d_year = 1998 and ss1.ca_county = ss2.ca_county and ss2.d_qoy = 2 and ss2.d_year = 1998 and ss2.ca_county = ss3.ca_county and ss3.d_qoy = 3 and ss3.d_year = 1998 and ss1.ca_county = ws1.ca_county and ws1.d_qoy = 1 and ws1.d_year = 1998 and ws1.ca_county = ws2.ca_county and ws2.d_qoy = 2 and ws2.d_year = 1998 and ws1.ca_county = ws3.ca_county and ws3.d_qoy = 3 and ws3.d_year =1998 and case when ws1.web_sales > 0 then ws2.web_sales/ws1.web_sales else null end > case when ss1.store_sales > 0 then ss2.store_sales/ss1.store_sales else null end and case when ws2.web_sales > 0 then ws3.web_sales/ws2.web_sales else null end > case when ss2.store_sales > 0 then ss3.store_sales/ss2.store_sales else null end order by web_q1_q2_increase
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 11 <- Map 10 (SIMPLE_EDGE), Map 14 (SIMPLE_EDGE)
+Reducer 12 <- Map 15 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
+Reducer 13 <- Reducer 12 (SIMPLE_EDGE)
+Reducer 17 <- Map 16 (SIMPLE_EDGE), Map 20 (SIMPLE_EDGE)
+Reducer 18 <- Map 21 (SIMPLE_EDGE), Reducer 17 (SIMPLE_EDGE)
+Reducer 19 <- Reducer 18 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 23 <- Map 22 (SIMPLE_EDGE), Map 26 (SIMPLE_EDGE)
+Reducer 24 <- Map 27 (SIMPLE_EDGE), Reducer 23 (SIMPLE_EDGE)
+Reducer 25 <- Reducer 24 (SIMPLE_EDGE)
+Reducer 29 <- Map 28 (SIMPLE_EDGE), Map 32 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 30 <- Map 33 (SIMPLE_EDGE), Reducer 29 (SIMPLE_EDGE)
+Reducer 31 <- Reducer 30 (SIMPLE_EDGE)
+Reducer 35 <- Map 34 (SIMPLE_EDGE), Map 38 (SIMPLE_EDGE)
+Reducer 36 <- Map 39 (SIMPLE_EDGE), Reducer 35 (SIMPLE_EDGE)
+Reducer 37 <- Reducer 36 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 13 (SIMPLE_EDGE), Reducer 19 (SIMPLE_EDGE), Reducer 25 (SIMPLE_EDGE), Reducer 31 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 37 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_154]
+ compressed:false
+ Statistics:Num rows: 2957777 Data size: 3001788770 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Select Operator [SEL_153]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 2957777 Data size: 3001788770 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_152]
+ key expressions:_col2 (type: decimal(37,20))
+ sort order:+
+ Statistics:Num rows: 2957777 Data size: 3001788770 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: string), _col1 (type: int), _col3 (type: decimal(37,20)), _col4 (type: decimal(37,20)), _col5 (type: decimal(37,20))
+ Select Operator [SEL_151]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 2957777 Data size: 3001788770 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_263]
+ predicate:(CASE WHEN ((_col19 > 0)) THEN ((_col23 / _col19)) ELSE (null) END > CASE WHEN ((_col7 > 0)) THEN ((_col11 / _col7)) ELSE (null) END) (type: boolean)
+ Statistics:Num rows: 2957777 Data size: 3001788770 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_296]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col12 (type: string)","1":"_col0 (type: string)"}
+ | outputColumnNames:["_col0","_col2","_col3","_col7","_col11","_col15","_col19","_col23"]
+ | Statistics:Num rows: 8873332 Data size: 9005367327 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 37 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_148]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: decimal(17,2))
+ | Select Operator [SEL_144]
+ | outputColumnNames:["_col0","_col3"]
+ | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_143]
+ | | aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: string)
+ | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 36 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_142]
+ | key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ | sort order:+++
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: decimal(17,2))
+ | Group By Operator [GBY_141]
+ | aggregations:["sum(_col2)"]
+ | keys:_col4 (type: int), _col5 (type: int), _col7 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_140]
+ | outputColumnNames:["_col4","_col5","_col7","_col2"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_294]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col2","_col7"]
+ | | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 39 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_138]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string)
+ | | Select Operator [SEL_129]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_282]
+ | | predicate:(ca_address_sk is not null and ca_county is not null) (type: boolean)
+ | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_128]
+ | | alias:customer_address
+ | | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 35 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_136]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: decimal(7,2))
+ | Merge Join Operator [MERGEJOIN_293]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2"]
+ | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 34 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_131]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ | | Select Operator [SEL_124]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_280]
+ | | predicate:(ws_sold_date_sk is not null and ws_bill_addr_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_123]
+ | | alias:web_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 38 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_133]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_127]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_281]
+ | predicate:(((d_qoy = 3) and (d_year = 1998)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_125]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_146]
+ key expressions:_col12 (type: string)
+ Map-reduce partition columns:_col12 (type: string)
+ sort order:+
+ Statistics:Num rows: 8066666 Data size: 8186697393 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: string), _col2 (type: int), _col3 (type: decimal(17,2)), _col7 (type: decimal(17,2)), _col11 (type: decimal(17,2)), _col15 (type: decimal(17,2)), _col19 (type: decimal(17,2))
+ Select Operator [SEL_122]
+ outputColumnNames:["_col0","_col11","_col12","_col15","_col19","_col2","_col3","_col7"]
+ Statistics:Num rows: 8066666 Data size: 8186697393 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_264]
+ predicate:(CASE WHEN ((_col15 > 0)) THEN ((_col19 / _col15)) ELSE (null) END > CASE WHEN ((_col3 > 0)) THEN ((_col7 / _col3)) ELSE (null) END) (type: boolean)
+ Statistics:Num rows: 8066666 Data size: 8186697393 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_295]
+ | condition map:[{"":"Inner Join 0 to 1"},{"":"Inner Join 1 to 2"},{"":"Inner Join 0 to 3"},{"":"Inner Join 3 to 4"}]
+ | keys:{"0":"_col0 (type: string)","1":"_col0 (type: string)","2":"_col0 (type: string)","3":"_col0 (type: string)","4":"_col0 (type: string)"}
+ | outputColumnNames:["_col0","_col2","_col3","_col7","_col11","_col12","_col15","_col19"]
+ | Statistics:Num rows: 24200000 Data size: 24560094209 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_113]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: decimal(17,2))
+ | Select Operator [SEL_43]
+ | outputColumnNames:["_col0","_col3"]
+ | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_42]
+ | | aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: string)
+ | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_41]
+ | key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ | sort order:+++
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: decimal(17,2))
+ | Group By Operator [GBY_40]
+ | aggregations:["sum(_col2)"]
+ | keys:_col4 (type: int), _col5 (type: int), _col7 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_39]
+ | outputColumnNames:["_col4","_col5","_col7","_col2"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_286]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col2","_col7"]
+ | | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 15 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_37]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string)
+ | | Select Operator [SEL_28]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_270]
+ | | predicate:(ca_address_sk is not null and ca_county is not null) (type: boolean)
+ | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_27]
+ | | alias:customer_address
+ | | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_35]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: decimal(7,2))
+ | Merge Join Operator [MERGEJOIN_285]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2"]
+ | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 10 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_30]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ | | Select Operator [SEL_23]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_268]
+ | | predicate:(ss_sold_date_sk is not null and ss_addr_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_22]
+ | | alias:store_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_32]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_26]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_269]
+ | predicate:(((d_qoy = 2) and (d_year = 1998)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_24]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 19 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_115]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: decimal(17,2))
+ | Select Operator [SEL_65]
+ | outputColumnNames:["_col0","_col3"]
+ | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_64]
+ | | aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: string)
+ | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 18 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_63]
+ | key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ | sort order:+++
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: decimal(17,2))
+ | Group By Operator [GBY_62]
+ | aggregations:["sum(_col2)"]
+ | keys:_col4 (type: int), _col5 (type: int), _col7 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_61]
+ | outputColumnNames:["_col4","_col5","_col7","_col2"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_288]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col2","_col7"]
+ | | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 21 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_59]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string)
+ | | Select Operator [SEL_50]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_273]
+ | | predicate:(ca_address_sk is not null and ca_county is not null) (type: boolean)
+ | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_49]
+ | | alias:customer_address
+ | | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_57]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: decimal(7,2))
+ | Merge Join Operator [MERGEJOIN_287]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2"]
+ | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 16 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_52]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ | | Select Operator [SEL_45]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_271]
+ | | predicate:(ss_sold_date_sk is not null and ss_addr_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_44]
+ | | alias:store_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 20 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_54]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_48]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_272]
+ | predicate:(((d_qoy = 3) and (d_year = 1998)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_46]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 25 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_117]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: decimal(17,2))
+ | Select Operator [SEL_87]
+ | outputColumnNames:["_col0","_col3"]
+ | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_86]
+ | | aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: string)
+ | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 24 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_85]
+ | key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ | sort order:+++
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: decimal(17,2))
+ | Group By Operator [GBY_84]
+ | aggregations:["sum(_col2)"]
+ | keys:_col4 (type: int), _col5 (type: int), _col7 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_83]
+ | outputColumnNames:["_col4","_col5","_col7","_col2"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_290]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col2","_col7"]
+ | | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 27 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_81]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string)
+ | | Select Operator [SEL_72]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_276]
+ | | predicate:(ca_address_sk is not null and ca_county is not null) (type: boolean)
+ | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_71]
+ | | alias:customer_address
+ | | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 23 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_79]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: decimal(7,2))
+ | Merge Join Operator [MERGEJOIN_289]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2"]
+ | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 22 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_74]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ | | Select Operator [SEL_67]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_274]
+ | | predicate:(ws_sold_date_sk is not null and ws_bill_addr_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_66]
+ | | alias:web_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 26 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_76]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_70]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_275]
+ | predicate:(((d_qoy = 1) and (d_year = 1998)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_68]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 31 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_119]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: decimal(17,2))
+ | Select Operator [SEL_109]
+ | outputColumnNames:["_col0","_col3"]
+ | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_108]
+ | | aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: string)
+ | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 30 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_107]
+ | key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ | sort order:+++
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: decimal(17,2))
+ | Group By Operator [GBY_106]
+ | aggregations:["sum(_col2)"]
+ | keys:_col4 (type: int), _col5 (type: int), _col7 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_105]
+ | outputColumnNames:["_col4","_col5","_col7","_col2"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_292]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col2","_col7"]
+ | | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 33 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_103]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string)
+ | | Select Operator [SEL_94]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_279]
+ | | predicate:(ca_address_sk is not null and ca_county is not null) (type: boolean)
+ | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_93]
+ | | alias:customer_address
+ | | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 29 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_101]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: decimal(7,2))
+ | Merge Join Operator [MERGEJOIN_291]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2"]
+ | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 28 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_96]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ | | Select Operator [SEL_89]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_277]
+ | | predicate:(ws_sold_date_sk is not null and ws_bill_addr_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_88]
+ | | alias:web_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 32 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_98]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_92]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_278]
+ | predicate:(((d_qoy = 2) and (d_year = 1998)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_90]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_111]
+ key expressions:_col0 (type: string)
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: int), _col3 (type: decimal(17,2))
+ Select Operator [SEL_21]
+ outputColumnNames:["_col0","_col2","_col3"]
+ Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_20]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 5500000 Data size: 5581839472 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_19]
+ key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ sort order:+++
+ Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: decimal(17,2))
+ Group By Operator [GBY_18]
+ aggregations:["sum(_col2)"]
+ keys:_col4 (type: int), _col5 (type: int), _col7 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_17]
+ outputColumnNames:["_col4","_col5","_col7","_col2"]
+ Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_284]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col2","_col7"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_15]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_6]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_267]
+ | predicate:(ca_address_sk is not null and ca_county is not null) (type: boolean)
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_13]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_283]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_8]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_265]
+ | predicate:(ss_sold_date_sk is not null and ss_addr_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_10]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_266]
+ predicate:(((d_qoy = 1) and (d_year = 1998)) and d_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:date_dim
+ Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query32.q.out b/ql/src/test/results/clientpositive/perf/query32.q.out
new file mode 100644
index 0000000..6436e19
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query32.q.out
@@ -0,0 +1,205 @@
+PREHOOK: query: explain SELECT sum(cs1.cs_ext_discount_amt) as excess_discount_amount
+FROM (SELECT cs.cs_item_sk as cs_item_sk,
+ cs.cs_ext_discount_amt as cs_ext_discount_amt
+ FROM catalog_sales cs
+ JOIN date_dim d ON (d.d_date_sk = cs.cs_sold_date_sk)
+ WHERE d.d_date between '2000-01-27' and '2000-04-27') cs1
+JOIN item i ON (i.i_item_sk = cs1.cs_item_sk)
+JOIN (SELECT cs2.cs_item_sk as cs_item_sk,
+ 1.3 * avg(cs_ext_discount_amt) as avg_cs_ext_discount_amt
+ FROM (SELECT cs.cs_item_sk as cs_item_sk,
+ cs.cs_ext_discount_amt as cs_ext_discount_amt
+ FROM catalog_sales cs
+ JOIN date_dim d ON (d.d_date_sk = cs.cs_sold_date_sk)
+ WHERE d.d_date between '2000-01-27' and '2000-04-27') cs2
+ GROUP BY cs2.cs_item_sk) tmp1
+ON (i.i_item_sk = tmp1.cs_item_sk)
+WHERE i.i_manufact_id = 436 and
+ cs1.cs_ext_discount_amt > tmp1.avg_cs_ext_discount_amt
+PREHOOK: type: QUERY
+POSTHOOK: query: explain SELECT sum(cs1.cs_ext_discount_amt) as excess_discount_amount
+FROM (SELECT cs.cs_item_sk as cs_item_sk,
+ cs.cs_ext_discount_amt as cs_ext_discount_amt
+ FROM catalog_sales cs
+ JOIN date_dim d ON (d.d_date_sk = cs.cs_sold_date_sk)
+ WHERE d.d_date between '2000-01-27' and '2000-04-27') cs1
+JOIN item i ON (i.i_item_sk = cs1.cs_item_sk)
+JOIN (SELECT cs2.cs_item_sk as cs_item_sk,
+ 1.3 * avg(cs_ext_discount_amt) as avg_cs_ext_discount_amt
+ FROM (SELECT cs.cs_item_sk as cs_item_sk,
+ cs.cs_ext_discount_amt as cs_ext_discount_amt
+ FROM catalog_sales cs
+ JOIN date_dim d ON (d.d_date_sk = cs.cs_sold_date_sk)
+ WHERE d.d_date between '2000-01-27' and '2000-04-27') cs2
+ GROUP BY cs2.cs_item_sk) tmp1
+ON (i.i_item_sk = tmp1.cs_item_sk)
+WHERE i.i_manufact_id = 436 and
+ cs1.cs_ext_discount_amt > tmp1.avg_cs_ext_discount_amt
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE)
+Reducer 3 <- Map 6 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 8 <- Map 10 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 4
+ File Output Operator [FS_42]
+ compressed:false
+ Statistics:Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Group By Operator [GBY_40]
+ | aggregations:["sum(VALUE._col0)"]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_39]
+ sort order:
+ Statistics:Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: decimal(17,2))
+ Group By Operator [GBY_38]
+ aggregations:["sum(_col1)"]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_37]
+ outputColumnNames:["_col1"]
+ Statistics:Num rows: 84700 Data size: 121652752 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_57]
+ predicate:(_col1 > CAST( _col5 AS decimal(20,15))) (type: boolean)
+ Statistics:Num rows: 84700 Data size: 121652752 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_65]
+ | condition map:[{"":"Inner Join 0 to 1"},{"":"Inner Join 1 to 2"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)","2":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col5"]
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 6 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_32]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_13]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_60]
+ | predicate:((i_manufact_id = 436) and i_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_11]
+ | alias:i
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_30]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: decimal(7,2))
+ | Select Operator [SEL_10]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_63]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2"]
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 1 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_6]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ | | Select Operator [SEL_1]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_58]
+ | | predicate:(cs_sold_date_sk is not null and cs_item_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_0]
+ | | alias:cs
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 5 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_8]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_4]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_59]
+ | predicate:(d_date BETWEEN '2000-01-27' AND '2000-04-27' and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_2]
+ | alias:d
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_34]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: double)
+ Select Operator [SEL_28]
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_27]
+ | aggregations:["avg(VALUE._col0)"]
+ | keys:KEY._col0 (type: int)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_26]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: struct)
+ Group By Operator [GBY_25]
+ aggregations:["avg(_col2)"]
+ keys:_col1 (type: int)
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_64]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_22]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_18]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_62]
+ | predicate:(d_date BETWEEN '2000-01-27' AND '2000-04-27' and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_16]
+ | alias:d
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ Select Operator [SEL_15]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_61]
+ predicate:(cs_sold_date_sk is not null and cs_item_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_14]
+ alias:cs
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query34.q.out b/ql/src/test/results/clientpositive/perf/query34.q.out
new file mode 100644
index 0000000..3043e81
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query34.q.out
@@ -0,0 +1,177 @@
+PREHOOK: query: explain select c_last_name ,c_first_name ,c_salutation ,c_preferred_cust_flag ,ss_ticket_number ,cnt from (select ss_ticket_number ,ss_customer_sk ,count(*) cnt from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and (date_dim.d_dom between 1 and 3 or date_dim.d_dom between 25 and 28) and (household_demographics.hd_buy_potential = '1001-5000' or household_demographics.hd_buy_potential = '5001-10000') and household_demographics.hd_vehicle_count > 0 and (case when household_demographics.hd_vehicle_count > 0 then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end) > 1.2 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_county in ('Kittitas County','Adams County','Richland County','Furnas County', 'Orange County','Appanoose County','Franklin Parish','Tehama County') group by ss_ticket_number,ss_customer_sk) dn,customer where dn.ss_customer_sk = customer.c_customer_sk and cnt between 15 and 20 order by c_last_name,c_first_name,c_salutation,c_preferred_cust_flag desc
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select c_last_name ,c_first_name ,c_salutation ,c_preferred_cust_flag ,ss_ticket_number ,cnt from (select ss_ticket_number ,ss_customer_sk ,count(*) cnt from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and (date_dim.d_dom between 1 and 3 or date_dim.d_dom between 25 and 28) and (household_demographics.hd_buy_potential = '1001-5000' or household_demographics.hd_buy_potential = '5001-10000') and household_demographics.hd_vehicle_count > 0 and (case when household_demographics.hd_vehicle_count > 0 then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end) > 1.2 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_county in ('Kittitas County','Adams County','Richland County','Furnas County', 'Orange County','Appanoose County','Franklin Parish','Tehama County') group by ss_ticket_number,ss_customer_sk) dn,customer where dn.ss_customer_sk = customer.c_customer_sk and cnt between 15 and 20 order by c_last_name,c_first_name,c_salutation,c_preferred_cust_flag desc
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 11 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_51]
+ compressed:false
+ Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Select Operator [SEL_50]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_49]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string)
+ sort order:+++-
+ Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: int), _col5 (type: bigint)
+ Select Operator [SEL_48]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_75]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_46]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ | Select Operator [SEL_42]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_71]
+ | predicate:c_customer_sk is not null (type: boolean)
+ | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_41]
+ | alias:customer
+ | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_44]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 6076 Data size: 6799525 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: bigint)
+ Select Operator [SEL_38]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 6076 Data size: 6799525 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_66]
+ predicate:_col2 BETWEEN 15 AND 20 (type: boolean)
+ Statistics:Num rows: 6076 Data size: 6799525 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_37]
+ | aggregations:["count(VALUE._col0)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 12152 Data size: 13599051 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_36]
+ key expressions:_col0 (type: int), _col1 (type: int)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ sort order:++
+ Statistics:Num rows: 24305 Data size: 27199223 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: bigint)
+ Group By Operator [GBY_35]
+ aggregations:["count()"]
+ keys:_col1 (type: int), _col4 (type: int)
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 24305 Data size: 27199223 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_74]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col4"]
+ | Statistics:Num rows: 24305 Data size: 27199223 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_32]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 400 Data size: 42800 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_16]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 400 Data size: 42800 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_70]
+ | predicate:(((((hd_buy_potential = '1001-5000') or (hd_buy_potential = '5001-10000')) and (hd_vehicle_count > 0)) and (CASE WHEN ((hd_vehicle_count > 0)) THEN ((UDFToDouble(hd_dep_count) / UDFToDouble(hd_vehicle_count))) ELSE (null) END > 1.2)) and hd_demo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 400 Data size: 42800 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_14]
+ | alias:household_demographics
+ | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_30]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col4 (type: int)
+ Merge Join Operator [MERGEJOIN_73]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col4"]
+ | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_27]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_13]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_69]
+ | predicate:((s_county) IN ('Kittitas County', 'Adams County', 'Richland County', 'Furnas County', 'Orange County', 'Appanoose County', 'Franklin Parish', 'Tehama County') and s_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_11]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_25]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: int), _col4 (type: int)
+ Merge Join Operator [MERGEJOIN_72]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_20]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_67]
+ | predicate:(((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_hdemo_sk is not null) and ss_customer_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_22]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_68]
+ predicate:(((d_dom BETWEEN 1 AND 3 or d_dom BETWEEN 25 AND 28) and (d_year) IN (1998, 1999, 2000)) and d_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:date_dim
+ Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query39.q.out b/ql/src/test/results/clientpositive/perf/query39.q.out
new file mode 100644
index 0000000..1f3ecdb
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query39.q.out
@@ -0,0 +1,313 @@
+PREHOOK: query: explain with inv as (select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stdev,mean, case mean when 0 then null else stdev/mean end cov from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean from inventory ,item ,warehouse ,date_dim where inv_item_sk = i_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_year =1999 group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo where case mean when 0 then 0 else stdev/mean end > 1) select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov from inv inv1,inv inv2 where inv1.i_item_sk = inv2.i_item_sk and inv1.w_warehouse_sk = inv2.w_warehouse_sk and inv1.d_moy=3 and inv2.d_moy=3+1 order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov ,inv2.d_moy,inv2.mean, inv2.cov
+PREHOOK: type: QUERY
+POSTHOOK: query: explain with inv as (select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stdev,mean, case mean when 0 then null else stdev/mean end cov from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean from inventory ,item ,warehouse ,date_dim where inv_item_sk = i_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_year =1999 group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo where case mean when 0 then 0 else stdev/mean end > 1) select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov from inv inv1,inv inv2 where inv1.i_item_sk = inv2.i_item_sk and inv1.w_warehouse_sk = inv2.w_warehouse_sk and inv1.d_moy=3 and inv2.d_moy=3+1 order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov ,inv2.d_moy,inv2.mean, inv2.cov
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 12 <- Map 11 (SIMPLE_EDGE), Map 16 (SIMPLE_EDGE)
+Reducer 13 <- Map 17 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE)
+Reducer 14 <- Map 18 (SIMPLE_EDGE), Reducer 13 (SIMPLE_EDGE)
+Reducer 15 <- Reducer 14 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 15 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_74]
+ compressed:false
+ Statistics:Num rows: 56367 Data size: 80959120 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Select Operator [SEL_73]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
+ | Statistics:Num rows: 56367 Data size: 80959120 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_72]
+ key expressions:_col0 (type: int), _col1 (type: int), 3 (type: int), _col3 (type: double), _col4 (type: double), 4 (type: int), _col8 (type: double), _col9 (type: double)
+ sort order:++++++++
+ Statistics:Num rows: 56367 Data size: 80959120 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: int), _col6 (type: int)
+ Select Operator [SEL_71]
+ outputColumnNames:["_col0","_col1","_col3","_col4","_col5","_col6","_col8","_col9"]
+ Statistics:Num rows: 56367 Data size: 80959120 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_119]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int), _col1 (type: int)","1":"_col2 (type: int), _col1 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col4","_col5","_col7","_col8","_col10","_col11"]
+ | Statistics:Num rows: 56367 Data size: 80959120 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_69]
+ | key expressions:_col2 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col2 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 51243 Data size: 73599199 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col4 (type: double), _col5 (type: double)
+ | Select Operator [SEL_61]
+ | outputColumnNames:["_col1","_col2","_col4","_col5"]
+ | Statistics:Num rows: 51243 Data size: 73599199 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_106]
+ | predicate:(CASE (_col5) WHEN (0) THEN (0) ELSE ((_col4 / _col5)) END > 1.0) (type: boolean)
+ | Statistics:Num rows: 51243 Data size: 73599199 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_111]
+ | outputColumnNames:["_col0","_col1","_col4","_col5"]
+ | Statistics:Num rows: 153730 Data size: 220799036 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_60]
+ | | aggregations:["stddev_samp(VALUE._col0)","avg(VALUE._col1)"]
+ | | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: string), KEY._col3 (type: int)
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | | Statistics:Num rows: 153730 Data size: 220799036 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_59]
+ | key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: string), _col3 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: string), _col3 (type: int)
+ | sort order:++++
+ | Statistics:Num rows: 307461 Data size: 441599510 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col4 (type: struct), _col5 (type: struct)
+ | Group By Operator [GBY_58]
+ | aggregations:["stddev_samp(_col3)","avg(_col3)"]
+ | keys:_col4 (type: int), _col5 (type: int), _col6 (type: string), _col9 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 307461 Data size: 441599510 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_57]
+ | outputColumnNames:["_col4","_col5","_col6","_col9","_col3"]
+ | Statistics:Num rows: 307461 Data size: 441599510 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_118]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col3","_col4","_col5","_col6"]
+ | | Statistics:Num rows: 307461 Data size: 441599510 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 18 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_55]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_41]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_110]
+ | | predicate:(((d_year = 1999) and d_date_sk is not null) and (d_moy = 4)) (type: boolean)
+ | | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_39]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_53]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: string)
+ | Merge Join Operator [MERGEJOIN_117]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col0","_col3","_col4","_col5","_col6"]
+ | | Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 17 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_50]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string)
+ | | Select Operator [SEL_38]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_109]
+ | | predicate:w_warehouse_sk is not null (type: boolean)
+ | | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_37]
+ | | alias:warehouse
+ | | Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_48]
+ | key expressions:_col2 (type: int)
+ | Map-reduce partition columns:_col2 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: int), _col3 (type: int), _col4 (type: int)
+ | Merge Join Operator [MERGEJOIN_116]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col0","_col2","_col3","_col4"]
+ | | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 11 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_43]
+ | | key expressions:_col1 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int)
+ | | Select Operator [SEL_34]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_107]
+ | | predicate:((inv_item_sk is not null and inv_warehouse_sk is not null) and inv_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_33]
+ | | alias:inventory
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 16 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_45]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_36]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_108]
+ | predicate:i_item_sk is not null (type: boolean)
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_35]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_67]
+ key expressions:_col2 (type: int), _col1 (type: int)
+ Map-reduce partition columns:_col2 (type: int), _col1 (type: int)
+ sort order:++
+ Statistics:Num rows: 51243 Data size: 73599199 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: double), _col5 (type: double)
+ Select Operator [SEL_28]
+ outputColumnNames:["_col1","_col2","_col4","_col5"]
+ Statistics:Num rows: 51243 Data size: 73599199 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_101]
+ predicate:(CASE (_col5) WHEN (0) THEN (0) ELSE ((_col4 / _col5)) END > 1.0) (type: boolean)
+ Statistics:Num rows: 51243 Data size: 73599199 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_112]
+ outputColumnNames:["_col0","_col1","_col4","_col5"]
+ Statistics:Num rows: 153730 Data size: 220799036 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_27]
+ | aggregations:["stddev_samp(VALUE._col0)","avg(VALUE._col1)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: string), KEY._col3 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 153730 Data size: 220799036 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_26]
+ key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: string), _col3 (type: int)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: string), _col3 (type: int)
+ sort order:++++
+ Statistics:Num rows: 307461 Data size: 441599510 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: struct), _col5 (type: struct)
+ Group By Operator [GBY_25]
+ aggregations:["stddev_samp(_col3)","avg(_col3)"]
+ keys:_col4 (type: int), _col5 (type: int), _col6 (type: string), _col9 (type: int)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 307461 Data size: 441599510 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_24]
+ outputColumnNames:["_col4","_col5","_col6","_col9","_col3"]
+ Statistics:Num rows: 307461 Data size: 441599510 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_115]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 307461 Data size: 441599510 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_22]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_8]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_105]
+ | predicate:(((d_year = 1999) and d_date_sk is not null) and (d_moy = 3)) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_6]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: string)
+ Merge Join Operator [MERGEJOIN_114]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_17]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_5]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_104]
+ | predicate:w_warehouse_sk is not null (type: boolean)
+ | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_4]
+ | alias:warehouse
+ | Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_15]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col3 (type: int), _col4 (type: int)
+ Merge Join Operator [MERGEJOIN_113]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col3","_col4"]
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_10]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_102]
+ | predicate:((inv_item_sk is not null and inv_warehouse_sk is not null) and inv_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:inventory
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_12]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_103]
+ predicate:i_item_sk is not null (type: boolean)
+ Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:item
+ Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+
+PREHOOK: query: with inv as (select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stdev,mean, case mean when 0 then null else stdev/mean end cov from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean from inventory ,item ,warehouse ,date_dim where inv_item_sk = i_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_year =1999 group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo where case mean when 0 then 0 else stdev/mean end > 1) select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov from inv inv1,inv inv2 where inv1.i_item_sk = inv2.i_item_sk and inv1.w_warehouse_sk = inv2.w_warehouse_sk and inv1.d_moy=3 and inv2.d_moy=3+1 and inv1.cov > 1.5 order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov ,inv2.d_moy,inv2.mean, inv2.cov
+PREHOOK: type: QUERY
+PREHOOK: Input: default@date_dim
+PREHOOK: Input: default@inventory
+PREHOOK: Input: default@item
+PREHOOK: Input: default@warehouse
+#### A masked pattern was here ####
+POSTHOOK: query: with inv as (select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stdev,mean, case mean when 0 then null else stdev/mean end cov from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean from inventory ,item ,warehouse ,date_dim where inv_item_sk = i_item_sk and inv_warehouse_sk = w_warehouse_sk and inv_date_sk = d_date_sk and d_year =1999 group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo where case mean when 0 then 0 else stdev/mean end > 1) select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov from inv inv1,inv inv2 where inv1.i_item_sk = inv2.i_item_sk and inv1.w_warehouse_sk = inv2.w_warehouse_sk and inv1.d_moy=3 and inv2.d_moy=3+1 and inv1.cov > 1.5 order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov ,inv2.d_moy,inv2.mean, inv2.cov
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@date_dim
+POSTHOOK: Input: default@inventory
+POSTHOOK: Input: default@item
+POSTHOOK: Input: default@warehouse
+#### A masked pattern was here ####
diff --git a/ql/src/test/results/clientpositive/perf/query40.q.out b/ql/src/test/results/clientpositive/perf/query40.q.out
new file mode 100644
index 0000000..778e090
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query40.q.out
@@ -0,0 +1,177 @@
+PREHOOK: query: explain select w_state ,i_item_id ,sum(case when (cast(d_date as date) < cast ('1998-04-08' as date)) then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_before ,sum(case when (cast(d_date as date) >= cast ('1998-04-08' as date)) then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_after from catalog_sales left outer join catalog_returns on (catalog_sales.cs_order_number = catalog_returns.cr_order_number and catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) ,warehouse ,item ,date_dim where i_current_price between 0.99 and 1.49 and item.i_item_sk = catalog_sales.cs_item_sk and catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and date_dim.d_date between '1998-03-09' and '1998-05-08' group by w_state,i_item_id order by w_state,i_item_id limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select w_state ,i_item_id ,sum(case when (cast(d_date as date) < cast ('1998-04-08' as date)) then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_before ,sum(case when (cast(d_date as date) >= cast ('1998-04-08' as date)) then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_after from catalog_sales left outer join catalog_returns on (catalog_sales.cs_order_number = catalog_returns.cr_order_number and catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) ,warehouse ,item ,date_dim where i_current_price between 0.99 and 1.49 and item.i_item_sk = catalog_sales.cs_item_sk and catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk and date_dim.d_date between '1998-03-09' and '1998-05-08' group by w_state,i_item_id order by w_state,i_item_id limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 11 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_39]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_38]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_37]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_36]
+ key expressions:_col0 (type: string), _col1 (type: string)
+ sort order:++
+ Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(23,2)), _col3 (type: decimal(23,2))
+ Group By Operator [GBY_34]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_33]
+ key expressions:_col0 (type: string), _col1 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string)
+ sort order:++
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(23,2)), _col3 (type: decimal(23,2))
+ Group By Operator [GBY_32]
+ aggregations:["sum(_col2)","sum(_col3)"]
+ keys:_col0 (type: string), _col1 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_30]
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_61]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col7","_col9","_col11","_col14"]
+ | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_28]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_11]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_57]
+ | predicate:(d_date BETWEEN '1998-03-09' AND '1998-05-08' and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_9]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_26]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col9 (type: string), _col11 (type: string)
+ Merge Join Operator [MERGEJOIN_60]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col4","_col7","_col9","_col11"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_23]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_8]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_56]
+ | predicate:(i_current_price BETWEEN 0.99 AND 1.49 and i_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_6]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_21]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 15 Data size: 15856 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col4 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col9 (type: string)
+ Merge Join Operator [MERGEJOIN_59]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col4","_col7","_col9"]
+ | Statistics:Num rows: 15 Data size: 15856 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_18]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_5]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_55]
+ | predicate:w_warehouse_sk is not null (type: boolean)
+ | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_4]
+ | alias:warehouse
+ | Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_16]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: int), _col4 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_58]
+ | condition map:[{"":"Left Outer Join0 to 1"}]
+ | keys:{"0":"_col3 (type: int), _col2 (type: int)","1":"_col1 (type: int), _col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col4","_col7"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_12]
+ | key expressions:_col3 (type: int), _col2 (type: int)
+ | Map-reduce partition columns:_col3 (type: int), _col2 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: int), _col4 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_53]
+ | predicate:((cs_warehouse_sk is not null and cs_item_sk is not null) and cs_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:catalog_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_13]
+ key expressions:_col1 (type: int), _col0 (type: int)
+ Map-reduce partition columns:_col1 (type: int), _col0 (type: int)
+ sort order:++
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col2 (type: decimal(7,2))
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_54]
+ predicate:cr_item_sk is not null (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_2]
+ alias:catalog_returns
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query42.q.out b/ql/src/test/results/clientpositive/perf/query42.q.out
new file mode 100644
index 0000000..50f665a
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query42.q.out
@@ -0,0 +1,117 @@
+PREHOOK: query: explain select dt.d_year ,item.i_category_id ,item.i_category ,sum(ss_ext_sales_price) as s from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manager_id = 1 and dt.d_moy=12 and dt.d_year=1998 group by dt.d_year ,item.i_category_id ,item.i_category order by s desc,dt.d_year ,item.i_category_id ,item.i_category limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select dt.d_year ,item.i_category_id ,item.i_category ,sum(ss_ext_sales_price) as s from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manager_id = 1 and dt.d_moy=12 and dt.d_year=1998 group by dt.d_year ,item.i_category_id ,item.i_category order by s desc,dt.d_year ,item.i_category_id ,item.i_category limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 3 <- Map 7 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 5
+ File Output Operator [FS_26]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_25]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_24]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 63525 Data size: 91239564 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_23]
+ key expressions:_col3 (type: decimal(17,2)), _col0 (type: int), _col1 (type: int), _col2 (type: string)
+ sort order:-+++
+ Statistics:Num rows: 63525 Data size: 91239564 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_21]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 63525 Data size: 91239564 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ sort order:+++
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: decimal(17,2))
+ Group By Operator [GBY_19]
+ aggregations:["sum(_col5)"]
+ keys:_col1 (type: int), _col7 (type: int), _col8 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_18]
+ outputColumnNames:["_col1","_col7","_col8","_col5"]
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_36]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col5","_col7","_col8"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_16]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: string)
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_34]
+ | predicate:((i_manager_id = 1) and i_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_14]
+ key expressions:_col4 (type: int)
+ Map-reduce partition columns:_col4 (type: int)
+ sort order:+
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_35]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col5"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_9]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_2]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_32]
+ | predicate:(((d_moy = 12) and (d_year = 1998)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_0]
+ | alias:dt
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_11]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_33]
+ predicate:(ss_sold_date_sk is not null and ss_item_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_3]
+ alias:store_sales
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query43.q.out b/ql/src/test/results/clientpositive/perf/query43.q.out
new file mode 100644
index 0000000..3dbd33d
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query43.q.out
@@ -0,0 +1,118 @@
+PREHOOK: query: explain select s_store_name, s_store_id, sum(case when (d_day_name='Sunday') then ss_sales_price else null end) sun_sales, sum(case when (d_day_name='Monday') then ss_sales_price else null end) mon_sales, sum(case when (d_day_name='Tuesday') then ss_sales_price else null end) tue_sales, sum(case when (d_day_name='Wednesday') then ss_sales_price else null end) wed_sales, sum(case when (d_day_name='Thursday') then ss_sales_price else null end) thu_sales, sum(case when (d_day_name='Friday') then ss_sales_price else null end) fri_sales, sum(case when (d_day_name='Saturday') then ss_sales_price else null end) sat_sales from date_dim, store_sales, store where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store.s_store_sk = store_sales.ss_store_sk and s_gmt_offset = -6 and d_year = 1998 group by s_store_name, s_store_id order by s_store_name, s_store_id,sun_sales,mon_sales,tue_sales,wed_sales,thu_sales,fri_sales,sat_sales limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select s_store_name, s_store_id, sum(case when (d_day_name='Sunday') then ss_sales_price else null end) sun_sales, sum(case when (d_day_name='Monday') then ss_sales_price else null end) mon_sales, sum(case when (d_day_name='Tuesday') then ss_sales_price else null end) tue_sales, sum(case when (d_day_name='Wednesday') then ss_sales_price else null end) wed_sales, sum(case when (d_day_name='Thursday') then ss_sales_price else null end) thu_sales, sum(case when (d_day_name='Friday') then ss_sales_price else null end) fri_sales, sum(case when (d_day_name='Saturday') then ss_sales_price else null end) sat_sales from date_dim, store_sales, store where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store.s_store_sk = store_sales.ss_store_sk and s_gmt_offset = -6 and d_year = 1998 group by s_store_name, s_store_id order by s_store_name, s_store_id,sun_sales,mon_sales,tue_sales,wed_sales,thu_sales,fri_sales,sat_sales limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 3 <- Map 7 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 5
+ File Output Operator [FS_27]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 111900 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_26]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 111900 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_25]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+ | Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_24]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: decimal(17,2)), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)), _col7 (type: decimal(17,2)), _col8 (type: decimal(17,2))
+ sort order:+++++++++
+ Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_22]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)","sum(VALUE._col5)","sum(VALUE._col6)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+ | Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_21]
+ key expressions:_col0 (type: string), _col1 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string)
+ sort order:++
+ Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(17,2)), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)), _col7 (type: decimal(17,2)), _col8 (type: decimal(17,2))
+ Group By Operator [GBY_20]
+ aggregations:["sum(_col2)","sum(_col3)","sum(_col4)","sum(_col5)","sum(_col6)","sum(_col7)","sum(_col8)"]
+ keys:_col0 (type: string), _col1 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+ Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_18]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+ Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_37]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col2","_col5","_col7","_col8"]
+ | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_16]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string)
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_35]
+ | predicate:((s_gmt_offset = -6) and s_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_14]
+ key expressions:_col4 (type: int)
+ Map-reduce partition columns:_col4 (type: int)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: string), _col5 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_36]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col2","_col4","_col5"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_9]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: string)
+ | Select Operator [SEL_2]
+ | outputColumnNames:["_col0","_col2"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_33]
+ | predicate:((d_year = 1998) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_0]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_11]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_34]
+ predicate:(ss_sold_date_sk is not null and ss_store_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_3]
+ alias:store_sales
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query45.q.out b/ql/src/test/results/clientpositive/perf/query45.q.out
new file mode 100644
index 0000000..d056160
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query45.q.out
@@ -0,0 +1,210 @@
+PREHOOK: query: explain select ca_zip, ca_county, sum(ws_sales_price) from web_sales JOIN customer ON web_sales.ws_bill_customer_sk = customer.c_customer_sk JOIN customer_address ON customer.c_current_addr_sk = customer_address.ca_address_sk JOIN date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk JOIN item ON web_sales.ws_item_sk = item.i_item_sk where ( item.i_item_id in (select i_item_id from item i2 where i2.i_item_sk in (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) ) ) and d_qoy = 2 and d_year = 2000 group by ca_zip, ca_county order by ca_zip, ca_county limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select ca_zip, ca_county, sum(ws_sales_price) from web_sales JOIN customer ON web_sales.ws_bill_customer_sk = customer.c_customer_sk JOIN customer_address ON customer.c_current_addr_sk = customer_address.ca_address_sk JOIN date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk JOIN item ON web_sales.ws_item_sk = item.i_item_sk where ( item.i_item_id in (select i_item_id from item i2 where i2.i_item_sk in (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) ) ) and d_qoy = 2 and d_year = 2000 group by ca_zip, ca_county order by ca_zip, ca_county limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 12 <- Map 11 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 12 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_50]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_49]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_48]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 14641000 Data size: 12591556811 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_47]
+ key expressions:_col0 (type: string), _col1 (type: string)
+ sort order:++
+ Statistics:Num rows: 14641000 Data size: 12591556811 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(17,2))
+ Select Operator [SEL_46]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 14641000 Data size: 12591556811 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_45]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 14641000 Data size: 12591556811 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_44]
+ key expressions:_col0 (type: string), _col1 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string)
+ sort order:++
+ Statistics:Num rows: 29282000 Data size: 25183113622 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(17,2))
+ Group By Operator [GBY_43]
+ aggregations:["sum(_col3)"]
+ keys:_col7 (type: string), _col8 (type: string)
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 29282000 Data size: 25183113622 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_42]
+ outputColumnNames:["_col7","_col8","_col3"]
+ Statistics:Num rows: 29282000 Data size: 25183113622 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_78]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col3","_col7","_col8"]
+ | Statistics:Num rows: 29282000 Data size: 25183113622 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_40]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_77]
+ | | condition map:[{"":"Left Semi Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: string)","1":"_col0 (type: string)"}
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 11 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_17]
+ | | key expressions:_col1 (type: string)
+ | | Map-reduce partition columns:_col1 (type: string)
+ | | sort order:+
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: int)
+ | | Select Operator [SEL_10]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_72]
+ | | predicate:(i_item_id is not null and i_item_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_9]
+ | | alias:item
+ | | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_19]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_15]
+ | keys:_col0 (type: string)
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_13]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_73]
+ | predicate:((i_item_sk) IN (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) and i_item_id is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_11]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_38]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 26620000 Data size: 22893739161 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: decimal(7,2)), _col7 (type: string), _col8 (type: string)
+ Merge Join Operator [MERGEJOIN_76]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col7","_col8"]
+ | Statistics:Num rows: 26620000 Data size: 22893739161 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_35]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_8]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_71]
+ | predicate:(((d_qoy = 2) and (d_year = 2000)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_6]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_33]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: decimal(7,2)), _col7 (type: string), _col8 (type: string)
+ Merge Join Operator [MERGEJOIN_75]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col5 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col3","_col7","_col8"]
+ | Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_30]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string)
+ | Select Operator [SEL_5]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_70]
+ | predicate:ca_address_sk is not null (type: boolean)
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_4]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_28]
+ key expressions:_col5 (type: int)
+ Map-reduce partition columns:_col5 (type: int)
+ sort order:+
+ Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col1 (type: int), _col3 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_74]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col3","_col5"]
+ | Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_23]
+ | key expressions:_col2 (type: int)
+ | Map-reduce partition columns:_col2 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: int), _col3 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_68]
+ | predicate:((ws_bill_customer_sk is not null and ws_sold_date_sk is not null) and ws_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:web_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_25]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int)
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_69]
+ predicate:(c_customer_sk is not null and c_current_addr_sk is not null) (type: boolean)
+ Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:customer
+ Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query46.q.out b/ql/src/test/results/clientpositive/perf/query46.q.out
new file mode 100644
index 0000000..4753e23
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query46.q.out
@@ -0,0 +1,241 @@
+PREHOOK: query: explain select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,amt,profit from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_coupon_amt) amt ,sum(ss_net_profit) profit from store_sales,date_dim,store,household_demographics,customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and (household_demographics.hd_dep_count = 4 or household_demographics.hd_vehicle_count= 2) and date_dim.d_dow in (6,0) and date_dim.d_year in (1998,1998+1,1998+2) and store.s_city in ('Rosedale','Bethlehem','Clinton','Clifton','Springfield') group by ss_ticket_number,ss_customer_sk,ss_addr_sk,ca_city) dn,customer,customer_address current_addr where dn.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,amt,profit from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_coupon_amt) amt ,sum(ss_net_profit) profit from store_sales,date_dim,store,household_demographics,customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and (household_demographics.hd_dep_count = 4 or household_demographics.hd_vehicle_count= 2) and date_dim.d_dow in (6,0) and date_dim.d_year in (1998,1998+1,1998+2) and store.s_city in ('Rosedale','Bethlehem','Clinton','Clifton','Springfield') group by ss_ticket_number,ss_customer_sk,ss_addr_sk,ca_city) dn,customer,customer_address current_addr where dn.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 10 (SIMPLE_EDGE)
+Reducer 3 <- Map 11 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 12 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 13 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 14 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Map 15 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 9
+ File Output Operator [FS_58]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_57]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_56]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_55]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int)
+ sort order:+++++
+ Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: decimal(17,2)), _col6 (type: decimal(17,2))
+ Select Operator [SEL_54]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_86]
+ predicate:(_col10 <> _col2) (type: boolean)
+ Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_99]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col6 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col3","_col4","_col7","_col8","_col10"]
+ | Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_51]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_42]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_93]
+ | predicate:ca_address_sk is not null (type: boolean)
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_41]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_49]
+ key expressions:_col6 (type: int)
+ Map-reduce partition columns:_col6 (type: int)
+ sort order:+
+ Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: string), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col7 (type: string), _col8 (type: string)
+ Merge Join Operator [MERGEJOIN_98]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col3","_col4","_col6","_col7","_col8"]
+ | Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_46]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: string), _col3 (type: string)
+ | Select Operator [SEL_40]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_92]
+ | predicate:(c_customer_sk is not null and c_current_addr_sk is not null) (type: boolean)
+ | Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_39]
+ | alias:customer
+ | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_44]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: string), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2))
+ Select Operator [SEL_37]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_36]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_35]
+ key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string)
+ sort order:++++
+ Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: decimal(17,2)), _col5 (type: decimal(17,2))
+ Group By Operator [GBY_34]
+ aggregations:["sum(_col6)","sum(_col7)"]
+ keys:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col17 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_33]
+ outputColumnNames:["_col1","_col3","_col5","_col17","_col6","_col7"]
+ Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_97]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col5","_col6","_col7","_col17"]
+ | Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_31]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_12]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_91]
+ | predicate:ca_address_sk is not null (type: boolean)
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_11]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_29]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 12152 Data size: 13599611 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_96]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col5","_col6","_col7"]
+ | Statistics:Num rows: 12152 Data size: 13599611 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_26]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_10]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_90]
+ | predicate:(((hd_dep_count = 4) or (hd_vehicle_count = 2)) and hd_demo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_8]
+ | alias:household_demographics
+ | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_24]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_95]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col5","_col6","_col7"]
+ | Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_21]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_89]
+ | predicate:((s_city) IN ('Rosedale', 'Bethlehem', 'Clinton', 'Clifton', 'Springfield') and s_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_19]
+ key expressions:_col4 (type: int)
+ Map-reduce partition columns:_col4 (type: int)
+ sort order:+
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_94]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_14]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_87]
+ | predicate:((((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_hdemo_sk is not null) and ss_addr_sk is not null) and ss_customer_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_16]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_88]
+ predicate:(((d_dow) IN (6, 0) and (d_year) IN (1998, 1999, 2000)) and d_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:date_dim
+ Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query48.q.out b/ql/src/test/results/clientpositive/perf/query48.q.out
new file mode 100644
index 0000000..7ef0249
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query48.q.out
@@ -0,0 +1,160 @@
+PREHOOK: query: explain select sum (ss_quantity) from store_sales, store, customer_demographics, customer_address, date_dim where store.s_store_sk = store_sales.ss_store_sk and store_sales.ss_sold_date_sk = date_dim.d_date_sk and d_year = 1998 and ( ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 100.00 and 150.00 ) or ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 50.00 and 100.00 ) or ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 150.00 and 200.00 ) ) and ( ( store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('KY', 'GA', 'NM') and ss_net_profit between 0 and 2000 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('MT', 'OR', 'IN') and ss_net_profit between 150 and 3000 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('WI', 'MO', 'WV') and ss_net_profit between 50 and 25000 ) )
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select sum (ss_quantity) from store_sales, store, customer_demographics, customer_address, date_dim where store.s_store_sk = store_sales.ss_store_sk and store_sales.ss_sold_date_sk = date_dim.d_date_sk and d_year = 1998 and ( ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 100.00 and 150.00 ) or ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 50.00 and 100.00 ) or ( customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk and cd_marital_status = 'M' and cd_education_status = '4 yr Degree' and ss_sales_price between 150.00 and 200.00 ) ) and ( ( store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('KY', 'GA', 'NM') and ss_net_profit between 0 and 2000 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('MT', 'OR', 'IN') and ss_net_profit between 150 and 3000 ) or (store_sales.ss_addr_sk = customer_address.ca_address_sk and ca_country = 'United States' and ca_state in ('WI', 'MO', 'WV') and ss_net_profit between 50 and 25000 ) )
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 3 <- Map 8 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 9 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 10 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 6
+ File Output Operator [FS_53]
+ compressed:false
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Group By Operator [GBY_51]
+ | aggregations:["sum(VALUE._col0)"]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_50]
+ sort order:
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: bigint)
+ Group By Operator [GBY_49]
+ aggregations:["sum(_col4)"]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_77]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4"]
+ | Statistics:Num rows: 9075000 Data size: 9210035328 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_46]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_42]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_73]
+ | predicate:((d_year = 1998) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_40]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_44]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 8250000 Data size: 8372759208 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: int)
+ Select Operator [SEL_39]
+ outputColumnNames:["_col0","_col4"]
+ Statistics:Num rows: 8250000 Data size: 8372759208 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_68]
+ predicate:(((_col12) IN ('KY', 'GA', 'NM') and _col6 BETWEEN 0 AND 2000) or ((_col12) IN ('MT', 'OR', 'IN') and _col6 BETWEEN 150 AND 3000) or ((_col12) IN ('WI', 'MO', 'WV') and _col6 BETWEEN 50 AND 25000)) (type: boolean)
+ Statistics:Num rows: 8250000 Data size: 8372759208 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_76]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col4","_col6","_col12"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_36]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_18]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_72]
+ | predicate:((((ca_state) IN ('KY', 'GA', 'NM') or (ca_state) IN ('MT', 'OR', 'IN') or (ca_state) IN ('WI', 'MO', 'WV')) and (ca_country = 'United States')) and ca_address_sk is not null) (type: boolean)
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_16]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_34]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 2722 Data size: 986020 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col4 (type: int), _col6 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_75]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col4","_col6"]
+ | Statistics:Num rows: 2722 Data size: 986020 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_31]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_15]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_71]
+ | predicate:(((cd_marital_status = 'M') and (cd_education_status = '4 yr Degree')) and cd_demo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_13]
+ | alias:customer_demographics
+ | Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_29]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 937 Data size: 1790951 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: int), _col4 (type: int), _col6 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_74]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col4","_col6"]
+ | Statistics:Num rows: 937 Data size: 1790951 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_24]
+ | key expressions:_col3 (type: int)
+ | Map-reduce partition columns:_col3 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col4 (type: int), _col6 (type: decimal(7,2))
+ | Select Operator [SEL_2]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col6"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_69]
+ | predicate:((((((ss_sales_price BETWEEN 100.0 AND 150.0 or ss_sales_price BETWEEN 50.0 AND 100.0 or ss_sales_price BETWEEN 150.0 AND 200.0) and (ss_net_profit BETWEEN 0 AND 2000 or ss_net_profit BETWEEN 150 AND 3000 or ss_net_profit BETWEEN 50 AND 25000)) and ss_store_sk is not null) and ss_cdemo_sk is not null) and ss_addr_sk is not null) and ss_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_26]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_12]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_70]
+ predicate:s_store_sk is not null (type: boolean)
+ Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_11]
+ alias:store
+ Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query50.q.out b/ql/src/test/results/clientpositive/perf/query50.q.out
new file mode 100644
index 0000000..50d994e
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query50.q.out
@@ -0,0 +1,287 @@
+PREHOOK: query: explain
+select
+ s_store_name
+ ,s_company_id
+ ,s_street_number
+ ,s_street_name
+ ,s_street_type
+ ,s_suite_number
+ ,s_city
+ ,s_county
+ ,s_state
+ ,s_zip
+ ,sum(case when (sr_returned_date_sk - ss_sold_date_sk <= 30 ) then 1 else 0 end) as 30days
+ ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 30) and
+ (sr_returned_date_sk - ss_sold_date_sk <= 60) then 1 else 0 end ) as 3160days
+ ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 60) and
+ (sr_returned_date_sk - ss_sold_date_sk <= 90) then 1 else 0 end) as 6190days
+ ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 90) and
+ (sr_returned_date_sk - ss_sold_date_sk <= 120) then 1 else 0 end) as 91120days
+ ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 120) then 1 else 0 end) as 120days
+from
+ store_sales
+ ,store_returns
+ ,store
+ ,date_dim d1
+ ,date_dim d2
+where
+ d2.d_year = 2000
+and d2.d_moy = 9
+and store_sales.ss_ticket_number = store_returns.sr_ticket_number
+and store_sales.ss_item_sk = store_returns.sr_item_sk
+and store_sales.ss_sold_date_sk = d1.d_date_sk
+and sr_returned_date_sk = d2.d_date_sk
+and store_sales.ss_customer_sk = store_returns.sr_customer_sk
+and store_sales.ss_store_sk = store.s_store_sk
+group by
+ s_store_name
+ ,s_company_id
+ ,s_street_number
+ ,s_street_name
+ ,s_street_type
+ ,s_suite_number
+ ,s_city
+ ,s_county
+ ,s_state
+ ,s_zip
+order by s_store_name
+ ,s_company_id
+ ,s_street_number
+ ,s_street_name
+ ,s_street_type
+ ,s_suite_number
+ ,s_city
+ ,s_county
+ ,s_state
+ ,s_zip
+limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select
+ s_store_name
+ ,s_company_id
+ ,s_street_number
+ ,s_street_name
+ ,s_street_type
+ ,s_suite_number
+ ,s_city
+ ,s_county
+ ,s_state
+ ,s_zip
+ ,sum(case when (sr_returned_date_sk - ss_sold_date_sk <= 30 ) then 1 else 0 end) as 30days
+ ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 30) and
+ (sr_returned_date_sk - ss_sold_date_sk <= 60) then 1 else 0 end ) as 3160days
+ ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 60) and
+ (sr_returned_date_sk - ss_sold_date_sk <= 90) then 1 else 0 end) as 6190days
+ ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 90) and
+ (sr_returned_date_sk - ss_sold_date_sk <= 120) then 1 else 0 end) as 91120days
+ ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 120) then 1 else 0 end) as 120days
+from
+ store_sales
+ ,store_returns
+ ,store
+ ,date_dim d1
+ ,date_dim d2
+where
+ d2.d_year = 2000
+and d2.d_moy = 9
+and store_sales.ss_ticket_number = store_returns.sr_ticket_number
+and store_sales.ss_item_sk = store_returns.sr_item_sk
+and store_sales.ss_sold_date_sk = d1.d_date_sk
+and sr_returned_date_sk = d2.d_date_sk
+and store_sales.ss_customer_sk = store_returns.sr_customer_sk
+and store_sales.ss_store_sk = store.s_store_sk
+group by
+ s_store_name
+ ,s_company_id
+ ,s_street_number
+ ,s_street_name
+ ,s_street_type
+ ,s_suite_number
+ ,s_city
+ ,s_county
+ ,s_state
+ ,s_zip
+order by s_store_name
+ ,s_company_id
+ ,s_street_number
+ ,s_street_name
+ ,s_street_type
+ ,s_suite_number
+ ,s_city
+ ,s_county
+ ,s_state
+ ,s_zip
+limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 11 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_40]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 111900 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_39]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 111900 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_38]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
+ | Statistics:Num rows: 22097 Data size: 24727243 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_37]
+ key expressions:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string)
+ sort order:++++++++++
+ Statistics:Num rows: 22097 Data size: 24727243 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col10 (type: bigint), _col11 (type: bigint), _col12 (type: bigint), _col13 (type: bigint), _col14 (type: bigint)
+ Group By Operator [GBY_35]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: string), KEY._col5 (type: string), KEY._col6 (type: string), KEY._col7 (type: string), KEY._col8 (type: string), KEY._col9 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
+ | Statistics:Num rows: 22097 Data size: 24727243 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_34]
+ key expressions:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string)
+ sort order:++++++++++
+ Statistics:Num rows: 44194 Data size: 49454486 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col10 (type: bigint), _col11 (type: bigint), _col12 (type: bigint), _col13 (type: bigint), _col14 (type: bigint)
+ Group By Operator [GBY_33]
+ aggregations:["sum(_col10)","sum(_col11)","sum(_col12)","sum(_col13)","sum(_col14)"]
+ keys:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
+ Statistics:Num rows: 44194 Data size: 49454486 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_31]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14"]
+ Statistics:Num rows: 44194 Data size: 49454486 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_63]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col5 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col5","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19"]
+ | Statistics:Num rows: 44194 Data size: 49454486 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_29]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_10]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_59]
+ | predicate:(((d_year = 2000) and (d_moy = 9)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_8]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_27]
+ key expressions:_col5 (type: int)
+ Map-reduce partition columns:_col5 (type: int)
+ sort order:+
+ Statistics:Num rows: 40177 Data size: 44958623 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col10 (type: string), _col11 (type: int), _col12 (type: string), _col13 (type: string), _col14 (type: string), _col15 (type: string), _col16 (type: string), _col17 (type: string), _col18 (type: string), _col19 (type: string)
+ Merge Join Operator [MERGEJOIN_62]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col5","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19"]
+ | Statistics:Num rows: 40177 Data size: 44958623 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_24]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_58]
+ | predicate:d_date_sk is not null (type: boolean)
+ | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_6]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_22]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 937 Data size: 1790951 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: int), _col10 (type: string), _col11 (type: int), _col12 (type: string), _col13 (type: string), _col14 (type: string), _col15 (type: string), _col16 (type: string), _col17 (type: string), _col18 (type: string), _col19 (type: string)
+ Merge Join Operator [MERGEJOIN_61]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col5","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19"]
+ | Statistics:Num rows: 937 Data size: 1790951 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_19]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: int), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string)
+ | Select Operator [SEL_5]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"]
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_57]
+ | predicate:s_store_sk is not null (type: boolean)
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_4]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_17]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col5 (type: int)
+ Merge Join Operator [MERGEJOIN_60]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int), _col1 (type: int), _col2 (type: int)","1":"_col3 (type: int), _col1 (type: int), _col2 (type: int)"}
+ | outputColumnNames:["_col0","_col3","_col5"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_12]
+ | key expressions:_col4 (type: int), _col1 (type: int), _col2 (type: int)
+ | Map-reduce partition columns:_col4 (type: int), _col1 (type: int), _col2 (type: int)
+ | sort order:+++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col3 (type: int)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_55]
+ | predicate:((((ss_ticket_number is not null and ss_item_sk is not null) and ss_customer_sk is not null) and ss_store_sk is not null) and ss_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_14]
+ key expressions:_col3 (type: int), _col1 (type: int), _col2 (type: int)
+ Map-reduce partition columns:_col3 (type: int), _col1 (type: int), _col2 (type: int)
+ sort order:+++
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int)
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_56]
+ predicate:(((sr_ticket_number is not null and sr_item_sk is not null) and sr_customer_sk is not null) and sr_returned_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_2]
+ alias:store_returns
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query51.q.out b/ql/src/test/results/clientpositive/perf/query51.q.out
new file mode 100644
index 0000000..6ee6077
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query51.q.out
@@ -0,0 +1,283 @@
+PREHOOK: query: explain WITH web_v1 as (
+select
+ ws_item_sk item_sk, d_date, sum(ws_sales_price),
+ sum(sum(ws_sales_price))
+ over (partition by ws_item_sk order by d_date rows between unbounded preceding and current row) cume_sales
+from web_sales
+ ,date_dim
+where ws_sold_date_sk=d_date_sk
+ and d_month_seq between 1193 and 1193+11
+ and ws_item_sk is not NULL
+group by ws_item_sk, d_date),
+store_v1 as (
+select
+ ss_item_sk item_sk, d_date, sum(ss_sales_price),
+ sum(sum(ss_sales_price))
+ over (partition by ss_item_sk order by d_date rows between unbounded preceding and current row) cume_sales
+from store_sales
+ ,date_dim
+where ss_sold_date_sk=d_date_sk
+ and d_month_seq between 1193 and 1193+11
+ and ss_item_sk is not NULL
+group by ss_item_sk, d_date)
+ select *
+from (select item_sk
+ ,d_date
+ ,web_sales
+ ,store_sales
+ ,max(web_sales)
+ over (partition by item_sk order by d_date rows between unbounded preceding and current row) web_cumulative
+ ,max(store_sales)
+ over (partition by item_sk order by d_date rows between unbounded preceding and current row) store_cumulative
+ from (select case when web.item_sk is not null then web.item_sk else store.item_sk end item_sk
+ ,case when web.d_date is not null then web.d_date else store.d_date end d_date
+ ,web.cume_sales web_sales
+ ,store.cume_sales store_sales
+ from web_v1 web full outer join store_v1 store on (web.item_sk = store.item_sk
+ and web.d_date = store.d_date)
+ )x )y
+where web_cumulative > store_cumulative
+order by item_sk
+ ,d_date
+limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain WITH web_v1 as (
+select
+ ws_item_sk item_sk, d_date, sum(ws_sales_price),
+ sum(sum(ws_sales_price))
+ over (partition by ws_item_sk order by d_date rows between unbounded preceding and current row) cume_sales
+from web_sales
+ ,date_dim
+where ws_sold_date_sk=d_date_sk
+ and d_month_seq between 1193 and 1193+11
+ and ws_item_sk is not NULL
+group by ws_item_sk, d_date),
+store_v1 as (
+select
+ ss_item_sk item_sk, d_date, sum(ss_sales_price),
+ sum(sum(ss_sales_price))
+ over (partition by ss_item_sk order by d_date rows between unbounded preceding and current row) cume_sales
+from store_sales
+ ,date_dim
+where ss_sold_date_sk=d_date_sk
+ and d_month_seq between 1193 and 1193+11
+ and ss_item_sk is not NULL
+group by ss_item_sk, d_date)
+ select *
+from (select item_sk
+ ,d_date
+ ,web_sales
+ ,store_sales
+ ,max(web_sales)
+ over (partition by item_sk order by d_date rows between unbounded preceding and current row) web_cumulative
+ ,max(store_sales)
+ over (partition by item_sk order by d_date rows between unbounded preceding and current row) store_cumulative
+ from (select case when web.item_sk is not null then web.item_sk else store.item_sk end item_sk
+ ,case when web.d_date is not null then web.d_date else store.d_date end d_date
+ ,web.cume_sales web_sales
+ ,store.cume_sales store_sales
+ from web_v1 web full outer join store_v1 store on (web.item_sk = store.item_sk
+ and web.d_date = store.d_date)
+ )x )y
+where web_cumulative > store_cumulative
+order by item_sk
+ ,d_date
+limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Reducer 9 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 9 <- Map 11 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 6
+ File Output Operator [FS_55]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 111900 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_54]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 111900 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_53]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 3682 Data size: 4120348 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_52]
+ key expressions:_col0 (type: int), _col1 (type: string)
+ sort order:++
+ Statistics:Num rows: 3682 Data size: 4120348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(27,2)), _col3 (type: decimal(27,2)), _col4 (type: decimal(27,2)), _col5 (type: decimal(27,2))
+ Select Operator [SEL_48]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 3682 Data size: 4120348 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_60]
+ predicate:(max_window_0 > max_window_1) (type: boolean)
+ Statistics:Num rows: 3682 Data size: 4120348 Basic stats: COMPLETE Column stats: NONE
+ PTF Operator [PTF_47]
+ Function definitions:[{"Input definition":{"type:":"WINDOWING"}},{"name:":"windowingtablefunction","order by:":"CASE WHEN (_col1 is not null) THEN (_col1) ELSE (_col4) END","partition by:":"CASE WHEN (_col0 is not null) THEN (_col0) ELSE (_col3) END"}]
+ Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_46]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_45]
+ key expressions:CASE WHEN (_col0 is not null) THEN (_col0) ELSE (_col3) END (type: int), CASE WHEN (_col1 is not null) THEN (_col1) ELSE (_col4) END (type: string)
+ Map-reduce partition columns:CASE WHEN (_col0 is not null) THEN (_col0) ELSE (_col3) END (type: int)
+ sort order:++
+ Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col1 (type: string), _col2 (type: decimal(27,2)), _col3 (type: int), _col4 (type: string), _col5 (type: decimal(27,2))
+ Merge Join Operator [MERGEJOIN_69]
+ | condition map:[{"":"Outer Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int), _col1 (type: string)","1":"_col0 (type: int), _col1 (type: string)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_43]
+ | key expressions:_col0 (type: int), _col1 (type: string)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: string)
+ | sort order:++
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: decimal(27,2))
+ | Select Operator [SEL_39]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | PTF Operator [PTF_38]
+ | Function definitions:[{"Input definition":{"type:":"WINDOWING"}},{"name:":"windowingtablefunction","order by:":"_col1","partition by:":"_col0"}]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_35]
+ | | aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type: int), KEY._col1 (type: string)
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_34]
+ | key expressions:_col0 (type: int), _col1 (type: string)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: decimal(17,2))
+ | Group By Operator [GBY_33]
+ | aggregations:["sum(_col2)"]
+ | keys:_col1 (type: int), _col4 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_32]
+ | outputColumnNames:["_col1","_col4","_col2"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_68]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2","_col4"]
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 11 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_30]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string)
+ | | Select Operator [SEL_26]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_64]
+ | | predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_24]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 8 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_28]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ | Select Operator [SEL_23]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_63]
+ | predicate:(ss_item_sk is not null and ss_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_21]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_42]
+ key expressions:_col0 (type: int), _col1 (type: string)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: string)
+ sort order:++
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(27,2))
+ Select Operator [SEL_18]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ PTF Operator [PTF_17]
+ Function definitions:[{"Input definition":{"type:":"WINDOWING"}},{"name:":"windowingtablefunction","order by:":"_col1","partition by:":"_col0"}]
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_14]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_13]
+ key expressions:_col0 (type: int), _col1 (type: string)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:++
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(17,2))
+ Group By Operator [GBY_12]
+ aggregations:["sum(_col2)"]
+ keys:_col1 (type: int), _col4 (type: string)
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_11]
+ outputColumnNames:["_col1","_col4","_col2"]
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_67]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col4"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_7]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ | Select Operator [SEL_2]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_61]
+ | predicate:(ws_item_sk is not null and ws_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:web_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_9]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string)
+ Select Operator [SEL_5]
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_62]
+ predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_3]
+ alias:date_dim
+ Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query52.q.out b/ql/src/test/results/clientpositive/perf/query52.q.out
new file mode 100644
index 0000000..76d3ffc
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query52.q.out
@@ -0,0 +1,118 @@
+PREHOOK: query: explain select dt.d_year ,item.i_brand_id brand_id ,item.i_brand brand ,sum(ss_ext_sales_price) ext_price from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manager_id = 1 and dt.d_moy=12 and dt.d_year=1998 group by dt.d_year ,item.i_brand ,item.i_brand_id order by dt.d_year ,ext_price desc ,brand_id limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select dt.d_year ,item.i_brand_id brand_id ,item.i_brand brand ,sum(ss_ext_sales_price) ext_price from date_dim dt ,store_sales ,item where dt.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and item.i_manager_id = 1 and dt.d_moy=12 and dt.d_year=1998 group by dt.d_year ,item.i_brand ,item.i_brand_id order by dt.d_year ,ext_price desc ,brand_id limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 3 <- Map 7 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 5
+ File Output Operator [FS_27]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_26]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_25]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 63525 Data size: 91239564 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_24]
+ key expressions:_col0 (type: int), _col3 (type: decimal(17,2)), _col1 (type: int)
+ sort order:+-+
+ Statistics:Num rows: 63525 Data size: 91239564 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: string)
+ Group By Operator [GBY_21]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 63525 Data size: 91239564 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: string)
+ sort order:+++
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: decimal(17,2))
+ Group By Operator [GBY_19]
+ aggregations:["sum(_col5)"]
+ keys:_col1 (type: int), _col7 (type: int), _col8 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_18]
+ outputColumnNames:["_col1","_col7","_col8","_col5"]
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_37]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col5","_col7","_col8"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_16]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: string)
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_35]
+ | predicate:((i_manager_id = 1) and i_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_14]
+ key expressions:_col4 (type: int)
+ Map-reduce partition columns:_col4 (type: int)
+ sort order:+
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_36]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col5"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_9]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_2]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_33]
+ | predicate:(((d_moy = 12) and (d_year = 1998)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_0]
+ | alias:dt
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_11]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_34]
+ predicate:(ss_sold_date_sk is not null and ss_item_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_3]
+ alias:store_sales
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query54.q.out b/ql/src/test/results/clientpositive/perf/query54.q.out
new file mode 100644
index 0000000..884ee6f
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query54.q.out
@@ -0,0 +1,314 @@
+PREHOOK: query: explain with my_customers as ( select c_customer_sk , c_current_addr_sk from ( select cs_sold_date_sk sold_date_sk, cs_bill_customer_sk customer_sk, cs_item_sk item_sk from catalog_sales union all select ws_sold_date_sk sold_date_sk, ws_bill_customer_sk customer_sk, ws_item_sk item_sk from web_sales ) cs_or_ws_sales, item, date_dim, customer where sold_date_sk = d_date_sk and item_sk = i_item_sk and i_category = 'Jewelry' and i_class = 'football' and c_customer_sk = cs_or_ws_sales.customer_sk and d_moy = 3 and d_year = 2000 group by c_customer_sk , c_current_addr_sk ) , my_revenue as ( select c_customer_sk, sum(ss_ext_sales_price) as revenue from my_customers, store_sales, customer_address, store, date_dim where c_current_addr_sk = ca_address_sk and ca_county = s_county and ca_state = s_state and ss_sold_date_sk = d_date_sk and c_customer_sk = ss_customer_sk and d_month_seq between (1203) and (1205) group by c_customer_sk ) , segments as (select cast((revenue/50) as int) as segment from my_revenue ) select segment, count(*) as num_customers, segment*50 as segment_base from segments group by segment order by segment, num_customers limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain with my_customers as ( select c_customer_sk , c_current_addr_sk from ( select cs_sold_date_sk sold_date_sk, cs_bill_customer_sk customer_sk, cs_item_sk item_sk from catalog_sales union all select ws_sold_date_sk sold_date_sk, ws_bill_customer_sk customer_sk, ws_item_sk item_sk from web_sales ) cs_or_ws_sales, item, date_dim, customer where sold_date_sk = d_date_sk and item_sk = i_item_sk and i_category = 'Jewelry' and i_class = 'football' and c_customer_sk = cs_or_ws_sales.customer_sk and d_moy = 3 and d_year = 2000 group by c_customer_sk , c_current_addr_sk ) , my_revenue as ( select c_customer_sk, sum(ss_ext_sales_price) as revenue from my_customers, store_sales, customer_address, store, date_dim where c_current_addr_sk = ca_address_sk and ca_county = s_county and ca_state = s_state and ss_sold_date_sk = d_date_sk and c_customer_sk = ss_customer_sk and d_month_seq between (1203) and (1205) group by c_customer_sk ) , segments as (select cast((revenue/50) as int) as segment from my_revenue ) select segment, count(*) as num_customers, segment*50 as segment_base from segments group by segment order by segment, num_customers limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Map 1 <- Union 2 (CONTAINS)
+Map 14 <- Union 2 (CONTAINS)
+Reducer 10 <- Map 21 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Reducer 10 (SIMPLE_EDGE)
+Reducer 12 <- Reducer 11 (SIMPLE_EDGE)
+Reducer 13 <- Reducer 12 (SIMPLE_EDGE)
+Reducer 3 <- Map 15 (SIMPLE_EDGE), Union 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 16 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 17 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 18 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Map 19 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Map 20 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 13
+ File Output Operator [FS_76]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_75]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_74]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 4026275 Data size: 3462678197 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 12 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_73]
+ key expressions:_col0 (type: int), _col1 (type: bigint)
+ sort order:++
+ Statistics:Num rows: 4026275 Data size: 3462678197 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: int)
+ Select Operator [SEL_72]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 4026275 Data size: 3462678197 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_71]
+ | aggregations:["count(VALUE._col0)"]
+ | keys:KEY._col0 (type: int)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 4026275 Data size: 3462678197 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 11 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_70]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 8052550 Data size: 6925356395 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: bigint)
+ Group By Operator [GBY_69]
+ aggregations:["count()"]
+ keys:_col0 (type: int)
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 8052550 Data size: 6925356395 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_67]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 8052550 Data size: 6925356395 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_66]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: int)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 8052550 Data size: 6925356395 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 10 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_65]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 16105100 Data size: 13850712790 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: decimal(17,2))
+ Group By Operator [GBY_64]
+ aggregations:["sum(_col4)"]
+ keys:_col0 (type: int)
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 16105100 Data size: 13850712790 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_134]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col4"]
+ | Statistics:Num rows: 16105100 Data size: 13850712790 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 21 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_61]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_42]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_127]
+ | predicate:(d_month_seq BETWEEN 1203 AND 1205 and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_40]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_59]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 14641000 Data size: 12591556809 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col4 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_133]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col6 (type: string), _col7 (type: string)","1":"_col0 (type: string), _col1 (type: string)"}
+ | outputColumnNames:["_col0","_col2","_col4"]
+ | Statistics:Num rows: 14641000 Data size: 12591556809 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 20 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_56]
+ | key expressions:_col0 (type: string), _col1 (type: string)
+ | Map-reduce partition columns:_col0 (type: string), _col1 (type: string)
+ | sort order:++
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_39]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_126]
+ | predicate:(s_county is not null and s_state is not null) (type: boolean)
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_38]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_54]
+ key expressions:_col6 (type: string), _col7 (type: string)
+ Map-reduce partition columns:_col6 (type: string), _col7 (type: string)
+ sort order:++
+ Statistics:Num rows: 13310000 Data size: 11446869579 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: int), _col4 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_132]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col4","_col6","_col7"]
+ | Statistics:Num rows: 13310000 Data size: 11446869579 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 19 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_51]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 5000000 Data size: 5074399410 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string)
+ | Select Operator [SEL_37]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 5000000 Data size: 5074399410 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_125]
+ | predicate:((ca_address_sk is not null and ca_county is not null) and ca_state is not null) (type: boolean)
+ | Statistics:Num rows: 5000000 Data size: 5074399410 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_36]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_49]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 12100000 Data size: 10406244847 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: int), _col4 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_131]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col1 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col4"]
+ | Statistics:Num rows: 12100000 Data size: 10406244847 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 18 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_46]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col2 (type: decimal(7,2))
+ | Select Operator [SEL_35]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_124]
+ | predicate:(ss_customer_sk is not null and ss_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_34]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_44]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 11000000 Data size: 9460222384 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int)
+ Group By Operator [GBY_32]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: int)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 11000000 Data size: 9460222384 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_31]
+ key expressions:_col0 (type: int), _col1 (type: int)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ sort order:++
+ Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_30]
+ keys:_col9 (type: int), _col10 (type: int)
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_130]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col9","_col10"]
+ | Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_27]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int)
+ | Select Operator [SEL_13]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_123]
+ | predicate:(c_customer_sk is not null and c_current_addr_sk is not null) (type: boolean)
+ | Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_12]
+ | alias:customer
+ | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_25]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 69877 Data size: 100363522 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_129]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1"]
+ | Statistics:Num rows: 69877 Data size: 100363522 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 16 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_22]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_11]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_122]
+ | predicate:(((d_moy = 3) and (d_year = 2000)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_9]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 63525 Data size: 91239564 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int)
+ Merge Join Operator [MERGEJOIN_128]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 63525 Data size: 91239564 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_17]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 57750 Data size: 82945057 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_8]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 57750 Data size: 82945057 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_121]
+ | predicate:(((i_category = 'Jewelry') and (i_class = 'football')) and i_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 57750 Data size: 82945057 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_6]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Union 2 [SIMPLE_EDGE]
+ |<-Map 1 [CONTAINS]
+ | Reduce Output Operator [RS_15]
+ | key expressions:_col2 (type: int)
+ | Map-reduce partition columns:_col2 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 2 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: int)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_119]
+ | predicate:((cs_item_sk is not null and cs_sold_date_sk is not null) and cs_bill_customer_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:catalog_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 14 [CONTAINS]
+ Reduce Output Operator [RS_15]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 2 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col1 (type: int)
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_120]
+ predicate:((ws_item_sk is not null and ws_sold_date_sk is not null) and ws_bill_customer_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_2]
+ alias:web_sales
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query55.q.out b/ql/src/test/results/clientpositive/perf/query55.q.out
new file mode 100644
index 0000000..2cb80ab
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query55.q.out
@@ -0,0 +1,118 @@
+PREHOOK: query: explain select i_brand_id brand_id, i_brand brand, sum(ss_ext_sales_price) ext_price from date_dim, store_sales, item where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and i_manager_id=36 and d_moy=12 and d_year=2001 group by i_brand, i_brand_id order by ext_price desc, i_brand_id limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_brand_id brand_id, i_brand brand, sum(ss_ext_sales_price) ext_price from date_dim, store_sales, item where date_dim.d_date_sk = store_sales.ss_sold_date_sk and store_sales.ss_item_sk = item.i_item_sk and i_manager_id=36 and d_moy=12 and d_year=2001 group by i_brand, i_brand_id order by ext_price desc, i_brand_id limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 3 <- Map 7 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 5
+ File Output Operator [FS_27]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_26]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_25]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 63525 Data size: 91239564 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_24]
+ key expressions:_col2 (type: decimal(17,2)), _col0 (type: int)
+ sort order:-+
+ Statistics:Num rows: 63525 Data size: 91239564 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string)
+ Group By Operator [GBY_21]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 63525 Data size: 91239564 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col0 (type: int), _col1 (type: string)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: string)
+ sort order:++
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(17,2))
+ Group By Operator [GBY_19]
+ aggregations:["sum(_col5)"]
+ keys:_col7 (type: int), _col8 (type: string)
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_18]
+ outputColumnNames:["_col7","_col8","_col5"]
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_37]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col5","_col7","_col8"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_16]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: string)
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_35]
+ | predicate:((i_manager_id = 36) and i_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_14]
+ key expressions:_col4 (type: int)
+ Map-reduce partition columns:_col4 (type: int)
+ sort order:+
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_36]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col5"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_9]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_2]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_33]
+ | predicate:(((d_moy = 12) and (d_year = 2001)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_0]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_11]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_34]
+ predicate:(ss_sold_date_sk is not null and ss_item_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_3]
+ alias:store_sales
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query56.q.out b/ql/src/test/results/clientpositive/perf/query56.q.out
new file mode 100644
index 0000000..78d3883
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query56.q.out
@@ -0,0 +1,643 @@
+PREHOOK: query: explain with ss as (
+ select i_item_id,sum(ss_ext_sales_price) total_sales
+ from
+ store_sales,
+ date_dim,
+ customer_address,
+ item
+ where item.i_item_id in (select
+ i.i_item_id
+from item i
+where i_color in ('purple','burlywood','indian'))
+ and ss_item_sk = i_item_sk
+ and ss_sold_date_sk = d_date_sk
+ and d_year = 2001
+ and d_moy = 1
+ and ss_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id),
+ cs as (
+ select i_item_id,sum(cs_ext_sales_price) total_sales
+ from
+ catalog_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ item.i_item_id in (select
+ i.i_item_id
+from item i
+where i_color in ('purple','burlywood','indian'))
+ and cs_item_sk = i_item_sk
+ and cs_sold_date_sk = d_date_sk
+ and d_year = 2001
+ and d_moy = 1
+ and cs_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id),
+ ws as (
+ select i_item_id,sum(ws_ext_sales_price) total_sales
+ from
+ web_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ item.i_item_id in (select
+ i.i_item_id
+from item i
+where i_color in ('purple','burlywood','indian'))
+ and ws_item_sk = i_item_sk
+ and ws_sold_date_sk = d_date_sk
+ and d_year = 2001
+ and d_moy = 1
+ and ws_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id)
+ select i_item_id ,sum(total_sales) total_sales
+ from (select * from ss
+ union all
+ select * from cs
+ union all
+ select * from ws) tmp1
+ group by i_item_id
+ order by total_sales
+ limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain with ss as (
+ select i_item_id,sum(ss_ext_sales_price) total_sales
+ from
+ store_sales,
+ date_dim,
+ customer_address,
+ item
+ where item.i_item_id in (select
+ i.i_item_id
+from item i
+where i_color in ('purple','burlywood','indian'))
+ and ss_item_sk = i_item_sk
+ and ss_sold_date_sk = d_date_sk
+ and d_year = 2001
+ and d_moy = 1
+ and ss_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id),
+ cs as (
+ select i_item_id,sum(cs_ext_sales_price) total_sales
+ from
+ catalog_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ item.i_item_id in (select
+ i.i_item_id
+from item i
+where i_color in ('purple','burlywood','indian'))
+ and cs_item_sk = i_item_sk
+ and cs_sold_date_sk = d_date_sk
+ and d_year = 2001
+ and d_moy = 1
+ and cs_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id),
+ ws as (
+ select i_item_id,sum(ws_ext_sales_price) total_sales
+ from
+ web_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ item.i_item_id in (select
+ i.i_item_id
+from item i
+where i_color in ('purple','burlywood','indian'))
+ and ws_item_sk = i_item_sk
+ and ws_sold_date_sk = d_date_sk
+ and d_year = 2001
+ and d_moy = 1
+ and ws_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id)
+ select i_item_id ,sum(total_sales) total_sales
+ from (select * from ss
+ union all
+ select * from cs
+ union all
+ select * from ws) tmp1
+ group by i_item_id
+ order by total_sales
+ limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 12 <- Map 11 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
+Reducer 15 <- Map 14 (SIMPLE_EDGE), Map 19 (SIMPLE_EDGE)
+Reducer 16 <- Map 20 (SIMPLE_EDGE), Reducer 15 (SIMPLE_EDGE)
+Reducer 17 <- Reducer 16 (SIMPLE_EDGE), Reducer 22 (SIMPLE_EDGE)
+Reducer 18 <- Reducer 17 (SIMPLE_EDGE), Union 6 (CONTAINS)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 9 (SIMPLE_EDGE)
+Reducer 22 <- Map 21 (SIMPLE_EDGE), Map 23 (SIMPLE_EDGE)
+Reducer 25 <- Map 24 (SIMPLE_EDGE), Map 29 (SIMPLE_EDGE)
+Reducer 26 <- Map 30 (SIMPLE_EDGE), Reducer 25 (SIMPLE_EDGE)
+Reducer 27 <- Reducer 26 (SIMPLE_EDGE), Reducer 32 (SIMPLE_EDGE)
+Reducer 28 <- Reducer 27 (SIMPLE_EDGE), Union 6 (CONTAINS)
+Reducer 3 <- Map 10 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 32 <- Map 31 (SIMPLE_EDGE), Map 33 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 12 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE), Union 6 (CONTAINS)
+Reducer 7 <- Union 6 (SIMPLE_EDGE)
+Reducer 8 <- Reducer 7 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 8
+ File Output Operator [FS_134]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 101400 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_133]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 101400 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_132]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 9075000 Data size: 9210035328 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_131]
+ key expressions:_col1 (type: decimal(27,2))
+ sort order:+
+ Statistics:Num rows: 9075000 Data size: 9210035328 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: string)
+ Group By Operator [GBY_129]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 9075000 Data size: 9210035328 Basic stats: COMPLETE Column stats: NONE
+ |<-Union 6 [SIMPLE_EDGE]
+ |<-Reducer 18 [CONTAINS]
+ | Reduce Output Operator [RS_128]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 18150000 Data size: 18420070656 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: decimal(27,2))
+ | Group By Operator [GBY_127]
+ | aggregations:["sum(_col1)"]
+ | keys:_col0 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 18150000 Data size: 18420070656 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_80]
+ | | aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type: string)
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 6050000 Data size: 6140023552 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_79]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: decimal(17,2))
+ | Group By Operator [GBY_78]
+ | aggregations:["sum(_col3)"]
+ | keys:_col10 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_77]
+ | outputColumnNames:["_col10","_col3"]
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_196]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col3","_col10"]
+ | | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 16 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_73]
+ | | key expressions:_col2 (type: int)
+ | | Map-reduce partition columns:_col2 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col3 (type: decimal(7,2))
+ | | Merge Join Operator [MERGEJOIN_190]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col2","_col3"]
+ | | | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 20 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_70]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | | Select Operator [SEL_48]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_178]
+ | | | predicate:((ca_gmt_offset = -6) and ca_address_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_46]
+ | | | alias:customer_address
+ | | | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 15 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_68]
+ | | key expressions:_col1 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col2 (type: int), _col3 (type: decimal(7,2))
+ | | Merge Join Operator [MERGEJOIN_189]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col2","_col3"]
+ | | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 14 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_63]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: decimal(7,2))
+ | | | Select Operator [SEL_42]
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | Filter Operator [FIL_176]
+ | | | predicate:((cs_sold_date_sk is not null and cs_bill_addr_sk is not null) and cs_item_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | TableScan [TS_41]
+ | | | alias:catalog_sales
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | |<-Map 19 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_65]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_45]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_177]
+ | | predicate:(((d_year = 2001) and (d_moy = 1)) and d_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_43]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 22 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_75]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Merge Join Operator [MERGEJOIN_191]
+ | | condition map:[{"":"Left Semi Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: string)","1":"_col0 (type: string)"}
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 21 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_57]
+ | | key expressions:_col1 (type: string)
+ | | Map-reduce partition columns:_col1 (type: string)
+ | | sort order:+
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: int)
+ | | Select Operator [SEL_50]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_179]
+ | | predicate:(i_item_id is not null and i_item_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_49]
+ | | alias:item
+ | | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 23 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_59]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_55]
+ | keys:_col0 (type: string)
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_53]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_180]
+ | predicate:((i_color) IN ('purple', 'burlywood', 'indian') and i_item_id is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_51]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 28 [CONTAINS]
+ | Reduce Output Operator [RS_128]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 18150000 Data size: 18420070656 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: decimal(27,2))
+ | Group By Operator [GBY_127]
+ | aggregations:["sum(_col1)"]
+ | keys:_col0 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 18150000 Data size: 18420070656 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_123]
+ | | aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type: string)
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 6050000 Data size: 6140023552 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 27 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_122]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: decimal(17,2))
+ | Group By Operator [GBY_121]
+ | aggregations:["sum(_col3)"]
+ | keys:_col10 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_120]
+ | outputColumnNames:["_col10","_col3"]
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_197]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col3","_col10"]
+ | | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 26 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_116]
+ | | key expressions:_col1 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col3 (type: decimal(7,2))
+ | | Merge Join Operator [MERGEJOIN_193]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col3"]
+ | | | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 30 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_113]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | | Select Operator [SEL_91]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_183]
+ | | | predicate:((ca_gmt_offset = -6) and ca_address_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_89]
+ | | | alias:customer_address
+ | | | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 25 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_111]
+ | | key expressions:_col2 (type: int)
+ | | Map-reduce partition columns:_col2 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col3 (type: decimal(7,2))
+ | | Merge Join Operator [MERGEJOIN_192]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col2","_col3"]
+ | | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 24 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_106]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: decimal(7,2))
+ | | | Select Operator [SEL_85]
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | Filter Operator [FIL_181]
+ | | | predicate:((ws_sold_date_sk is not null and ws_bill_addr_sk is not null) and ws_item_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | TableScan [TS_84]
+ | | | alias:web_sales
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | |<-Map 29 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_108]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_88]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_182]
+ | | predicate:(((d_year = 2001) and (d_moy = 1)) and d_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_86]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 32 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_118]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Merge Join Operator [MERGEJOIN_194]
+ | | condition map:[{"":"Left Semi Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: string)","1":"_col0 (type: string)"}
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 31 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_100]
+ | | key expressions:_col1 (type: string)
+ | | Map-reduce partition columns:_col1 (type: string)
+ | | sort order:+
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: int)
+ | | Select Operator [SEL_93]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_184]
+ | | predicate:(i_item_id is not null and i_item_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_92]
+ | | alias:item
+ | | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 33 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_102]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_98]
+ | keys:_col0 (type: string)
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_96]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_185]
+ | predicate:((i_color) IN ('purple', 'burlywood', 'indian') and i_item_id is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_94]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [CONTAINS]
+ Reduce Output Operator [RS_128]
+ key expressions:_col0 (type: string)
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 18150000 Data size: 18420070656 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: decimal(27,2))
+ Group By Operator [GBY_127]
+ aggregations:["sum(_col1)"]
+ keys:_col0 (type: string)
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 18150000 Data size: 18420070656 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_39]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 6050000 Data size: 6140023552 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_38]
+ key expressions:_col0 (type: string)
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: decimal(17,2))
+ Group By Operator [GBY_37]
+ aggregations:["sum(_col3)"]
+ keys:_col10 (type: string)
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_36]
+ outputColumnNames:["_col10","_col3"]
+ Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_195]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col3","_col10"]
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_34]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Merge Join Operator [MERGEJOIN_188]
+ | | condition map:[{"":"Left Semi Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: string)","1":"_col0 (type: string)"}
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 11 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_16]
+ | | key expressions:_col1 (type: string)
+ | | Map-reduce partition columns:_col1 (type: string)
+ | | sort order:+
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: int)
+ | | Select Operator [SEL_9]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_174]
+ | | predicate:(i_item_id is not null and i_item_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_8]
+ | | alias:item
+ | | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_18]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_14]
+ | keys:_col0 (type: string)
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_12]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_175]
+ | predicate:((i_color) IN ('purple', 'burlywood', 'indian') and i_item_id is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_10]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_32]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_187]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_29]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_173]
+ | predicate:((ca_gmt_offset = -6) and ca_address_sk is not null) (type: boolean)
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_27]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_186]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_22]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_171]
+ | predicate:((ss_sold_date_sk is not null and ss_addr_sk is not null) and ss_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_24]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_172]
+ predicate:(((d_year = 2001) and (d_moy = 1)) and d_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:date_dim
+ Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query58.q.out b/ql/src/test/results/clientpositive/perf/query58.q.out
new file mode 100644
index 0000000..34592a3
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query58.q.out
@@ -0,0 +1,602 @@
+PREHOOK: query: explain select ss_items.item_id
+ ,ss_item_rev
+ ,ss_item_rev/(ss_item_rev+cs_item_rev+ws_item_rev)/3 * 100 ss_dev
+ ,cs_item_rev
+ ,cs_item_rev/(ss_item_rev+cs_item_rev+ws_item_rev)/3 * 100 cs_dev
+ ,ws_item_rev
+ ,ws_item_rev/(ss_item_rev+cs_item_rev+ws_item_rev)/3 * 100 ws_dev
+ ,(ss_item_rev+cs_item_rev+ws_item_rev)/3 average
+FROM
+( select i_item_id item_id ,sum(ss_ext_sales_price) as ss_item_rev
+ from store_sales
+ JOIN item ON store_sales.ss_item_sk = item.i_item_sk
+ JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk
+ JOIN (select d1.d_date
+ from date_dim d1 JOIN date_dim d2 ON d1.d_week_seq = d2.d_week_seq
+ where d2.d_date = '1998-08-04') sub ON date_dim.d_date = sub.d_date
+ group by i_item_id ) ss_items
+JOIN
+( select i_item_id item_id ,sum(cs_ext_sales_price) as cs_item_rev
+ from catalog_sales
+ JOIN item ON catalog_sales.cs_item_sk = item.i_item_sk
+ JOIN date_dim ON catalog_sales.cs_sold_date_sk = date_dim.d_date_sk
+ JOIN (select d1.d_date
+ from date_dim d1 JOIN date_dim d2 ON d1.d_week_seq = d2.d_week_seq
+ where d2.d_date = '1998-08-04') sub ON date_dim.d_date = sub.d_date
+ group by i_item_id ) cs_items
+ON ss_items.item_id=cs_items.item_id
+JOIN
+( select i_item_id item_id ,sum(ws_ext_sales_price) as ws_item_rev
+ from web_sales
+ JOIN item ON web_sales.ws_item_sk = item.i_item_sk
+ JOIN date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk
+ JOIN (select d1.d_date
+ from date_dim d1 JOIN date_dim d2 ON d1.d_week_seq = d2.d_week_seq
+ where d2.d_date = '1998-08-04') sub ON date_dim.d_date = sub.d_date
+ group by i_item_id ) ws_items
+ON ss_items.item_id=ws_items.item_id
+ where
+ ss_item_rev between 0.9 * cs_item_rev and 1.1 * cs_item_rev
+ and ss_item_rev between 0.9 * ws_item_rev and 1.1 * ws_item_rev
+ and cs_item_rev between 0.9 * ss_item_rev and 1.1 * ss_item_rev
+ and cs_item_rev between 0.9 * ws_item_rev and 1.1 * ws_item_rev
+ and ws_item_rev between 0.9 * ss_item_rev and 1.1 * ss_item_rev
+ and ws_item_rev between 0.9 * cs_item_rev and 1.1 * cs_item_rev
+ order by item_id ,ss_item_rev
+ limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select ss_items.item_id
+ ,ss_item_rev
+ ,ss_item_rev/(ss_item_rev+cs_item_rev+ws_item_rev)/3 * 100 ss_dev
+ ,cs_item_rev
+ ,cs_item_rev/(ss_item_rev+cs_item_rev+ws_item_rev)/3 * 100 cs_dev
+ ,ws_item_rev
+ ,ws_item_rev/(ss_item_rev+cs_item_rev+ws_item_rev)/3 * 100 ws_dev
+ ,(ss_item_rev+cs_item_rev+ws_item_rev)/3 average
+FROM
+( select i_item_id item_id ,sum(ss_ext_sales_price) as ss_item_rev
+ from store_sales
+ JOIN item ON store_sales.ss_item_sk = item.i_item_sk
+ JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk
+ JOIN (select d1.d_date
+ from date_dim d1 JOIN date_dim d2 ON d1.d_week_seq = d2.d_week_seq
+ where d2.d_date = '1998-08-04') sub ON date_dim.d_date = sub.d_date
+ group by i_item_id ) ss_items
+JOIN
+( select i_item_id item_id ,sum(cs_ext_sales_price) as cs_item_rev
+ from catalog_sales
+ JOIN item ON catalog_sales.cs_item_sk = item.i_item_sk
+ JOIN date_dim ON catalog_sales.cs_sold_date_sk = date_dim.d_date_sk
+ JOIN (select d1.d_date
+ from date_dim d1 JOIN date_dim d2 ON d1.d_week_seq = d2.d_week_seq
+ where d2.d_date = '1998-08-04') sub ON date_dim.d_date = sub.d_date
+ group by i_item_id ) cs_items
+ON ss_items.item_id=cs_items.item_id
+JOIN
+( select i_item_id item_id ,sum(ws_ext_sales_price) as ws_item_rev
+ from web_sales
+ JOIN item ON web_sales.ws_item_sk = item.i_item_sk
+ JOIN date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk
+ JOIN (select d1.d_date
+ from date_dim d1 JOIN date_dim d2 ON d1.d_week_seq = d2.d_week_seq
+ where d2.d_date = '1998-08-04') sub ON date_dim.d_date = sub.d_date
+ group by i_item_id ) ws_items
+ON ss_items.item_id=ws_items.item_id
+ where
+ ss_item_rev between 0.9 * cs_item_rev and 1.1 * cs_item_rev
+ and ss_item_rev between 0.9 * ws_item_rev and 1.1 * ws_item_rev
+ and cs_item_rev between 0.9 * ss_item_rev and 1.1 * ss_item_rev
+ and cs_item_rev between 0.9 * ws_item_rev and 1.1 * ws_item_rev
+ and ws_item_rev between 0.9 * ss_item_rev and 1.1 * ss_item_rev
+ and ws_item_rev between 0.9 * cs_item_rev and 1.1 * cs_item_rev
+ order by item_id ,ss_item_rev
+ limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 12 <- Map 11 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
+Reducer 15 <- Map 14 (SIMPLE_EDGE), Map 19 (SIMPLE_EDGE)
+Reducer 16 <- Map 20 (SIMPLE_EDGE), Reducer 15 (SIMPLE_EDGE)
+Reducer 17 <- Reducer 16 (SIMPLE_EDGE), Reducer 22 (SIMPLE_EDGE)
+Reducer 18 <- Reducer 17 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 9 (SIMPLE_EDGE)
+Reducer 22 <- Map 21 (SIMPLE_EDGE), Map 23 (SIMPLE_EDGE)
+Reducer 25 <- Map 24 (SIMPLE_EDGE), Map 29 (SIMPLE_EDGE)
+Reducer 26 <- Map 30 (SIMPLE_EDGE), Reducer 25 (SIMPLE_EDGE)
+Reducer 27 <- Reducer 26 (SIMPLE_EDGE), Reducer 32 (SIMPLE_EDGE)
+Reducer 28 <- Reducer 27 (SIMPLE_EDGE)
+Reducer 3 <- Map 10 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 32 <- Map 31 (SIMPLE_EDGE), Map 33 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 12 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 18 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 28 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Reducer 7 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 8
+ File Output Operator [FS_128]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_127]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_126]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 5284 Data size: 7589363 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_125]
+ key expressions:_col0 (type: string), _col1 (type: decimal(17,2))
+ sort order:++
+ Statistics:Num rows: 5284 Data size: 7589363 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(38,21)), _col3 (type: decimal(17,2)), _col4 (type: decimal(38,21)), _col5 (type: decimal(17,2)), _col6 (type: decimal(38,21)), _col7 (type: decimal(23,6))
+ Select Operator [SEL_124]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ Statistics:Num rows: 5284 Data size: 7589363 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_190]
+ predicate:(((_col1 BETWEEN (0.9 * UDFToDouble(_col5)) AND (1.1 * UDFToDouble(_col5)) and _col3 BETWEEN (0.9 * UDFToDouble(_col5)) AND (1.1 * UDFToDouble(_col5))) and _col5 BETWEEN (0.9 * UDFToDouble(_col1)) AND (1.1 * UDFToDouble(_col1))) and _col5 BETWEEN (0.9 * UDFToDouble(_col3)) AND (1.1 * UDFToDouble(_col3))) (type: boolean)
+ Statistics:Num rows: 5284 Data size: 7589363 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_220]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: string)","1":"_col0 (type: string)"}
+ | outputColumnNames:["_col0","_col1","_col3","_col5"]
+ | Statistics:Num rows: 84551 Data size: 121439867 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 28 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_121]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 76865 Data size: 110399877 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: decimal(17,2))
+ | Group By Operator [GBY_116]
+ | | aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type: string)
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 76865 Data size: 110399877 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 27 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_115]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: decimal(17,2))
+ | Group By Operator [GBY_114]
+ | aggregations:["sum(_col2)"]
+ | keys:_col4 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_113]
+ | outputColumnNames:["_col4","_col2"]
+ | Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_218]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col6 (type: string)","1":"_col0 (type: string)"}
+ | | outputColumnNames:["_col2","_col4"]
+ | | Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 26 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_109]
+ | | key expressions:_col6 (type: string)
+ | | Map-reduce partition columns:_col6 (type: string)
+ | | sort order:+
+ | | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col2 (type: decimal(7,2)), _col4 (type: string)
+ | | Merge Join Operator [MERGEJOIN_214]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col2","_col4","_col6"]
+ | | | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 30 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_106]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col1 (type: string)
+ | | | Select Operator [SEL_86]
+ | | | outputColumnNames:["_col0","_col1"]
+ | | | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_204]
+ | | | predicate:(d_date_sk is not null and d_date is not null) (type: boolean)
+ | | | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_85]
+ | | | alias:date_dim
+ | | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 25 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_104]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col2 (type: decimal(7,2)), _col4 (type: string)
+ | | Merge Join Operator [MERGEJOIN_213]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col0","_col2","_col4"]
+ | | | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 24 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_99]
+ | | | key expressions:_col1 (type: int)
+ | | | Map-reduce partition columns:_col1 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | value expressions:_col0 (type: int), _col2 (type: decimal(7,2))
+ | | | Select Operator [SEL_82]
+ | | | outputColumnNames:["_col0","_col1","_col2"]
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | Filter Operator [FIL_202]
+ | | | predicate:(ws_item_sk is not null and ws_sold_date_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | TableScan [TS_81]
+ | | | alias:web_sales
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | |<-Map 29 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_101]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string)
+ | | Select Operator [SEL_84]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_203]
+ | | predicate:(i_item_sk is not null and i_item_id is not null) (type: boolean)
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_83]
+ | | alias:item
+ | | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 32 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_111]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 20089 Data size: 22479927 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_215]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col1 (type: int)"}
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 20089 Data size: 22479927 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 31 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_93]
+ | | key expressions:_col1 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: string)
+ | | Select Operator [SEL_88]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_205]
+ | | predicate:(d_week_seq is not null and d_date is not null) (type: boolean)
+ | | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_87]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 33 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_95]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_91]
+ | outputColumnNames:["_col1"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_206]
+ | predicate:((d_date = '1998-08-04') and d_week_seq is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_89]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_119]
+ key expressions:_col0 (type: string)
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 21137 Data size: 30358889 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: decimal(17,2)), _col3 (type: decimal(17,2))
+ Filter Operator [FIL_191]
+ predicate:(_col1 BETWEEN (0.9 * UDFToDouble(_col3)) AND (1.1 * UDFToDouble(_col3)) and _col3 BETWEEN (0.9 * UDFToDouble(_col1)) AND (1.1 * UDFToDouble(_col1))) (type: boolean)
+ Statistics:Num rows: 21137 Data size: 30358889 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_219]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: string)","1":"_col0 (type: string)"}
+ | outputColumnNames:["_col0","_col1","_col3"]
+ | Statistics:Num rows: 84551 Data size: 121439867 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 18 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_77]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 76865 Data size: 110399877 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: decimal(17,2))
+ | Group By Operator [GBY_72]
+ | | aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type: string)
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 76865 Data size: 110399877 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_71]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: decimal(17,2))
+ | Group By Operator [GBY_70]
+ | aggregations:["sum(_col2)"]
+ | keys:_col4 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_69]
+ | outputColumnNames:["_col4","_col2"]
+ | Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_217]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col6 (type: string)","1":"_col0 (type: string)"}
+ | | outputColumnNames:["_col2","_col4"]
+ | | Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 16 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_65]
+ | | key expressions:_col6 (type: string)
+ | | Map-reduce partition columns:_col6 (type: string)
+ | | sort order:+
+ | | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col2 (type: decimal(7,2)), _col4 (type: string)
+ | | Merge Join Operator [MERGEJOIN_211]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col2","_col4","_col6"]
+ | | | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 20 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_62]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col1 (type: string)
+ | | | Select Operator [SEL_42]
+ | | | outputColumnNames:["_col0","_col1"]
+ | | | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_199]
+ | | | predicate:(d_date_sk is not null and d_date is not null) (type: boolean)
+ | | | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_41]
+ | | | alias:date_dim
+ | | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 15 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_60]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col2 (type: decimal(7,2)), _col4 (type: string)
+ | | Merge Join Operator [MERGEJOIN_210]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col0","_col2","_col4"]
+ | | | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 14 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_55]
+ | | | key expressions:_col1 (type: int)
+ | | | Map-reduce partition columns:_col1 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | value expressions:_col0 (type: int), _col2 (type: decimal(7,2))
+ | | | Select Operator [SEL_38]
+ | | | outputColumnNames:["_col0","_col1","_col2"]
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | Filter Operator [FIL_197]
+ | | | predicate:(cs_item_sk is not null and cs_sold_date_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | TableScan [TS_37]
+ | | | alias:catalog_sales
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | |<-Map 19 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_57]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string)
+ | | Select Operator [SEL_40]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_198]
+ | | predicate:(i_item_sk is not null and i_item_id is not null) (type: boolean)
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_39]
+ | | alias:item
+ | | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 22 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_67]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 20089 Data size: 22479927 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_212]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col1 (type: int)"}
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 20089 Data size: 22479927 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 21 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_49]
+ | | key expressions:_col1 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: string)
+ | | Select Operator [SEL_44]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_200]
+ | | predicate:(d_week_seq is not null and d_date is not null) (type: boolean)
+ | | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_43]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 23 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_51]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_47]
+ | outputColumnNames:["_col1"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_201]
+ | predicate:((d_date = '1998-08-04') and d_week_seq is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_45]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_75]
+ key expressions:_col0 (type: string)
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 76865 Data size: 110399877 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: decimal(17,2))
+ Group By Operator [GBY_35]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 76865 Data size: 110399877 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_34]
+ key expressions:_col0 (type: string)
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: decimal(17,2))
+ Group By Operator [GBY_33]
+ aggregations:["sum(_col2)"]
+ keys:_col4 (type: string)
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_32]
+ outputColumnNames:["_col4","_col2"]
+ Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_216]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col6 (type: string)","1":"_col0 (type: string)"}
+ | outputColumnNames:["_col2","_col4"]
+ | Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_30]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 20089 Data size: 22479927 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_209]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col1 (type: int)"}
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 20089 Data size: 22479927 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 11 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_12]
+ | | key expressions:_col1 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: string)
+ | | Select Operator [SEL_7]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_195]
+ | | predicate:(d_week_seq is not null and d_date is not null) (type: boolean)
+ | | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_6]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_14]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_10]
+ | outputColumnNames:["_col1"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_196]
+ | predicate:((d_date = '1998-08-04') and d_week_seq is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_8]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_28]
+ key expressions:_col6 (type: string)
+ Map-reduce partition columns:_col6 (type: string)
+ sort order:+
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(7,2)), _col4 (type: string)
+ Merge Join Operator [MERGEJOIN_208]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col2","_col4","_col6"]
+ | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_25]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_5]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_194]
+ | predicate:(d_date_sk is not null and d_date is not null) (type: boolean)
+ | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_4]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_23]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(7,2)), _col4 (type: string)
+ Merge Join Operator [MERGEJOIN_207]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col4"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_18]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col2 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_192]
+ | predicate:(ss_item_sk is not null and ss_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string)
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_193]
+ predicate:(i_item_sk is not null and i_item_id is not null) (type: boolean)
+ Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:item
+ Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query60.q.out b/ql/src/test/results/clientpositive/perf/query60.q.out
new file mode 100644
index 0000000..2cbd7fa
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query60.q.out
@@ -0,0 +1,662 @@
+PREHOOK: query: explain with ss as (
+ select
+ i_item_id,sum(ss_ext_sales_price) total_sales
+ from
+ store_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ item.i_item_id in (select
+ i.i_item_id
+from
+ item i
+where i_category in ('Children'))
+ and ss_item_sk = i_item_sk
+ and ss_sold_date_sk = d_date_sk
+ and d_year = 1999
+ and d_moy = 9
+ and ss_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id),
+ cs as (
+ select
+ i_item_id,sum(cs_ext_sales_price) total_sales
+ from
+ catalog_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ item.i_item_id in (select
+ i.i_item_id
+from
+ item i
+where i_category in ('Children'))
+ and cs_item_sk = i_item_sk
+ and cs_sold_date_sk = d_date_sk
+ and d_year = 1999
+ and d_moy = 9
+ and cs_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id),
+ ws as (
+ select
+ i_item_id,sum(ws_ext_sales_price) total_sales
+ from
+ web_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ item.i_item_id in (select
+ i.i_item_id
+from
+ item i
+where i_category in ('Children'))
+ and ws_item_sk = i_item_sk
+ and ws_sold_date_sk = d_date_sk
+ and d_year = 1999
+ and d_moy = 9
+ and ws_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id)
+ select
+ i_item_id
+,sum(total_sales) total_sales
+ from (select * from ss
+ union all
+ select * from cs
+ union all
+ select * from ws) tmp1
+ group by i_item_id
+ order by i_item_id
+ ,total_sales
+ limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain with ss as (
+ select
+ i_item_id,sum(ss_ext_sales_price) total_sales
+ from
+ store_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ item.i_item_id in (select
+ i.i_item_id
+from
+ item i
+where i_category in ('Children'))
+ and ss_item_sk = i_item_sk
+ and ss_sold_date_sk = d_date_sk
+ and d_year = 1999
+ and d_moy = 9
+ and ss_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id),
+ cs as (
+ select
+ i_item_id,sum(cs_ext_sales_price) total_sales
+ from
+ catalog_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ item.i_item_id in (select
+ i.i_item_id
+from
+ item i
+where i_category in ('Children'))
+ and cs_item_sk = i_item_sk
+ and cs_sold_date_sk = d_date_sk
+ and d_year = 1999
+ and d_moy = 9
+ and cs_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id),
+ ws as (
+ select
+ i_item_id,sum(ws_ext_sales_price) total_sales
+ from
+ web_sales,
+ date_dim,
+ customer_address,
+ item
+ where
+ item.i_item_id in (select
+ i.i_item_id
+from
+ item i
+where i_category in ('Children'))
+ and ws_item_sk = i_item_sk
+ and ws_sold_date_sk = d_date_sk
+ and d_year = 1999
+ and d_moy = 9
+ and ws_bill_addr_sk = ca_address_sk
+ and ca_gmt_offset = -6
+ group by i_item_id)
+ select
+ i_item_id
+,sum(total_sales) total_sales
+ from (select * from ss
+ union all
+ select * from cs
+ union all
+ select * from ws) tmp1
+ group by i_item_id
+ order by i_item_id
+ ,total_sales
+ limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 12 <- Map 11 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
+Reducer 15 <- Map 14 (SIMPLE_EDGE), Map 19 (SIMPLE_EDGE)
+Reducer 16 <- Map 20 (SIMPLE_EDGE), Reducer 15 (SIMPLE_EDGE)
+Reducer 17 <- Reducer 16 (SIMPLE_EDGE), Reducer 22 (SIMPLE_EDGE)
+Reducer 18 <- Reducer 17 (SIMPLE_EDGE), Union 6 (CONTAINS)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 9 (SIMPLE_EDGE)
+Reducer 22 <- Map 21 (SIMPLE_EDGE), Map 23 (SIMPLE_EDGE)
+Reducer 25 <- Map 24 (SIMPLE_EDGE), Map 29 (SIMPLE_EDGE)
+Reducer 26 <- Map 30 (SIMPLE_EDGE), Reducer 25 (SIMPLE_EDGE)
+Reducer 27 <- Reducer 26 (SIMPLE_EDGE), Reducer 32 (SIMPLE_EDGE)
+Reducer 28 <- Reducer 27 (SIMPLE_EDGE), Union 6 (CONTAINS)
+Reducer 3 <- Map 10 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 32 <- Map 31 (SIMPLE_EDGE), Map 33 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 12 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE), Union 6 (CONTAINS)
+Reducer 7 <- Union 6 (SIMPLE_EDGE)
+Reducer 8 <- Reducer 7 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 8
+ File Output Operator [FS_134]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 101400 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_133]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 101400 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_132]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 9075000 Data size: 9210035328 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_131]
+ key expressions:_col0 (type: string), _col1 (type: decimal(27,2))
+ sort order:++
+ Statistics:Num rows: 9075000 Data size: 9210035328 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_129]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 9075000 Data size: 9210035328 Basic stats: COMPLETE Column stats: NONE
+ |<-Union 6 [SIMPLE_EDGE]
+ |<-Reducer 18 [CONTAINS]
+ | Reduce Output Operator [RS_128]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 18150000 Data size: 18420070656 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: decimal(27,2))
+ | Group By Operator [GBY_127]
+ | aggregations:["sum(_col1)"]
+ | keys:_col0 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 18150000 Data size: 18420070656 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_80]
+ | | aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type: string)
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 6050000 Data size: 6140023552 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_79]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: decimal(17,2))
+ | Group By Operator [GBY_78]
+ | aggregations:["sum(_col3)"]
+ | keys:_col10 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_77]
+ | outputColumnNames:["_col10","_col3"]
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_196]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col3","_col10"]
+ | | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 16 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_73]
+ | | key expressions:_col2 (type: int)
+ | | Map-reduce partition columns:_col2 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col3 (type: decimal(7,2))
+ | | Merge Join Operator [MERGEJOIN_190]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col2","_col3"]
+ | | | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 20 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_70]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | | Select Operator [SEL_48]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_178]
+ | | | predicate:((ca_gmt_offset = -6) and ca_address_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_46]
+ | | | alias:customer_address
+ | | | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 15 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_68]
+ | | key expressions:_col1 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col2 (type: int), _col3 (type: decimal(7,2))
+ | | Merge Join Operator [MERGEJOIN_189]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col2","_col3"]
+ | | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 14 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_63]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: decimal(7,2))
+ | | | Select Operator [SEL_42]
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | Filter Operator [FIL_176]
+ | | | predicate:((cs_sold_date_sk is not null and cs_bill_addr_sk is not null) and cs_item_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | TableScan [TS_41]
+ | | | alias:catalog_sales
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | |<-Map 19 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_65]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_45]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_177]
+ | | predicate:(((d_year = 1999) and (d_moy = 9)) and d_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_43]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 22 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_75]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Merge Join Operator [MERGEJOIN_191]
+ | | condition map:[{"":"Left Semi Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: string)","1":"_col0 (type: string)"}
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 21 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_57]
+ | | key expressions:_col1 (type: string)
+ | | Map-reduce partition columns:_col1 (type: string)
+ | | sort order:+
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: int)
+ | | Select Operator [SEL_50]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_179]
+ | | predicate:(i_item_id is not null and i_item_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_49]
+ | | alias:item
+ | | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 23 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_59]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_55]
+ | keys:_col0 (type: string)
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_53]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_180]
+ | predicate:((i_category) IN ('Children') and i_item_id is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_51]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 28 [CONTAINS]
+ | Reduce Output Operator [RS_128]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 18150000 Data size: 18420070656 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: decimal(27,2))
+ | Group By Operator [GBY_127]
+ | aggregations:["sum(_col1)"]
+ | keys:_col0 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 18150000 Data size: 18420070656 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_123]
+ | | aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type: string)
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 6050000 Data size: 6140023552 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 27 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_122]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: decimal(17,2))
+ | Group By Operator [GBY_121]
+ | aggregations:["sum(_col3)"]
+ | keys:_col10 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_120]
+ | outputColumnNames:["_col10","_col3"]
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_197]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col3","_col10"]
+ | | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 26 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_116]
+ | | key expressions:_col1 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col3 (type: decimal(7,2))
+ | | Merge Join Operator [MERGEJOIN_193]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col3"]
+ | | | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 30 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_113]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | | Select Operator [SEL_91]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_183]
+ | | | predicate:((ca_gmt_offset = -6) and ca_address_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_89]
+ | | | alias:customer_address
+ | | | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 25 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_111]
+ | | key expressions:_col2 (type: int)
+ | | Map-reduce partition columns:_col2 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col3 (type: decimal(7,2))
+ | | Merge Join Operator [MERGEJOIN_192]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col2","_col3"]
+ | | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 24 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_106]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: decimal(7,2))
+ | | | Select Operator [SEL_85]
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | Filter Operator [FIL_181]
+ | | | predicate:((ws_sold_date_sk is not null and ws_bill_addr_sk is not null) and ws_item_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | TableScan [TS_84]
+ | | | alias:web_sales
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | |<-Map 29 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_108]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_88]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_182]
+ | | predicate:(((d_year = 1999) and (d_moy = 9)) and d_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_86]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 32 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_118]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Merge Join Operator [MERGEJOIN_194]
+ | | condition map:[{"":"Left Semi Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: string)","1":"_col0 (type: string)"}
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 31 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_100]
+ | | key expressions:_col1 (type: string)
+ | | Map-reduce partition columns:_col1 (type: string)
+ | | sort order:+
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: int)
+ | | Select Operator [SEL_93]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_184]
+ | | predicate:(i_item_id is not null and i_item_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_92]
+ | | alias:item
+ | | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 33 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_102]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_98]
+ | keys:_col0 (type: string)
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_96]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_185]
+ | predicate:((i_category) IN ('Children') and i_item_id is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_94]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [CONTAINS]
+ Reduce Output Operator [RS_128]
+ key expressions:_col0 (type: string)
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 18150000 Data size: 18420070656 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: decimal(27,2))
+ Group By Operator [GBY_127]
+ aggregations:["sum(_col1)"]
+ keys:_col0 (type: string)
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 18150000 Data size: 18420070656 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_39]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 6050000 Data size: 6140023552 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_38]
+ key expressions:_col0 (type: string)
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: decimal(17,2))
+ Group By Operator [GBY_37]
+ aggregations:["sum(_col3)"]
+ keys:_col10 (type: string)
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_36]
+ outputColumnNames:["_col10","_col3"]
+ Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_195]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col3","_col10"]
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_34]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Merge Join Operator [MERGEJOIN_188]
+ | | condition map:[{"":"Left Semi Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: string)","1":"_col0 (type: string)"}
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 11 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_16]
+ | | key expressions:_col1 (type: string)
+ | | Map-reduce partition columns:_col1 (type: string)
+ | | sort order:+
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: int)
+ | | Select Operator [SEL_9]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_174]
+ | | predicate:(i_item_id is not null and i_item_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_8]
+ | | alias:item
+ | | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_18]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_14]
+ | keys:_col0 (type: string)
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_12]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_175]
+ | predicate:((i_category) IN ('Children') and i_item_id is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_10]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_32]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_187]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_29]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_173]
+ | predicate:((ca_gmt_offset = -6) and ca_address_sk is not null) (type: boolean)
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_27]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_186]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_22]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_171]
+ | predicate:((ss_sold_date_sk is not null and ss_addr_sk is not null) and ss_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_24]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_172]
+ predicate:(((d_year = 1999) and (d_moy = 9)) and d_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:date_dim
+ Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query64.q.out b/ql/src/test/results/clientpositive/perf/query64.q.out
new file mode 100644
index 0000000..c889ffe
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query64.q.out
@@ -0,0 +1,1192 @@
+PREHOOK: query: explain select cs1.product_name ,cs1.store_name ,cs1.store_zip ,cs1.b_street_number ,cs1.b_streen_name ,cs1.b_city ,cs1.b_zip ,cs1.c_street_number ,cs1.c_street_name ,cs1.c_city ,cs1.c_zip ,cs1.syear ,cs1.cnt ,cs1.s1 ,cs1.s2 ,cs1.s3 ,cs2.s1 ,cs2.s2 ,cs2.s3 ,cs2.syear ,cs2.cnt from (select i_product_name as product_name ,i_item_sk as item_sk ,s_store_name as store_name ,s_zip as store_zip ,ad1.ca_street_number as b_street_number ,ad1.ca_street_name as b_streen_name ,ad1.ca_city as b_city ,ad1.ca_zip as b_zip ,ad2.ca_street_number as c_street_number ,ad2.ca_street_name as c_street_name ,ad2.ca_city as c_city ,ad2.ca_zip as c_zip ,d1.d_year as syear ,d2.d_year as fsyear ,d3.d_year as s2year ,count(*) as cnt ,sum(ss_wholesale_cost) as s1 ,sum(ss_list_price) as s2 ,sum(ss_coupon_amt) as s3 FROM store_sales JOIN store_returns ON store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk JOIN date_dim d1 ON store_sales.ss_sold_date_sk = d1.d_date_sk JOIN date_dim d2 ON customer.c_first_sales_date_sk = d2.d_date_sk JOIN date_dim d3 ON customer.c_first_shipto_date_sk = d3.d_date_sk JOIN store ON store_sales.ss_store_sk = store.s_store_sk JOIN customer_demographics cd1 ON store_sales.ss_cdemo_sk= cd1.cd_demo_sk JOIN customer_demographics cd2 ON customer.c_current_cdemo_sk = cd2.cd_demo_sk JOIN promotion ON store_sales.ss_promo_sk = promotion.p_promo_sk JOIN household_demographics hd1 ON store_sales.ss_hdemo_sk = hd1.hd_demo_sk JOIN household_demographics hd2 ON customer.c_current_hdemo_sk = hd2.hd_demo_sk JOIN customer_address ad1 ON store_sales.ss_addr_sk = ad1.ca_address_sk JOIN customer_address ad2 ON customer.c_current_addr_sk = ad2.ca_address_sk JOIN income_band ib1 ON hd1.hd_income_band_sk = ib1.ib_income_band_sk JOIN income_band ib2 ON hd2.hd_income_band_sk = ib2.ib_income_band_sk JOIN item ON store_sales.ss_item_sk = item.i_item_sk JOIN (select cs_item_sk ,sum(cs_ext_list_price) as sale,sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit) as refund from catalog_sales JOIN catalog_returns ON catalog_sales.cs_item_sk = catalog_returns.cr_item_sk and catalog_sales.cs_order_number = catalog_returns.cr_order_number group by cs_item_sk having sum(cs_ext_list_price)>2*sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit)) cs_ui ON store_sales.ss_item_sk = cs_ui.cs_item_sk WHERE cd1.cd_marital_status <> cd2.cd_marital_status and i_color in ('maroon','burnished','dim','steel','navajo','chocolate') and i_current_price between 35 and 35 + 10 and i_current_price between 35 + 1 and 35 + 15 group by i_product_name ,i_item_sk ,s_store_name ,s_zip ,ad1.ca_street_number ,ad1.ca_street_name ,ad1.ca_city ,ad1.ca_zip ,ad2.ca_street_number ,ad2.ca_street_name ,ad2.ca_city ,ad2.ca_zip ,d1.d_year ,d2.d_year ,d3.d_year ) cs1 JOIN (select i_product_name as product_name ,i_item_sk as item_sk ,s_store_name as store_name ,s_zip as store_zip ,ad1.ca_street_number as b_street_number ,ad1.ca_street_name as b_streen_name ,ad1.ca_city as b_city ,ad1.ca_zip as b_zip ,ad2.ca_street_number as c_street_number ,ad2.ca_street_name as c_street_name ,ad2.ca_city as c_city ,ad2.ca_zip as c_zip ,d1.d_year as syear ,d2.d_year as fsyear ,d3.d_year as s2year ,count(*) as cnt ,sum(ss_wholesale_cost) as s1 ,sum(ss_list_price) as s2 ,sum(ss_coupon_amt) as s3 FROM store_sales JOIN store_returns ON store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk JOIN date_dim d1 ON store_sales.ss_sold_date_sk = d1.d_date_sk JOIN date_dim d2 ON customer.c_first_sales_date_sk = d2.d_date_sk JOIN date_dim d3 ON customer.c_first_shipto_date_sk = d3.d_date_sk JOIN store ON store_sales.ss_store_sk = store.s_store_sk JOIN customer_demographics cd1 ON store_sales.ss_cdemo_sk= cd1.cd_demo_sk JOIN customer_demographics cd2 ON customer.c_current_cdemo_sk = cd2.cd_demo_sk JOIN promotion ON store_sales.ss_promo_sk = promotion.p_promo_sk JOIN household_demographics hd1 ON store_sales.ss_hdemo_sk = hd1.hd_demo_sk JOIN household_demographics hd2 ON customer.c_current_hdemo_sk = hd2.hd_demo_sk JOIN customer_address ad1 ON store_sales.ss_addr_sk = ad1.ca_address_sk JOIN customer_address ad2 ON customer.c_current_addr_sk = ad2.ca_address_sk JOIN income_band ib1 ON hd1.hd_income_band_sk = ib1.ib_income_band_sk JOIN income_band ib2 ON hd2.hd_income_band_sk = ib2.ib_income_band_sk JOIN item ON store_sales.ss_item_sk = item.i_item_sk JOIN (select cs_item_sk ,sum(cs_ext_list_price) as sale,sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit) as refund from catalog_sales JOIN catalog_returns ON catalog_sales.cs_item_sk = catalog_returns.cr_item_sk and catalog_sales.cs_order_number = catalog_returns.cr_order_number group by cs_item_sk having sum(cs_ext_list_price)>2*sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit)) cs_ui ON store_sales.ss_item_sk = cs_ui.cs_item_sk WHERE cd1.cd_marital_status <> cd2.cd_marital_status and i_color in ('maroon','burnished','dim','steel','navajo','chocolate') and i_current_price between 35 and 35 + 10 and i_current_price between 35 + 1 and 35 + 15 group by i_product_name ,i_item_sk ,s_store_name ,s_zip ,ad1.ca_street_number ,ad1.ca_street_name ,ad1.ca_city ,ad1.ca_zip ,ad2.ca_street_number ,ad2.ca_street_name ,ad2.ca_city ,ad2.ca_zip ,d1.d_year ,d2.d_year ,d3.d_year ) cs2 ON cs1.item_sk=cs2.item_sk where cs1.syear = 2000 and cs2.syear = 2000 + 1 and cs2.cnt <= cs1.cnt and cs1.store_name = cs2.store_name and cs1.store_zip = cs2.store_zip order by cs1.product_name ,cs1.store_name ,cs2.cnt
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select cs1.product_name ,cs1.store_name ,cs1.store_zip ,cs1.b_street_number ,cs1.b_streen_name ,cs1.b_city ,cs1.b_zip ,cs1.c_street_number ,cs1.c_street_name ,cs1.c_city ,cs1.c_zip ,cs1.syear ,cs1.cnt ,cs1.s1 ,cs1.s2 ,cs1.s3 ,cs2.s1 ,cs2.s2 ,cs2.s3 ,cs2.syear ,cs2.cnt from (select i_product_name as product_name ,i_item_sk as item_sk ,s_store_name as store_name ,s_zip as store_zip ,ad1.ca_street_number as b_street_number ,ad1.ca_street_name as b_streen_name ,ad1.ca_city as b_city ,ad1.ca_zip as b_zip ,ad2.ca_street_number as c_street_number ,ad2.ca_street_name as c_street_name ,ad2.ca_city as c_city ,ad2.ca_zip as c_zip ,d1.d_year as syear ,d2.d_year as fsyear ,d3.d_year as s2year ,count(*) as cnt ,sum(ss_wholesale_cost) as s1 ,sum(ss_list_price) as s2 ,sum(ss_coupon_amt) as s3 FROM store_sales JOIN store_returns ON store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk JOIN date_dim d1 ON store_sales.ss_sold_date_sk = d1.d_date_sk JOIN date_dim d2 ON customer.c_first_sales_date_sk = d2.d_date_sk JOIN date_dim d3 ON customer.c_first_shipto_date_sk = d3.d_date_sk JOIN store ON store_sales.ss_store_sk = store.s_store_sk JOIN customer_demographics cd1 ON store_sales.ss_cdemo_sk= cd1.cd_demo_sk JOIN customer_demographics cd2 ON customer.c_current_cdemo_sk = cd2.cd_demo_sk JOIN promotion ON store_sales.ss_promo_sk = promotion.p_promo_sk JOIN household_demographics hd1 ON store_sales.ss_hdemo_sk = hd1.hd_demo_sk JOIN household_demographics hd2 ON customer.c_current_hdemo_sk = hd2.hd_demo_sk JOIN customer_address ad1 ON store_sales.ss_addr_sk = ad1.ca_address_sk JOIN customer_address ad2 ON customer.c_current_addr_sk = ad2.ca_address_sk JOIN income_band ib1 ON hd1.hd_income_band_sk = ib1.ib_income_band_sk JOIN income_band ib2 ON hd2.hd_income_band_sk = ib2.ib_income_band_sk JOIN item ON store_sales.ss_item_sk = item.i_item_sk JOIN (select cs_item_sk ,sum(cs_ext_list_price) as sale,sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit) as refund from catalog_sales JOIN catalog_returns ON catalog_sales.cs_item_sk = catalog_returns.cr_item_sk and catalog_sales.cs_order_number = catalog_returns.cr_order_number group by cs_item_sk having sum(cs_ext_list_price)>2*sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit)) cs_ui ON store_sales.ss_item_sk = cs_ui.cs_item_sk WHERE cd1.cd_marital_status <> cd2.cd_marital_status and i_color in ('maroon','burnished','dim','steel','navajo','chocolate') and i_current_price between 35 and 35 + 10 and i_current_price between 35 + 1 and 35 + 15 group by i_product_name ,i_item_sk ,s_store_name ,s_zip ,ad1.ca_street_number ,ad1.ca_street_name ,ad1.ca_city ,ad1.ca_zip ,ad2.ca_street_number ,ad2.ca_street_name ,ad2.ca_city ,ad2.ca_zip ,d1.d_year ,d2.d_year ,d3.d_year ) cs1 JOIN (select i_product_name as product_name ,i_item_sk as item_sk ,s_store_name as store_name ,s_zip as store_zip ,ad1.ca_street_number as b_street_number ,ad1.ca_street_name as b_streen_name ,ad1.ca_city as b_city ,ad1.ca_zip as b_zip ,ad2.ca_street_number as c_street_number ,ad2.ca_street_name as c_street_name ,ad2.ca_city as c_city ,ad2.ca_zip as c_zip ,d1.d_year as syear ,d2.d_year as fsyear ,d3.d_year as s2year ,count(*) as cnt ,sum(ss_wholesale_cost) as s1 ,sum(ss_list_price) as s2 ,sum(ss_coupon_amt) as s3 FROM store_sales JOIN store_returns ON store_sales.ss_item_sk = store_returns.sr_item_sk and store_sales.ss_ticket_number = store_returns.sr_ticket_number JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk JOIN date_dim d1 ON store_sales.ss_sold_date_sk = d1.d_date_sk JOIN date_dim d2 ON customer.c_first_sales_date_sk = d2.d_date_sk JOIN date_dim d3 ON customer.c_first_shipto_date_sk = d3.d_date_sk JOIN store ON store_sales.ss_store_sk = store.s_store_sk JOIN customer_demographics cd1 ON store_sales.ss_cdemo_sk= cd1.cd_demo_sk JOIN customer_demographics cd2 ON customer.c_current_cdemo_sk = cd2.cd_demo_sk JOIN promotion ON store_sales.ss_promo_sk = promotion.p_promo_sk JOIN household_demographics hd1 ON store_sales.ss_hdemo_sk = hd1.hd_demo_sk JOIN household_demographics hd2 ON customer.c_current_hdemo_sk = hd2.hd_demo_sk JOIN customer_address ad1 ON store_sales.ss_addr_sk = ad1.ca_address_sk JOIN customer_address ad2 ON customer.c_current_addr_sk = ad2.ca_address_sk JOIN income_band ib1 ON hd1.hd_income_band_sk = ib1.ib_income_band_sk JOIN income_band ib2 ON hd2.hd_income_band_sk = ib2.ib_income_band_sk JOIN item ON store_sales.ss_item_sk = item.i_item_sk JOIN (select cs_item_sk ,sum(cs_ext_list_price) as sale,sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit) as refund from catalog_sales JOIN catalog_returns ON catalog_sales.cs_item_sk = catalog_returns.cr_item_sk and catalog_sales.cs_order_number = catalog_returns.cr_order_number group by cs_item_sk having sum(cs_ext_list_price)>2*sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit)) cs_ui ON store_sales.ss_item_sk = cs_ui.cs_item_sk WHERE cd1.cd_marital_status <> cd2.cd_marital_status and i_color in ('maroon','burnished','dim','steel','navajo','chocolate') and i_current_price between 35 and 35 + 10 and i_current_price between 35 + 1 and 35 + 15 group by i_product_name ,i_item_sk ,s_store_name ,s_zip ,ad1.ca_street_number ,ad1.ca_street_name ,ad1.ca_city ,ad1.ca_zip ,ad2.ca_street_number ,ad2.ca_street_name ,ad2.ca_city ,ad2.ca_zip ,d1.d_year ,d2.d_year ,d3.d_year ) cs2 ON cs1.item_sk=cs2.item_sk where cs1.syear = 2000 and cs2.syear = 2000 + 1 and cs2.cnt <= cs1.cnt and cs1.store_name = cs2.store_name and cs1.store_zip = cs2.store_zip order by cs1.product_name ,cs1.store_name ,cs2.cnt
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Map 29 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Map 30 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
+Reducer 12 <- Map 31 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
+Reducer 13 <- Map 32 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE)
+Reducer 14 <- Map 33 (SIMPLE_EDGE), Reducer 13 (SIMPLE_EDGE)
+Reducer 15 <- Map 34 (SIMPLE_EDGE), Reducer 14 (SIMPLE_EDGE)
+Reducer 16 <- Map 35 (SIMPLE_EDGE), Reducer 15 (SIMPLE_EDGE)
+Reducer 17 <- Map 36 (SIMPLE_EDGE), Reducer 16 (SIMPLE_EDGE), Reducer 39 (SIMPLE_EDGE)
+Reducer 18 <- Reducer 17 (SIMPLE_EDGE)
+Reducer 19 <- Reducer 18 (SIMPLE_EDGE), Reducer 58 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 21 (SIMPLE_EDGE)
+Reducer 20 <- Reducer 19 (SIMPLE_EDGE)
+Reducer 3 <- Map 22 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 38 <- Map 37 (SIMPLE_EDGE), Map 40 (SIMPLE_EDGE)
+Reducer 39 <- Reducer 38 (SIMPLE_EDGE)
+Reducer 4 <- Map 23 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 42 <- Map 41 (SIMPLE_EDGE), Map 59 (SIMPLE_EDGE)
+Reducer 43 <- Map 60 (SIMPLE_EDGE), Reducer 42 (SIMPLE_EDGE)
+Reducer 44 <- Map 61 (SIMPLE_EDGE), Reducer 43 (SIMPLE_EDGE)
+Reducer 45 <- Map 62 (SIMPLE_EDGE), Reducer 44 (SIMPLE_EDGE)
+Reducer 46 <- Map 63 (SIMPLE_EDGE), Reducer 45 (SIMPLE_EDGE)
+Reducer 47 <- Map 64 (SIMPLE_EDGE), Reducer 46 (SIMPLE_EDGE)
+Reducer 48 <- Map 65 (SIMPLE_EDGE), Reducer 47 (SIMPLE_EDGE)
+Reducer 49 <- Map 66 (SIMPLE_EDGE), Reducer 48 (SIMPLE_EDGE)
+Reducer 5 <- Map 24 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 50 <- Map 67 (SIMPLE_EDGE), Reducer 49 (SIMPLE_EDGE)
+Reducer 51 <- Map 68 (SIMPLE_EDGE), Reducer 50 (SIMPLE_EDGE)
+Reducer 52 <- Map 69 (SIMPLE_EDGE), Reducer 51 (SIMPLE_EDGE)
+Reducer 53 <- Map 70 (SIMPLE_EDGE), Reducer 52 (SIMPLE_EDGE)
+Reducer 54 <- Map 71 (SIMPLE_EDGE), Reducer 53 (SIMPLE_EDGE)
+Reducer 55 <- Map 72 (SIMPLE_EDGE), Reducer 54 (SIMPLE_EDGE)
+Reducer 56 <- Map 73 (SIMPLE_EDGE), Reducer 55 (SIMPLE_EDGE)
+Reducer 57 <- Map 74 (SIMPLE_EDGE), Reducer 56 (SIMPLE_EDGE), Reducer 77 (SIMPLE_EDGE)
+Reducer 58 <- Reducer 57 (SIMPLE_EDGE)
+Reducer 6 <- Map 25 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 26 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 76 <- Map 75 (SIMPLE_EDGE), Map 78 (SIMPLE_EDGE)
+Reducer 77 <- Reducer 76 (SIMPLE_EDGE)
+Reducer 8 <- Map 27 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Map 28 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 20
+ File Output Operator [FS_293]
+ compressed:false
+ Statistics:Num rows: 11810406 Data size: 11986144820 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Select Operator [SEL_292]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20"]
+ | Statistics:Num rows: 11810406 Data size: 11986144820 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 19 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_291]
+ key expressions:_col0 (type: string), _col1 (type: string), _col20 (type: bigint)
+ sort order:+++
+ Statistics:Num rows: 11810406 Data size: 11986144820 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string), _col11 (type: int), _col12 (type: bigint), _col13 (type: decimal(17,2)), _col14 (type: decimal(17,2)), _col15 (type: decimal(17,2)), _col16 (type: decimal(17,2)), _col17 (type: decimal(17,2)), _col18 (type: decimal(17,2)), _col19 (type: int)
+ Select Operator [SEL_290]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20"]
+ Statistics:Num rows: 11810406 Data size: 11986144820 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_682]
+ predicate:(_col34 <= _col15) (type: boolean)
+ Statistics:Num rows: 11810406 Data size: 11986144820 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_759]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int), _col2 (type: string), _col3 (type: string)","1":"_col1 (type: int), _col2 (type: string), _col3 (type: string)"}
+ | outputColumnNames:["_col0","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col15","_col16","_col17","_col18","_col31","_col34","_col35","_col36","_col37"]
+ | Statistics:Num rows: 35431220 Data size: 35958436491 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 18 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_285]
+ | key expressions:_col1 (type: int), _col2 (type: string), _col3 (type: string)
+ | Map-reduce partition columns:_col1 (type: int), _col2 (type: string), _col3 (type: string)
+ | sort order:+++
+ | Statistics:Num rows: 32210200 Data size: 32689487011 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string), _col11 (type: string), _col12 (type: int), _col15 (type: bigint), _col16 (type: decimal(17,2)), _col17 (type: decimal(17,2)), _col18 (type: decimal(17,2))
+ | Select Operator [SEL_141]
+ | outputColumnNames:["_col0","_col1","_col10","_col11","_col12","_col15","_col16","_col17","_col18","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
+ | Statistics:Num rows: 32210200 Data size: 32689487011 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_140]
+ | | aggregations:["count(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)"]
+ | | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: string), KEY._col4 (type: string), KEY._col5 (type: string), KEY._col6 (type: string), KEY._col7 (type: string), KEY._col8 (type: string), KEY._col9 (type: string), KEY._col10 (type: string), KEY._col11 (type: string), KEY._col12 (type: string), KEY._col13 (type: int), KEY._col14 (type: string)
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18"]
+ | | Statistics:Num rows: 32210200 Data size: 32689487011 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_139]
+ | key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string), _col11 (type: string), _col12 (type: string), _col13 (type: int), _col14 (type: string)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string), _col11 (type: string), _col12 (type: string), _col13 (type: int), _col14 (type: string)
+ | sort order:+++++++++++++++
+ | Statistics:Num rows: 64420401 Data size: 65378975037 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col15 (type: bigint), _col16 (type: decimal(17,2)), _col17 (type: decimal(17,2)), _col18 (type: decimal(17,2))
+ | Group By Operator [GBY_138]
+ | aggregations:["count()","sum(_col9)","sum(_col10)","sum(_col11)"]
+ | keys:_col21 (type: int), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col39 (type: string), _col40 (type: string), _col41 (type: string), _col42 (type: string), _col44 (type: string), _col45 (type: string), _col46 (type: string), _col47 (type: string), _col50 (type: int), _col53 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18"]
+ | Statistics:Num rows: 64420401 Data size: 65378975037 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_137]
+ | outputColumnNames:["_col21","_col23","_col25","_col27","_col28","_col39","_col40","_col41","_col42","_col44","_col45","_col46","_col47","_col50","_col53","_col9","_col10","_col11"]
+ | Statistics:Num rows: 64420401 Data size: 65378975037 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_741]
+ | | condition map:[{"":"Inner Join 0 to 1"},{"":"Inner Join 0 to 2"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)","2":"_col0 (type: int)"}
+ | | outputColumnNames:["_col9","_col10","_col11","_col23","_col25","_col27","_col28","_col39","_col40","_col41","_col42","_col44","_col45","_col46","_col47","_col50","_col53"]
+ | | Statistics:Num rows: 64420401 Data size: 65378975037 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 36 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_133]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 28875 Data size: 41472528 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col3 (type: string)
+ | | Select Operator [SEL_78]
+ | | outputColumnNames:["_col0","_col3"]
+ | | Statistics:Num rows: 28875 Data size: 41472528 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_700]
+ | | predicate:((((i_color) IN ('maroon', 'burnished', 'dim', 'steel', 'navajo', 'chocolate') and i_current_price BETWEEN 35 AND 45) and i_current_price BETWEEN 36 AND 50) and i_item_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 28875 Data size: 41472528 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_76]
+ | | alias:item
+ | | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 16 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_131]
+ | | key expressions:_col1 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 29282000 Data size: 29717715282 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col39 (type: string), _col40 (type: string), _col41 (type: string), _col42 (type: string), _col44 (type: string), _col45 (type: string), _col46 (type: string), _col47 (type: string)
+ | | Merge Join Operator [MERGEJOIN_739]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col37 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col9","_col10","_col11","_col23","_col25","_col27","_col28","_col39","_col40","_col41","_col42","_col44","_col45","_col46","_col47"]
+ | | | Statistics:Num rows: 29282000 Data size: 29717715282 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 35 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_128]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
+ | | | Select Operator [SEL_75]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_699]
+ | | | predicate:ib_income_band_sk is not null (type: boolean)
+ | | | Statistics:Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_74]
+ | | | alias:ib1
+ | | | Statistics:Num rows: 20 Data size: 240 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 15 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_126]
+ | | key expressions:_col37 (type: int)
+ | | Map-reduce partition columns:_col37 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 26620000 Data size: 27016104217 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col39 (type: string), _col40 (type: string), _col41 (type: string), _col42 (type: string), _col44 (type: string), _col45 (type: string), _col46 (type: string), _col47 (type: string)
+ | | Merge Join Operator [MERGEJOIN_738]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col35 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col9","_col10","_col11","_col23","_col25","_col27","_col28","_col37","_col39","_col40","_col41","_col42","_col44","_col45","_col46","_col47"]
+ | | | Statistics:Num rows: 26620000 Data size: 27016104217 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 34 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_123]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
+ | | | Select Operator [SEL_73]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_698]
+ | | | predicate:ib_income_band_sk is not null (type: boolean)
+ | | | Statistics:Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_72]
+ | | | alias:ib1
+ | | | Statistics:Num rows: 20 Data size: 240 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 14 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_121]
+ | | key expressions:_col35 (type: int)
+ | | Map-reduce partition columns:_col35 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 24200000 Data size: 24560094211 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col37 (type: int), _col39 (type: string), _col40 (type: string), _col41 (type: string), _col42 (type: string), _col44 (type: string), _col45 (type: string), _col46 (type: string), _col47 (type: string)
+ | | Merge Join Operator [MERGEJOIN_737]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col17 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col9","_col10","_col11","_col23","_col25","_col27","_col28","_col35","_col37","_col39","_col40","_col41","_col42","_col44","_col45","_col46","_col47"]
+ | | | Statistics:Num rows: 24200000 Data size: 24560094211 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 33 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_118]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ | | | Select Operator [SEL_71]
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | | | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_697]
+ | | | predicate:ca_address_sk is not null (type: boolean)
+ | | | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_70]
+ | | | alias:ad1
+ | | | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 13 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_116]
+ | | key expressions:_col17 (type: int)
+ | | Map-reduce partition columns:_col17 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col35 (type: int), _col37 (type: int), _col39 (type: string), _col40 (type: string), _col41 (type: string), _col42 (type: string)
+ | | Merge Join Operator [MERGEJOIN_736]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col5 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col9","_col10","_col11","_col17","_col23","_col25","_col27","_col28","_col35","_col37","_col39","_col40","_col41","_col42"]
+ | | | Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 32 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_113]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ | | | Select Operator [SEL_69]
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | | | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_696]
+ | | | predicate:ca_address_sk is not null (type: boolean)
+ | | | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_68]
+ | | | alias:ad1
+ | | | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 12 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_111]
+ | | key expressions:_col5 (type: int)
+ | | Map-reduce partition columns:_col5 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 3242175 Data size: 2788339225 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col17 (type: int), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col35 (type: int), _col37 (type: int)
+ | | Merge Join Operator [MERGEJOIN_735]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col16 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col5","_col9","_col10","_col11","_col17","_col23","_col25","_col27","_col28","_col35","_col37"]
+ | | | Statistics:Num rows: 3242175 Data size: 2788339225 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 31 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_108]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col1 (type: int)
+ | | | Select Operator [SEL_67]
+ | | | outputColumnNames:["_col0","_col1"]
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_695]
+ | | | predicate:(hd_demo_sk is not null and hd_income_band_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_66]
+ | | | alias:hd1
+ | | | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 11 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_106]
+ | | key expressions:_col16 (type: int)
+ | | Map-reduce partition columns:_col16 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 2947432 Data size: 2534853786 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col5 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col17 (type: int), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col35 (type: int)
+ | | Merge Join Operator [MERGEJOIN_734]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col5","_col9","_col10","_col11","_col16","_col17","_col23","_col25","_col27","_col28","_col35"]
+ | | | Statistics:Num rows: 2947432 Data size: 2534853786 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 30 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_103]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col1 (type: int)
+ | | | Select Operator [SEL_65]
+ | | | outputColumnNames:["_col0","_col1"]
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_694]
+ | | | predicate:(hd_demo_sk is not null and hd_income_band_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_64]
+ | | | alias:hd1
+ | | | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 10 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_101]
+ | | key expressions:_col4 (type: int)
+ | | Map-reduce partition columns:_col4 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 2679484 Data size: 2304412483 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col5 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col16 (type: int), _col17 (type: int), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string)
+ | | Merge Join Operator [MERGEJOIN_733]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col7 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col4","_col5","_col9","_col10","_col11","_col16","_col17","_col23","_col25","_col27","_col28"]
+ | | | Statistics:Num rows: 2679484 Data size: 2304412483 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 29 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_98]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1150 Data size: 1356710 Basic stats: COMPLETE Column stats: NONE
+ | | | Select Operator [SEL_63]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 1150 Data size: 1356710 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_693]
+ | | | predicate:p_promo_sk is not null (type: boolean)
+ | | | Statistics:Num rows: 1150 Data size: 1356710 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_62]
+ | | | alias:promotion
+ | | | Statistics:Num rows: 2300 Data size: 2713420 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 9 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_96]
+ | | key expressions:_col7 (type: int)
+ | | Map-reduce partition columns:_col7 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 2435895 Data size: 2094920394 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col4 (type: int), _col5 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col16 (type: int), _col17 (type: int), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string)
+ | | Select Operator [SEL_59]
+ | | outputColumnNames:["_col1","_col10","_col11","_col16","_col17","_col23","_col25","_col27","_col28","_col4","_col5","_col7","_col9"]
+ | | Statistics:Num rows: 2435895 Data size: 2094920394 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_683]
+ | | predicate:(_col30 <> _col32) (type: boolean)
+ | | Statistics:Num rows: 2435895 Data size: 2094920394 Basic stats: COMPLETE Column stats: NONE
+ | | Merge Join Operator [MERGEJOIN_732]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col15 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col4","_col5","_col7","_col9","_col10","_col11","_col16","_col17","_col23","_col25","_col27","_col28","_col30","_col32"]
+ | | | Statistics:Num rows: 2435895 Data size: 2094920394 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 28 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_56]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col1 (type: string)
+ | | | Select Operator [SEL_17]
+ | | | outputColumnNames:["_col0","_col1"]
+ | | | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_692]
+ | | | predicate:cd_demo_sk is not null (type: boolean)
+ | | | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_16]
+ | | | alias:cd1
+ | | | Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 8 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_54]
+ | | key expressions:_col15 (type: int)
+ | | Map-reduce partition columns:_col15 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 2214450 Data size: 1904473045 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col4 (type: int), _col5 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col16 (type: int), _col17 (type: int), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col30 (type: string)
+ | | Merge Join Operator [MERGEJOIN_731]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col4","_col5","_col7","_col9","_col10","_col11","_col15","_col16","_col17","_col23","_col25","_col27","_col28","_col30"]
+ | | | Statistics:Num rows: 2214450 Data size: 1904473045 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 27 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_51]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col1 (type: string)
+ | | | Select Operator [SEL_15]
+ | | | outputColumnNames:["_col0","_col1"]
+ | | | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_691]
+ | | | predicate:cd_demo_sk is not null (type: boolean)
+ | | | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_14]
+ | | | alias:cd1
+ | | | Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 7 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_49]
+ | | key expressions:_col3 (type: int)
+ | | Map-reduce partition columns:_col3 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 2013137 Data size: 1731339095 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col4 (type: int), _col5 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col15 (type: int), _col16 (type: int), _col17 (type: int), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string)
+ | | Merge Join Operator [MERGEJOIN_730]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col6 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col3","_col4","_col5","_col7","_col9","_col10","_col11","_col15","_col16","_col17","_col23","_col25","_col27","_col28"]
+ | | | Statistics:Num rows: 2013137 Data size: 1731339095 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 26 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_46]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 213 Data size: 407034 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col1 (type: string), _col2 (type: string)
+ | | | Select Operator [SEL_13]
+ | | | outputColumnNames:["_col0","_col1","_col2"]
+ | | | Statistics:Num rows: 213 Data size: 407034 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_690]
+ | | | predicate:((s_store_sk is not null and s_store_name is not null) and s_zip is not null) (type: boolean)
+ | | | Statistics:Num rows: 213 Data size: 407034 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_12]
+ | | | alias:store
+ | | | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 6 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_44]
+ | | key expressions:_col6 (type: int)
+ | | Map-reduce partition columns:_col6 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1830125 Data size: 1573944598 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col15 (type: int), _col16 (type: int), _col17 (type: int), _col23 (type: int), _col25 (type: int)
+ | | Merge Join Operator [MERGEJOIN_729]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col18 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col3","_col4","_col5","_col6","_col7","_col9","_col10","_col11","_col15","_col16","_col17","_col23","_col25"]
+ | | | Statistics:Num rows: 1830125 Data size: 1573944598 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 25 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_41]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col1 (type: int)
+ | | | Select Operator [SEL_11]
+ | | | outputColumnNames:["_col0","_col1"]
+ | | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_689]
+ | | | predicate:d_date_sk is not null (type: boolean)
+ | | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_10]
+ | | | alias:d1
+ | | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 5 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_39]
+ | | key expressions:_col18 (type: int)
+ | | Map-reduce partition columns:_col18 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1663750 Data size: 1430858695 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col15 (type: int), _col16 (type: int), _col17 (type: int), _col23 (type: int)
+ | | Merge Join Operator [MERGEJOIN_728]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col19 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col3","_col4","_col5","_col6","_col7","_col9","_col10","_col11","_col15","_col16","_col17","_col18","_col23"]
+ | | | Statistics:Num rows: 1663750 Data size: 1430858695 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 24 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_36]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col1 (type: int)
+ | | | Select Operator [SEL_9]
+ | | | outputColumnNames:["_col0","_col1"]
+ | | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_688]
+ | | | predicate:d_date_sk is not null (type: boolean)
+ | | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_8]
+ | | | alias:d1
+ | | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 4 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_34]
+ | | key expressions:_col19 (type: int)
+ | | Map-reduce partition columns:_col19 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1512500 Data size: 1300780604 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col15 (type: int), _col16 (type: int), _col17 (type: int), _col18 (type: int)
+ | | Merge Join Operator [MERGEJOIN_727]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col3","_col4","_col5","_col6","_col7","_col9","_col10","_col11","_col15","_col16","_col17","_col18","_col19"]
+ | | | Statistics:Num rows: 1512500 Data size: 1300780604 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 23 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_31]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | | Select Operator [SEL_7]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_687]
+ | | | predicate:(d_date_sk is not null and (d_year = 2000)) (type: boolean)
+ | | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_6]
+ | | | alias:d1
+ | | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 3 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_29]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1375000 Data size: 1182527797 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col15 (type: int), _col16 (type: int), _col17 (type: int), _col18 (type: int), _col19 (type: int)
+ | | Merge Join Operator [MERGEJOIN_726]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col0","_col1","_col3","_col4","_col5","_col6","_col7","_col9","_col10","_col11","_col15","_col16","_col17","_col18","_col19"]
+ | | | Statistics:Num rows: 1375000 Data size: 1182527797 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 22 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_26]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1250000 Data size: 1075025247 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int)
+ | | | Select Operator [SEL_5]
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | | | Statistics:Num rows: 1250000 Data size: 1075025247 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_686]
+ | | | predicate:(((((c_customer_sk is not null and c_first_sales_date_sk is not null) and c_first_shipto_date_sk is not null) and c_current_cdemo_sk is not null) and c_current_hdemo_sk is not null) and c_current_addr_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1250000 Data size: 1075025247 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_4]
+ | | | alias:customer
+ | | | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 2 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_24]
+ | | key expressions:_col2 (type: int)
+ | | Map-reduce partition columns:_col2 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col0 (type: int), _col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2))
+ | | Merge Join Operator [MERGEJOIN_725]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col1 (type: int), _col8 (type: int)","1":"_col0 (type: int), _col1 (type: int)"}
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col9","_col10","_col11"]
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | |<-Map 1 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_19]
+ | | | key expressions:_col1 (type: int), _col8 (type: int)
+ | | | Map-reduce partition columns:_col1 (type: int), _col8 (type: int)
+ | | | sort order:++
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2))
+ | | | Select Operator [SEL_1]
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | Filter Operator [FIL_684]
+ | | | predicate:((((((((ss_item_sk is not null and ss_ticket_number is not null) and ss_customer_sk is not null) and ss_sold_date_sk is not null) and ss_store_sk is not null) and ss_cdemo_sk is not null) and ss_promo_sk is not null) and ss_hdemo_sk is not null) and ss_addr_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | TableScan [TS_0]
+ | | | alias:store_sales
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | |<-Map 21 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_21]
+ | | key expressions:_col0 (type: int), _col1 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ | | sort order:++
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Select Operator [SEL_3]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_685]
+ | | predicate:(sr_item_sk is not null and sr_ticket_number is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_2]
+ | | alias:store_returns
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Reducer 39 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_135]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Select Operator [SEL_94]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_701]
+ | predicate:(_col1 > (2 * _col2)) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Group By Operator [GBY_92]
+ | | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
+ | | keys:KEY._col0 (type: int)
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Reducer 38 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_91]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: decimal(17,2)), _col2 (type: decimal(19,2))
+ | Group By Operator [GBY_90]
+ | aggregations:["sum(_col1)","sum(_col2)"]
+ | keys:_col0 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Select Operator [SEL_88]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_740]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int), _col1 (type: int)","1":"_col0 (type: int), _col1 (type: int)"}
+ | | outputColumnNames:["_col0","_col2","_col5","_col6","_col7"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 37 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_84]
+ | | key expressions:_col0 (type: int), _col1 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ | | sort order:++
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col2 (type: decimal(7,2))
+ | | Select Operator [SEL_80]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_702]
+ | | predicate:(cs_item_sk is not null and cs_order_number is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_79]
+ | | alias:catalog_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 40 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_86]
+ | key expressions:_col0 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col2 (type: decimal(7,2)), _col3 (type: decimal(7,2)), _col4 (type: decimal(7,2))
+ | Select Operator [SEL_82]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_703]
+ | predicate:(cr_item_sk is not null and cr_order_number is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_81]
+ | alias:catalog_returns
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 58 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_287]
+ key expressions:_col1 (type: int), _col2 (type: string), _col3 (type: string)
+ Map-reduce partition columns:_col1 (type: int), _col2 (type: string), _col3 (type: string)
+ sort order:+++
+ Statistics:Num rows: 32210200 Data size: 32689487011 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col12 (type: int), _col15 (type: bigint), _col16 (type: decimal(17,2)), _col17 (type: decimal(17,2)), _col18 (type: decimal(17,2))
+ Select Operator [SEL_283]
+ outputColumnNames:["_col1","_col12","_col15","_col16","_col17","_col18","_col2","_col3"]
+ Statistics:Num rows: 32210200 Data size: 32689487011 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_282]
+ | aggregations:["count(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: string), KEY._col4 (type: string), KEY._col5 (type: string), KEY._col6 (type: string), KEY._col7 (type: string), KEY._col8 (type: string), KEY._col9 (type: string), KEY._col10 (type: string), KEY._col11 (type: string), KEY._col12 (type: string), KEY._col13 (type: int), KEY._col14 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18"]
+ | Statistics:Num rows: 32210200 Data size: 32689487011 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 57 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_281]
+ key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string), _col11 (type: string), _col12 (type: string), _col13 (type: int), _col14 (type: string)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: string), _col8 (type: string), _col9 (type: string), _col10 (type: string), _col11 (type: string), _col12 (type: string), _col13 (type: int), _col14 (type: string)
+ sort order:+++++++++++++++
+ Statistics:Num rows: 64420401 Data size: 65378975037 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col15 (type: bigint), _col16 (type: decimal(17,2)), _col17 (type: decimal(17,2)), _col18 (type: decimal(17,2))
+ Group By Operator [GBY_280]
+ aggregations:["count()","sum(_col9)","sum(_col10)","sum(_col11)"]
+ keys:_col21 (type: int), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col39 (type: string), _col40 (type: string), _col41 (type: string), _col42 (type: string), _col44 (type: string), _col45 (type: string), _col46 (type: string), _col47 (type: string), _col50 (type: int), _col53 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18"]
+ Statistics:Num rows: 64420401 Data size: 65378975037 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_279]
+ outputColumnNames:["_col21","_col23","_col25","_col27","_col28","_col39","_col40","_col41","_col42","_col44","_col45","_col46","_col47","_col50","_col53","_col9","_col10","_col11"]
+ Statistics:Num rows: 64420401 Data size: 65378975037 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_758]
+ | condition map:[{"":"Inner Join 0 to 1"},{"":"Inner Join 0 to 2"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)","2":"_col0 (type: int)"}
+ | outputColumnNames:["_col9","_col10","_col11","_col23","_col25","_col27","_col28","_col39","_col40","_col41","_col42","_col44","_col45","_col46","_col47","_col50","_col53"]
+ | Statistics:Num rows: 64420401 Data size: 65378975037 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 74 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_275]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 28875 Data size: 41472528 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: string)
+ | Select Operator [SEL_220]
+ | outputColumnNames:["_col0","_col3"]
+ | Statistics:Num rows: 28875 Data size: 41472528 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_721]
+ | predicate:((((i_color) IN ('maroon', 'burnished', 'dim', 'steel', 'navajo', 'chocolate') and i_current_price BETWEEN 35 AND 45) and i_current_price BETWEEN 36 AND 50) and i_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 28875 Data size: 41472528 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_218]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 56 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_273]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 29282000 Data size: 29717715282 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col39 (type: string), _col40 (type: string), _col41 (type: string), _col42 (type: string), _col44 (type: string), _col45 (type: string), _col46 (type: string), _col47 (type: string)
+ | Merge Join Operator [MERGEJOIN_756]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col37 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col9","_col10","_col11","_col23","_col25","_col27","_col28","_col39","_col40","_col41","_col42","_col44","_col45","_col46","_col47"]
+ | | Statistics:Num rows: 29282000 Data size: 29717715282 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 73 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_270]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_217]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_720]
+ | | predicate:ib_income_band_sk is not null (type: boolean)
+ | | Statistics:Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_216]
+ | | alias:ib1
+ | | Statistics:Num rows: 20 Data size: 240 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 55 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_268]
+ | key expressions:_col37 (type: int)
+ | Map-reduce partition columns:_col37 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 26620000 Data size: 27016104217 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col39 (type: string), _col40 (type: string), _col41 (type: string), _col42 (type: string), _col44 (type: string), _col45 (type: string), _col46 (type: string), _col47 (type: string)
+ | Merge Join Operator [MERGEJOIN_755]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col35 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col9","_col10","_col11","_col23","_col25","_col27","_col28","_col37","_col39","_col40","_col41","_col42","_col44","_col45","_col46","_col47"]
+ | | Statistics:Num rows: 26620000 Data size: 27016104217 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 72 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_265]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_215]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_719]
+ | | predicate:ib_income_band_sk is not null (type: boolean)
+ | | Statistics:Num rows: 10 Data size: 120 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_214]
+ | | alias:ib1
+ | | Statistics:Num rows: 20 Data size: 240 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 54 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_263]
+ | key expressions:_col35 (type: int)
+ | Map-reduce partition columns:_col35 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 24200000 Data size: 24560094211 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col37 (type: int), _col39 (type: string), _col40 (type: string), _col41 (type: string), _col42 (type: string), _col44 (type: string), _col45 (type: string), _col46 (type: string), _col47 (type: string)
+ | Merge Join Operator [MERGEJOIN_754]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col17 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col9","_col10","_col11","_col23","_col25","_col27","_col28","_col35","_col37","_col39","_col40","_col41","_col42","_col44","_col45","_col46","_col47"]
+ | | Statistics:Num rows: 24200000 Data size: 24560094211 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 71 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_260]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ | | Select Operator [SEL_213]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_718]
+ | | predicate:ca_address_sk is not null (type: boolean)
+ | | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_212]
+ | | alias:ad1
+ | | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 53 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_258]
+ | key expressions:_col17 (type: int)
+ | Map-reduce partition columns:_col17 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col35 (type: int), _col37 (type: int), _col39 (type: string), _col40 (type: string), _col41 (type: string), _col42 (type: string)
+ | Merge Join Operator [MERGEJOIN_753]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col5 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col9","_col10","_col11","_col17","_col23","_col25","_col27","_col28","_col35","_col37","_col39","_col40","_col41","_col42"]
+ | | Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 70 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_255]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ | | Select Operator [SEL_211]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_717]
+ | | predicate:ca_address_sk is not null (type: boolean)
+ | | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_210]
+ | | alias:ad1
+ | | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 52 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_253]
+ | key expressions:_col5 (type: int)
+ | Map-reduce partition columns:_col5 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 3242175 Data size: 2788339225 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col17 (type: int), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col35 (type: int), _col37 (type: int)
+ | Merge Join Operator [MERGEJOIN_752]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col16 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col5","_col9","_col10","_col11","_col17","_col23","_col25","_col27","_col28","_col35","_col37"]
+ | | Statistics:Num rows: 3242175 Data size: 2788339225 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 69 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_250]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int)
+ | | Select Operator [SEL_209]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_716]
+ | | predicate:(hd_demo_sk is not null and hd_income_band_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_208]
+ | | alias:hd1
+ | | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 51 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_248]
+ | key expressions:_col16 (type: int)
+ | Map-reduce partition columns:_col16 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 2947432 Data size: 2534853786 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col5 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col17 (type: int), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col35 (type: int)
+ | Merge Join Operator [MERGEJOIN_751]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col5","_col9","_col10","_col11","_col16","_col17","_col23","_col25","_col27","_col28","_col35"]
+ | | Statistics:Num rows: 2947432 Data size: 2534853786 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 68 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_245]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int)
+ | | Select Operator [SEL_207]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_715]
+ | | predicate:(hd_demo_sk is not null and hd_income_band_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_206]
+ | | alias:hd1
+ | | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 50 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_243]
+ | key expressions:_col4 (type: int)
+ | Map-reduce partition columns:_col4 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 2679484 Data size: 2304412483 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col5 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col16 (type: int), _col17 (type: int), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string)
+ | Merge Join Operator [MERGEJOIN_750]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col7 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col4","_col5","_col9","_col10","_col11","_col16","_col17","_col23","_col25","_col27","_col28"]
+ | | Statistics:Num rows: 2679484 Data size: 2304412483 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 67 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_240]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1150 Data size: 1356710 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_205]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 1150 Data size: 1356710 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_714]
+ | | predicate:p_promo_sk is not null (type: boolean)
+ | | Statistics:Num rows: 1150 Data size: 1356710 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_204]
+ | | alias:promotion
+ | | Statistics:Num rows: 2300 Data size: 2713420 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 49 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_238]
+ | key expressions:_col7 (type: int)
+ | Map-reduce partition columns:_col7 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 2435895 Data size: 2094920394 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col4 (type: int), _col5 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col16 (type: int), _col17 (type: int), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string)
+ | Select Operator [SEL_201]
+ | outputColumnNames:["_col1","_col10","_col11","_col16","_col17","_col23","_col25","_col27","_col28","_col4","_col5","_col7","_col9"]
+ | Statistics:Num rows: 2435895 Data size: 2094920394 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_704]
+ | predicate:(_col30 <> _col32) (type: boolean)
+ | Statistics:Num rows: 2435895 Data size: 2094920394 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_749]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col15 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col4","_col5","_col7","_col9","_col10","_col11","_col16","_col17","_col23","_col25","_col27","_col28","_col30","_col32"]
+ | | Statistics:Num rows: 2435895 Data size: 2094920394 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 66 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_198]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string)
+ | | Select Operator [SEL_159]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_713]
+ | | predicate:cd_demo_sk is not null (type: boolean)
+ | | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_158]
+ | | alias:cd1
+ | | Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 48 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_196]
+ | key expressions:_col15 (type: int)
+ | Map-reduce partition columns:_col15 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 2214450 Data size: 1904473045 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col4 (type: int), _col5 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col16 (type: int), _col17 (type: int), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string), _col30 (type: string)
+ | Merge Join Operator [MERGEJOIN_748]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col4","_col5","_col7","_col9","_col10","_col11","_col15","_col16","_col17","_col23","_col25","_col27","_col28","_col30"]
+ | | Statistics:Num rows: 2214450 Data size: 1904473045 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 65 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_193]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string)
+ | | Select Operator [SEL_157]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_712]
+ | | predicate:cd_demo_sk is not null (type: boolean)
+ | | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_156]
+ | | alias:cd1
+ | | Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 47 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_191]
+ | key expressions:_col3 (type: int)
+ | Map-reduce partition columns:_col3 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 2013137 Data size: 1731339095 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col4 (type: int), _col5 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col15 (type: int), _col16 (type: int), _col17 (type: int), _col23 (type: int), _col25 (type: int), _col27 (type: string), _col28 (type: string)
+ | Merge Join Operator [MERGEJOIN_747]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col6 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col3","_col4","_col5","_col7","_col9","_col10","_col11","_col15","_col16","_col17","_col23","_col25","_col27","_col28"]
+ | | Statistics:Num rows: 2013137 Data size: 1731339095 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 64 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_188]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 213 Data size: 407034 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string), _col2 (type: string)
+ | | Select Operator [SEL_155]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 213 Data size: 407034 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_711]
+ | | predicate:((s_store_sk is not null and s_store_name is not null) and s_zip is not null) (type: boolean)
+ | | Statistics:Num rows: 213 Data size: 407034 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_154]
+ | | alias:store
+ | | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 46 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_186]
+ | key expressions:_col6 (type: int)
+ | Map-reduce partition columns:_col6 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1830125 Data size: 1573944598 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col15 (type: int), _col16 (type: int), _col17 (type: int), _col23 (type: int), _col25 (type: int)
+ | Merge Join Operator [MERGEJOIN_746]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col18 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col3","_col4","_col5","_col6","_col7","_col9","_col10","_col11","_col15","_col16","_col17","_col23","_col25"]
+ | | Statistics:Num rows: 1830125 Data size: 1573944598 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 63 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_183]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int)
+ | | Select Operator [SEL_153]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_710]
+ | | predicate:d_date_sk is not null (type: boolean)
+ | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_152]
+ | | alias:d1
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 45 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_181]
+ | key expressions:_col18 (type: int)
+ | Map-reduce partition columns:_col18 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1663750 Data size: 1430858695 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col15 (type: int), _col16 (type: int), _col17 (type: int), _col23 (type: int)
+ | Merge Join Operator [MERGEJOIN_745]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col19 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col3","_col4","_col5","_col6","_col7","_col9","_col10","_col11","_col15","_col16","_col17","_col18","_col23"]
+ | | Statistics:Num rows: 1663750 Data size: 1430858695 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 62 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_178]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int)
+ | | Select Operator [SEL_151]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_709]
+ | | predicate:d_date_sk is not null (type: boolean)
+ | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_150]
+ | | alias:d1
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 44 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_176]
+ | key expressions:_col19 (type: int)
+ | Map-reduce partition columns:_col19 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1512500 Data size: 1300780604 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col15 (type: int), _col16 (type: int), _col17 (type: int), _col18 (type: int)
+ | Merge Join Operator [MERGEJOIN_744]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col3","_col4","_col5","_col6","_col7","_col9","_col10","_col11","_col15","_col16","_col17","_col18","_col19"]
+ | | Statistics:Num rows: 1512500 Data size: 1300780604 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 61 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_173]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_149]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_708]
+ | | predicate:(d_date_sk is not null and (d_year = 2001)) (type: boolean)
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_148]
+ | | alias:d1
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 43 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_171]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1375000 Data size: 1182527797 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2)), _col15 (type: int), _col16 (type: int), _col17 (type: int), _col18 (type: int), _col19 (type: int)
+ | Merge Join Operator [MERGEJOIN_743]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col0","_col1","_col3","_col4","_col5","_col6","_col7","_col9","_col10","_col11","_col15","_col16","_col17","_col18","_col19"]
+ | | Statistics:Num rows: 1375000 Data size: 1182527797 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 60 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_168]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1250000 Data size: 1075025247 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int)
+ | | Select Operator [SEL_147]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | | Statistics:Num rows: 1250000 Data size: 1075025247 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_707]
+ | | predicate:(((((c_customer_sk is not null and c_first_sales_date_sk is not null) and c_first_shipto_date_sk is not null) and c_current_cdemo_sk is not null) and c_current_hdemo_sk is not null) and c_current_addr_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1250000 Data size: 1075025247 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_146]
+ | | alias:customer
+ | | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 42 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_166]
+ | key expressions:_col2 (type: int)
+ | Map-reduce partition columns:_col2 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2))
+ | Merge Join Operator [MERGEJOIN_742]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int), _col8 (type: int)","1":"_col0 (type: int), _col1 (type: int)"}
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col9","_col10","_col11"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 41 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_161]
+ | | key expressions:_col1 (type: int), _col8 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int), _col8 (type: int)
+ | | sort order:++
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col11 (type: decimal(7,2))
+ | | Select Operator [SEL_143]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_705]
+ | | predicate:((((((((ss_item_sk is not null and ss_ticket_number is not null) and ss_customer_sk is not null) and ss_sold_date_sk is not null) and ss_store_sk is not null) and ss_cdemo_sk is not null) and ss_promo_sk is not null) and ss_hdemo_sk is not null) and ss_addr_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_142]
+ | | alias:store_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 59 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_163]
+ | key expressions:_col0 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Select Operator [SEL_145]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_706]
+ | predicate:(sr_item_sk is not null and sr_ticket_number is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_144]
+ | alias:store_returns
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 77 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_277]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Select Operator [SEL_236]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_722]
+ predicate:(_col1 > (2 * _col2)) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Group By Operator [GBY_234]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
+ | keys:KEY._col0 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 76 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_233]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: decimal(17,2)), _col2 (type: decimal(19,2))
+ Group By Operator [GBY_232]
+ aggregations:["sum(_col1)","sum(_col2)"]
+ keys:_col0 (type: int)
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Select Operator [SEL_230]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Merge Join Operator [MERGEJOIN_757]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int), _col1 (type: int)","1":"_col0 (type: int), _col1 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col5","_col6","_col7"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 75 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_226]
+ | key expressions:_col0 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col2 (type: decimal(7,2))
+ | Select Operator [SEL_222]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_723]
+ | predicate:(cs_item_sk is not null and cs_order_number is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_221]
+ | alias:catalog_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 78 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_228]
+ key expressions:_col0 (type: int), _col1 (type: int)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ sort order:++
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col2 (type: decimal(7,2)), _col3 (type: decimal(7,2)), _col4 (type: decimal(7,2))
+ Select Operator [SEL_224]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_724]
+ predicate:(cr_item_sk is not null and cr_order_number is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_223]
+ alias:catalog_returns
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query65.q.out b/ql/src/test/results/clientpositive/perf/query65.q.out
new file mode 100644
index 0000000..418d18e
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query65.q.out
@@ -0,0 +1,315 @@
+Warning: Shuffle Join MERGEJOIN[77][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product
+Warning: Shuffle Join MERGEJOIN[80][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Reducer 3' is a cross product
+PREHOOK: query: explain select
+ s_store_name,
+ i_item_desc,
+ sc.revenue,
+ i_current_price,
+ i_wholesale_cost,
+ i_brand
+from
+ store,
+ item,
+ (select
+ ss_store_sk, avg(revenue) as ave
+ from
+ (select
+ ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue
+ from
+ store_sales, date_dim
+ where
+ ss_sold_date_sk = d_date_sk
+ and d_month_seq between 1212 and 1212 + 11
+ group by ss_store_sk , ss_item_sk) sa
+ group by ss_store_sk) sb,
+ (select
+ ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue
+ from
+ store_sales, date_dim
+ where
+ ss_sold_date_sk = d_date_sk
+ and d_month_seq between 1212 and 1212 + 11
+ group by ss_store_sk , ss_item_sk) sc
+where
+ sb.ss_store_sk = sc.ss_store_sk
+ and sc.revenue <= 0.1 * sb.ave
+ and s_store_sk = sc.ss_store_sk
+ and i_item_sk = sc.ss_item_sk
+order by s_store_name , i_item_desc
+limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select
+ s_store_name,
+ i_item_desc,
+ sc.revenue,
+ i_current_price,
+ i_wholesale_cost,
+ i_brand
+from
+ store,
+ item,
+ (select
+ ss_store_sk, avg(revenue) as ave
+ from
+ (select
+ ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue
+ from
+ store_sales, date_dim
+ where
+ ss_sold_date_sk = d_date_sk
+ and d_month_seq between 1212 and 1212 + 11
+ group by ss_store_sk , ss_item_sk) sa
+ group by ss_store_sk) sb,
+ (select
+ ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue
+ from
+ store_sales, date_dim
+ where
+ ss_sold_date_sk = d_date_sk
+ and d_month_seq between 1212 and 1212 + 11
+ group by ss_store_sk , ss_item_sk) sc
+where
+ sb.ss_store_sk = sc.ss_store_sk
+ and sc.revenue <= 0.1 * sb.ave
+ and s_store_sk = sc.ss_store_sk
+ and i_item_sk = sc.ss_item_sk
+order by s_store_name , i_item_desc
+limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Reducer 9 (SIMPLE_EDGE)
+Reducer 13 <- Map 12 (SIMPLE_EDGE), Map 15 (SIMPLE_EDGE)
+Reducer 14 <- Reducer 13 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 10 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 14 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 8 <- Map 11 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 5
+ File Output Operator [FS_57]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_56]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_55]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 102487 Data size: 147199836 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_54]
+ key expressions:_col0 (type: string), _col1 (type: string)
+ sort order:++
+ Statistics:Num rows: 102487 Data size: 147199836 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(17,2)), _col3 (type: decimal(7,2)), _col4 (type: decimal(7,2)), _col5 (type: string)
+ Select Operator [SEL_53]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 102487 Data size: 147199836 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_70]
+ predicate:(_col11 <= CAST( (0.1 * UDFToDouble(_col8)) AS decimal(30,15))) (type: boolean)
+ Statistics:Num rows: 102487 Data size: 147199836 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_81]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col7 (type: int), _col0 (type: int), _col2 (type: int)","1":"_col0 (type: int), _col0 (type: int), _col1 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col4","_col5","_col6","_col8","_col11"]
+ | Statistics:Num rows: 307461 Data size: 441599510 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_50]
+ | key expressions:_col0 (type: int), _col0 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col0 (type: int), _col1 (type: int)
+ | sort order:+++
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: decimal(17,2))
+ | Select Operator [SEL_38]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_37]
+ | | aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type: int), KEY._col1 (type: int)
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_36]
+ | key expressions:_col0 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: decimal(17,2))
+ | Group By Operator [GBY_35]
+ | aggregations:["sum(_col3)"]
+ | keys:_col1 (type: int), _col2 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_79]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2","_col3"]
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 12 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_30]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: decimal(7,2))
+ | | Select Operator [SEL_25]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_75]
+ | | predicate:((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_item_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_24]
+ | | alias:store_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_32]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_28]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_76]
+ | predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_26]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_48]
+ key expressions:_col7 (type: int), _col0 (type: int), _col2 (type: int)
+ Map-reduce partition columns:_col7 (type: int), _col0 (type: int), _col2 (type: int)
+ sort order:+++
+ Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col3 (type: string), _col4 (type: decimal(7,2)), _col5 (type: decimal(7,2)), _col6 (type: string), _col8 (type: decimal(21,6))
+ Merge Join Operator [MERGEJOIN_80]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+ | Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_45]
+ | sort order:
+ | Statistics:Num rows: 5022 Data size: 5619674 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: decimal(21,6))
+ | Group By Operator [GBY_22]
+ | | aggregations:["avg(VALUE._col0)"]
+ | | keys:KEY._col0 (type: int)
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 5022 Data size: 5619674 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_21]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: struct)
+ | Group By Operator [GBY_20]
+ | aggregations:["avg(_col2)"]
+ | keys:_col1 (type: int)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_18]
+ | outputColumnNames:["_col1","_col2"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_17]
+ | | aggregations:["sum(VALUE._col0)"]
+ | | keys:KEY._col0 (type: int), KEY._col1 (type: int)
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 8 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_16]
+ | key expressions:_col0 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: decimal(17,2))
+ | Group By Operator [GBY_15]
+ | aggregations:["sum(_col3)"]
+ | keys:_col1 (type: int), _col2 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_78]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2","_col3"]
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 11 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_12]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_8]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_74]
+ | | predicate:(d_month_seq BETWEEN 1212 AND 1223 and d_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_6]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 7 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_10]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: decimal(7,2))
+ | Select Operator [SEL_5]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_73]
+ | predicate:(ss_sold_date_sk is not null and ss_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_4]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_44]
+ sort order:
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col1 (type: string), _col2 (type: int), _col3 (type: string), _col4 (type: decimal(7,2)), _col5 (type: decimal(7,2)), _col6 (type: string)
+ Merge Join Operator [MERGEJOIN_77]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_41]
+ | sort order:
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: string)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_71]
+ | predicate:s_store_sk is not null (type: boolean)
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_42]
+ sort order:
+ Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col1 (type: string), _col2 (type: decimal(7,2)), _col3 (type: decimal(7,2)), _col4 (type: string)
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_72]
+ predicate:i_item_sk is not null (type: boolean)
+ Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:item
+ Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query66.q.out b/ql/src/test/results/clientpositive/perf/query66.q.out
new file mode 100644
index 0000000..c0add27
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query66.q.out
@@ -0,0 +1,796 @@
+PREHOOK: query: explain
+select
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,ship_carriers
+ ,year
+ ,sum(jan_sales) as jan_sales
+ ,sum(feb_sales) as feb_sales
+ ,sum(mar_sales) as mar_sales
+ ,sum(apr_sales) as apr_sales
+ ,sum(may_sales) as may_sales
+ ,sum(jun_sales) as jun_sales
+ ,sum(jul_sales) as jul_sales
+ ,sum(aug_sales) as aug_sales
+ ,sum(sep_sales) as sep_sales
+ ,sum(oct_sales) as oct_sales
+ ,sum(nov_sales) as nov_sales
+ ,sum(dec_sales) as dec_sales
+ ,sum(jan_sales/w_warehouse_sq_ft) as jan_sales_per_sq_foot
+ ,sum(feb_sales/w_warehouse_sq_ft) as feb_sales_per_sq_foot
+ ,sum(mar_sales/w_warehouse_sq_ft) as mar_sales_per_sq_foot
+ ,sum(apr_sales/w_warehouse_sq_ft) as apr_sales_per_sq_foot
+ ,sum(may_sales/w_warehouse_sq_ft) as may_sales_per_sq_foot
+ ,sum(jun_sales/w_warehouse_sq_ft) as jun_sales_per_sq_foot
+ ,sum(jul_sales/w_warehouse_sq_ft) as jul_sales_per_sq_foot
+ ,sum(aug_sales/w_warehouse_sq_ft) as aug_sales_per_sq_foot
+ ,sum(sep_sales/w_warehouse_sq_ft) as sep_sales_per_sq_foot
+ ,sum(oct_sales/w_warehouse_sq_ft) as oct_sales_per_sq_foot
+ ,sum(nov_sales/w_warehouse_sq_ft) as nov_sales_per_sq_foot
+ ,sum(dec_sales/w_warehouse_sq_ft) as dec_sales_per_sq_foot
+ ,sum(jan_net) as jan_net
+ ,sum(feb_net) as feb_net
+ ,sum(mar_net) as mar_net
+ ,sum(apr_net) as apr_net
+ ,sum(may_net) as may_net
+ ,sum(jun_net) as jun_net
+ ,sum(jul_net) as jul_net
+ ,sum(aug_net) as aug_net
+ ,sum(sep_net) as sep_net
+ ,sum(oct_net) as oct_net
+ ,sum(nov_net) as nov_net
+ ,sum(dec_net) as dec_net
+ from (
+ select
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,concat('DIAMOND', ',', 'AIRBORNE') as ship_carriers
+ ,d_year as year
+ ,sum(case when d_moy = 1
+ then ws_sales_price* ws_quantity else 0 end) as jan_sales
+ ,sum(case when d_moy = 2
+ then ws_sales_price* ws_quantity else 0 end) as feb_sales
+ ,sum(case when d_moy = 3
+ then ws_sales_price* ws_quantity else 0 end) as mar_sales
+ ,sum(case when d_moy = 4
+ then ws_sales_price* ws_quantity else 0 end) as apr_sales
+ ,sum(case when d_moy = 5
+ then ws_sales_price* ws_quantity else 0 end) as may_sales
+ ,sum(case when d_moy = 6
+ then ws_sales_price* ws_quantity else 0 end) as jun_sales
+ ,sum(case when d_moy = 7
+ then ws_sales_price* ws_quantity else 0 end) as jul_sales
+ ,sum(case when d_moy = 8
+ then ws_sales_price* ws_quantity else 0 end) as aug_sales
+ ,sum(case when d_moy = 9
+ then ws_sales_price* ws_quantity else 0 end) as sep_sales
+ ,sum(case when d_moy = 10
+ then ws_sales_price* ws_quantity else 0 end) as oct_sales
+ ,sum(case when d_moy = 11
+ then ws_sales_price* ws_quantity else 0 end) as nov_sales
+ ,sum(case when d_moy = 12
+ then ws_sales_price* ws_quantity else 0 end) as dec_sales
+ ,sum(case when d_moy = 1
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as jan_net
+ ,sum(case when d_moy = 2
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as feb_net
+ ,sum(case when d_moy = 3
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as mar_net
+ ,sum(case when d_moy = 4
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as apr_net
+ ,sum(case when d_moy = 5
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as may_net
+ ,sum(case when d_moy = 6
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as jun_net
+ ,sum(case when d_moy = 7
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as jul_net
+ ,sum(case when d_moy = 8
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as aug_net
+ ,sum(case when d_moy = 9
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as sep_net
+ ,sum(case when d_moy = 10
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as oct_net
+ ,sum(case when d_moy = 11
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as nov_net
+ ,sum(case when d_moy = 12
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as dec_net
+ from
+ web_sales
+ ,warehouse
+ ,date_dim
+ ,time_dim
+ ,ship_mode
+ where
+ web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk
+ and web_sales.ws_sold_date_sk = date_dim.d_date_sk
+ and web_sales.ws_sold_time_sk = time_dim.t_time_sk
+ and web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk
+ and d_year = 2002
+ and t_time between 49530 and 49530+28800
+ and sm_carrier in ('DIAMOND','AIRBORNE')
+ group by
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,d_year
+ union all
+ select
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,concat('DIAMOND', ',', 'AIRBORNE') as ship_carriers
+ ,d_year as year
+ ,sum(case when d_moy = 1
+ then cs_ext_sales_price* cs_quantity else 0 end) as jan_sales
+ ,sum(case when d_moy = 2
+ then cs_ext_sales_price* cs_quantity else 0 end) as feb_sales
+ ,sum(case when d_moy = 3
+ then cs_ext_sales_price* cs_quantity else 0 end) as mar_sales
+ ,sum(case when d_moy = 4
+ then cs_ext_sales_price* cs_quantity else 0 end) as apr_sales
+ ,sum(case when d_moy = 5
+ then cs_ext_sales_price* cs_quantity else 0 end) as may_sales
+ ,sum(case when d_moy = 6
+ then cs_ext_sales_price* cs_quantity else 0 end) as jun_sales
+ ,sum(case when d_moy = 7
+ then cs_ext_sales_price* cs_quantity else 0 end) as jul_sales
+ ,sum(case when d_moy = 8
+ then cs_ext_sales_price* cs_quantity else 0 end) as aug_sales
+ ,sum(case when d_moy = 9
+ then cs_ext_sales_price* cs_quantity else 0 end) as sep_sales
+ ,sum(case when d_moy = 10
+ then cs_ext_sales_price* cs_quantity else 0 end) as oct_sales
+ ,sum(case when d_moy = 11
+ then cs_ext_sales_price* cs_quantity else 0 end) as nov_sales
+ ,sum(case when d_moy = 12
+ then cs_ext_sales_price* cs_quantity else 0 end) as dec_sales
+ ,sum(case when d_moy = 1
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as jan_net
+ ,sum(case when d_moy = 2
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as feb_net
+ ,sum(case when d_moy = 3
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as mar_net
+ ,sum(case when d_moy = 4
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as apr_net
+ ,sum(case when d_moy = 5
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as may_net
+ ,sum(case when d_moy = 6
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as jun_net
+ ,sum(case when d_moy = 7
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as jul_net
+ ,sum(case when d_moy = 8
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as aug_net
+ ,sum(case when d_moy = 9
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as sep_net
+ ,sum(case when d_moy = 10
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as oct_net
+ ,sum(case when d_moy = 11
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as nov_net
+ ,sum(case when d_moy = 12
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as dec_net
+ from
+ catalog_sales
+ ,warehouse
+ ,date_dim
+ ,time_dim
+ ,ship_mode
+ where
+ catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk
+ and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk
+ and catalog_sales.cs_sold_time_sk = time_dim.t_time_sk
+ and catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk
+ and d_year = 2002
+ and t_time between 49530 AND 49530+28800
+ and sm_carrier in ('DIAMOND','AIRBORNE')
+ group by
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,d_year
+ ) x
+ group by
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,ship_carriers
+ ,year
+ order by w_warehouse_name
+ limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,ship_carriers
+ ,year
+ ,sum(jan_sales) as jan_sales
+ ,sum(feb_sales) as feb_sales
+ ,sum(mar_sales) as mar_sales
+ ,sum(apr_sales) as apr_sales
+ ,sum(may_sales) as may_sales
+ ,sum(jun_sales) as jun_sales
+ ,sum(jul_sales) as jul_sales
+ ,sum(aug_sales) as aug_sales
+ ,sum(sep_sales) as sep_sales
+ ,sum(oct_sales) as oct_sales
+ ,sum(nov_sales) as nov_sales
+ ,sum(dec_sales) as dec_sales
+ ,sum(jan_sales/w_warehouse_sq_ft) as jan_sales_per_sq_foot
+ ,sum(feb_sales/w_warehouse_sq_ft) as feb_sales_per_sq_foot
+ ,sum(mar_sales/w_warehouse_sq_ft) as mar_sales_per_sq_foot
+ ,sum(apr_sales/w_warehouse_sq_ft) as apr_sales_per_sq_foot
+ ,sum(may_sales/w_warehouse_sq_ft) as may_sales_per_sq_foot
+ ,sum(jun_sales/w_warehouse_sq_ft) as jun_sales_per_sq_foot
+ ,sum(jul_sales/w_warehouse_sq_ft) as jul_sales_per_sq_foot
+ ,sum(aug_sales/w_warehouse_sq_ft) as aug_sales_per_sq_foot
+ ,sum(sep_sales/w_warehouse_sq_ft) as sep_sales_per_sq_foot
+ ,sum(oct_sales/w_warehouse_sq_ft) as oct_sales_per_sq_foot
+ ,sum(nov_sales/w_warehouse_sq_ft) as nov_sales_per_sq_foot
+ ,sum(dec_sales/w_warehouse_sq_ft) as dec_sales_per_sq_foot
+ ,sum(jan_net) as jan_net
+ ,sum(feb_net) as feb_net
+ ,sum(mar_net) as mar_net
+ ,sum(apr_net) as apr_net
+ ,sum(may_net) as may_net
+ ,sum(jun_net) as jun_net
+ ,sum(jul_net) as jul_net
+ ,sum(aug_net) as aug_net
+ ,sum(sep_net) as sep_net
+ ,sum(oct_net) as oct_net
+ ,sum(nov_net) as nov_net
+ ,sum(dec_net) as dec_net
+ from (
+ select
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,concat('DIAMOND', ',', 'AIRBORNE') as ship_carriers
+ ,d_year as year
+ ,sum(case when d_moy = 1
+ then ws_sales_price* ws_quantity else 0 end) as jan_sales
+ ,sum(case when d_moy = 2
+ then ws_sales_price* ws_quantity else 0 end) as feb_sales
+ ,sum(case when d_moy = 3
+ then ws_sales_price* ws_quantity else 0 end) as mar_sales
+ ,sum(case when d_moy = 4
+ then ws_sales_price* ws_quantity else 0 end) as apr_sales
+ ,sum(case when d_moy = 5
+ then ws_sales_price* ws_quantity else 0 end) as may_sales
+ ,sum(case when d_moy = 6
+ then ws_sales_price* ws_quantity else 0 end) as jun_sales
+ ,sum(case when d_moy = 7
+ then ws_sales_price* ws_quantity else 0 end) as jul_sales
+ ,sum(case when d_moy = 8
+ then ws_sales_price* ws_quantity else 0 end) as aug_sales
+ ,sum(case when d_moy = 9
+ then ws_sales_price* ws_quantity else 0 end) as sep_sales
+ ,sum(case when d_moy = 10
+ then ws_sales_price* ws_quantity else 0 end) as oct_sales
+ ,sum(case when d_moy = 11
+ then ws_sales_price* ws_quantity else 0 end) as nov_sales
+ ,sum(case when d_moy = 12
+ then ws_sales_price* ws_quantity else 0 end) as dec_sales
+ ,sum(case when d_moy = 1
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as jan_net
+ ,sum(case when d_moy = 2
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as feb_net
+ ,sum(case when d_moy = 3
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as mar_net
+ ,sum(case when d_moy = 4
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as apr_net
+ ,sum(case when d_moy = 5
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as may_net
+ ,sum(case when d_moy = 6
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as jun_net
+ ,sum(case when d_moy = 7
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as jul_net
+ ,sum(case when d_moy = 8
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as aug_net
+ ,sum(case when d_moy = 9
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as sep_net
+ ,sum(case when d_moy = 10
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as oct_net
+ ,sum(case when d_moy = 11
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as nov_net
+ ,sum(case when d_moy = 12
+ then ws_net_paid_inc_tax * ws_quantity else 0 end) as dec_net
+ from
+ web_sales
+ ,warehouse
+ ,date_dim
+ ,time_dim
+ ,ship_mode
+ where
+ web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk
+ and web_sales.ws_sold_date_sk = date_dim.d_date_sk
+ and web_sales.ws_sold_time_sk = time_dim.t_time_sk
+ and web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk
+ and d_year = 2002
+ and t_time between 49530 and 49530+28800
+ and sm_carrier in ('DIAMOND','AIRBORNE')
+ group by
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,d_year
+ union all
+ select
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,concat('DIAMOND', ',', 'AIRBORNE') as ship_carriers
+ ,d_year as year
+ ,sum(case when d_moy = 1
+ then cs_ext_sales_price* cs_quantity else 0 end) as jan_sales
+ ,sum(case when d_moy = 2
+ then cs_ext_sales_price* cs_quantity else 0 end) as feb_sales
+ ,sum(case when d_moy = 3
+ then cs_ext_sales_price* cs_quantity else 0 end) as mar_sales
+ ,sum(case when d_moy = 4
+ then cs_ext_sales_price* cs_quantity else 0 end) as apr_sales
+ ,sum(case when d_moy = 5
+ then cs_ext_sales_price* cs_quantity else 0 end) as may_sales
+ ,sum(case when d_moy = 6
+ then cs_ext_sales_price* cs_quantity else 0 end) as jun_sales
+ ,sum(case when d_moy = 7
+ then cs_ext_sales_price* cs_quantity else 0 end) as jul_sales
+ ,sum(case when d_moy = 8
+ then cs_ext_sales_price* cs_quantity else 0 end) as aug_sales
+ ,sum(case when d_moy = 9
+ then cs_ext_sales_price* cs_quantity else 0 end) as sep_sales
+ ,sum(case when d_moy = 10
+ then cs_ext_sales_price* cs_quantity else 0 end) as oct_sales
+ ,sum(case when d_moy = 11
+ then cs_ext_sales_price* cs_quantity else 0 end) as nov_sales
+ ,sum(case when d_moy = 12
+ then cs_ext_sales_price* cs_quantity else 0 end) as dec_sales
+ ,sum(case when d_moy = 1
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as jan_net
+ ,sum(case when d_moy = 2
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as feb_net
+ ,sum(case when d_moy = 3
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as mar_net
+ ,sum(case when d_moy = 4
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as apr_net
+ ,sum(case when d_moy = 5
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as may_net
+ ,sum(case when d_moy = 6
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as jun_net
+ ,sum(case when d_moy = 7
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as jul_net
+ ,sum(case when d_moy = 8
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as aug_net
+ ,sum(case when d_moy = 9
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as sep_net
+ ,sum(case when d_moy = 10
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as oct_net
+ ,sum(case when d_moy = 11
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as nov_net
+ ,sum(case when d_moy = 12
+ then cs_net_paid_inc_ship_tax * cs_quantity else 0 end) as dec_net
+ from
+ catalog_sales
+ ,warehouse
+ ,date_dim
+ ,time_dim
+ ,ship_mode
+ where
+ catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk
+ and catalog_sales.cs_sold_date_sk = date_dim.d_date_sk
+ and catalog_sales.cs_sold_time_sk = time_dim.t_time_sk
+ and catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk
+ and d_year = 2002
+ and t_time between 49530 AND 49530+28800
+ and sm_carrier in ('DIAMOND','AIRBORNE')
+ group by
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,d_year
+ ) x
+ group by
+ w_warehouse_name
+ ,w_warehouse_sq_ft
+ ,w_city
+ ,w_county
+ ,w_state
+ ,w_country
+ ,ship_carriers
+ ,year
+ order by w_warehouse_name
+ limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 15 <- Map 14 (SIMPLE_EDGE), Map 20 (SIMPLE_EDGE)
+Reducer 16 <- Map 21 (SIMPLE_EDGE), Reducer 15 (SIMPLE_EDGE)
+Reducer 17 <- Map 22 (SIMPLE_EDGE), Reducer 16 (SIMPLE_EDGE)
+Reducer 18 <- Map 23 (SIMPLE_EDGE), Reducer 17 (SIMPLE_EDGE)
+Reducer 19 <- Reducer 18 (SIMPLE_EDGE), Union 7 (CONTAINS)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 10 (SIMPLE_EDGE)
+Reducer 3 <- Map 11 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 12 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 13 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE), Union 7 (CONTAINS)
+Reducer 8 <- Union 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 9
+ File Output Operator [FS_88]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 47100 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_87]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 47100 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_86]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col40","_col41","_col42","_col43"]
+ | Statistics:Num rows: 13068 Data size: 6155028 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_85]
+ key expressions:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 13068 Data size: 6155028 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: int), _col8 (type: decimal(38,2)), _col9 (type: decimal(38,2)), _col10 (type: decimal(38,2)), _col11 (type: decimal(38,2)), _col12 (type: decimal(38,2)), _col13 (type: decimal(38,2)), _col14 (type: decimal(38,2)), _col15 (type: decimal(38,2)), _col16 (type: decimal(38,2)), _col17 (type: decimal(38,2)), _col18 (type: decimal(38,2)), _col19 (type: decimal(38,2)), _col20 (type: decimal(38,12)), _col21 (type: decimal(38,12)), _col22 (type: decimal(38,12)), _col23 (type: decimal(38,12)), _col24 (type: decimal(38,12)), _col25 (type: decimal(38,12)), _col26 (type: decimal(38,12)), _col27 (type: decimal(38,12)), _col28 (type: decimal(38,12)), _col29 (type: decimal(38,12)), _col30 (type: decimal(38,12)), _col31 (type: decimal(38,12)), _col32 (type: decimal(38,2)), _col33 (type: decimal(38,2)), _col34 (type: decimal(38,2)), _col35 (type: decimal(38,2)), _col36 (type: decimal(38,2)), _col37 (type: decimal(38,2)), _col38 (type: decimal(38,2)), _col39 (type: decimal(38,2)), _col40 (type: decimal(38,2)), _col41 (type: decimal(38,2)), _col42 (type: decimal(38,2)), _col43 (type: decimal(38,2))
+ Group By Operator [GBY_83]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)","sum(VALUE._col5)","sum(VALUE._col6)","sum(VALUE._col7)","sum(VALUE._col8)","sum(VALUE._col9)","sum(VALUE._col10)","sum(VALUE._col11)","sum(VALUE._col12)","sum(VALUE._col13)","sum(VALUE._col14)","sum(VALUE._col15)","sum(VALUE._col16)","sum(VALUE._col17)","sum(VALUE._col18)","sum(VALUE._col19)","sum(VALUE._col20)","sum(VALUE._col21)","sum(VALUE._col22)","sum(VALUE._col23)","sum(VALUE._col24)","sum(VALUE._col25)","sum(VALUE._col26)","sum(VALUE._col27)","sum(VALUE._col28)","sum(VALUE._col29)","sum(VALUE._col30)","sum(VALUE._col31)","sum(VALUE._col32)","sum(VALUE._col33)","sum(VALUE._col34)","sum(VALUE._col35)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: string), KEY._col5 (type: string), KEY._col6 (type: string), KEY._col7 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col40","_col41","_col42","_col43"]
+ | Statistics:Num rows: 13068 Data size: 6155028 Basic stats: COMPLETE Column stats: NONE
+ |<-Union 7 [SIMPLE_EDGE]
+ |<-Reducer 19 [CONTAINS]
+ | Reduce Output Operator [RS_82]
+ | key expressions:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: int)
+ | Map-reduce partition columns:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: int)
+ | sort order:++++++++
+ | Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col8 (type: decimal(38,2)), _col9 (type: decimal(38,2)), _col10 (type: decimal(38,2)), _col11 (type: decimal(38,2)), _col12 (type: decimal(38,2)), _col13 (type: decimal(38,2)), _col14 (type: decimal(38,2)), _col15 (type: decimal(38,2)), _col16 (type: decimal(38,2)), _col17 (type: decimal(38,2)), _col18 (type: decimal(38,2)), _col19 (type: decimal(38,2)), _col20 (type: decimal(38,12)), _col21 (type: decimal(38,12)), _col22 (type: decimal(38,12)), _col23 (type: decimal(38,12)), _col24 (type: decimal(38,12)), _col25 (type: decimal(38,12)), _col26 (type: decimal(38,12)), _col27 (type: decimal(38,12)), _col28 (type: decimal(38,12)), _col29 (type: decimal(38,12)), _col30 (type: decimal(38,12)), _col31 (type: decimal(38,12)), _col32 (type: decimal(38,2)), _col33 (type: decimal(38,2)), _col34 (type: decimal(38,2)), _col35 (type: decimal(38,2)), _col36 (type: decimal(38,2)), _col37 (type: decimal(38,2)), _col38 (type: decimal(38,2)), _col39 (type: decimal(38,2)), _col40 (type: decimal(38,2)), _col41 (type: decimal(38,2)), _col42 (type: decimal(38,2)), _col43 (type: decimal(38,2))
+ | Group By Operator [GBY_81]
+ | aggregations:["sum(_col8)","sum(_col9)","sum(_col10)","sum(_col11)","sum(_col12)","sum(_col13)","sum(_col14)","sum(_col15)","sum(_col16)","sum(_col17)","sum(_col18)","sum(_col19)","sum(_col20)","sum(_col21)","sum(_col22)","sum(_col23)","sum(_col24)","sum(_col25)","sum(_col26)","sum(_col27)","sum(_col28)","sum(_col29)","sum(_col30)","sum(_col31)","sum(_col32)","sum(_col33)","sum(_col34)","sum(_col35)","sum(_col36)","sum(_col37)","sum(_col38)","sum(_col39)","sum(_col40)","sum(_col41)","sum(_col42)","sum(_col43)"]
+ | keys:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col40","_col41","_col42","_col43"]
+ | Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_79]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col40","_col41","_col42","_col43"]
+ | Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_77]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31"]
+ | Statistics:Num rows: 13068 Data size: 6155028 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_76]
+ | | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)","sum(VALUE._col5)","sum(VALUE._col6)","sum(VALUE._col7)","sum(VALUE._col8)","sum(VALUE._col9)","sum(VALUE._col10)","sum(VALUE._col11)","sum(VALUE._col12)","sum(VALUE._col13)","sum(VALUE._col14)","sum(VALUE._col15)","sum(VALUE._col16)","sum(VALUE._col17)","sum(VALUE._col18)","sum(VALUE._col19)","sum(VALUE._col20)","sum(VALUE._col21)","sum(VALUE._col22)","sum(VALUE._col23)"]
+ | | keys:KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: string), KEY._col5 (type: string), KEY._col6 (type: int)
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30"]
+ | | Statistics:Num rows: 13068 Data size: 6155028 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 18 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_75]
+ | key expressions:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: int)
+ | Map-reduce partition columns:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: int)
+ | sort order:+++++++
+ | Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col7 (type: decimal(28,2)), _col8 (type: decimal(28,2)), _col9 (type: decimal(28,2)), _col10 (type: decimal(28,2)), _col11 (type: decimal(28,2)), _col12 (type: decimal(28,2)), _col13 (type: decimal(28,2)), _col14 (type: decimal(28,2)), _col15 (type: decimal(28,2)), _col16 (type: decimal(28,2)), _col17 (type: decimal(28,2)), _col18 (type: decimal(28,2)), _col19 (type: decimal(28,2)), _col20 (type: decimal(28,2)), _col21 (type: decimal(28,2)), _col22 (type: decimal(28,2)), _col23 (type: decimal(28,2)), _col24 (type: decimal(28,2)), _col25 (type: decimal(28,2)), _col26 (type: decimal(28,2)), _col27 (type: decimal(28,2)), _col28 (type: decimal(28,2)), _col29 (type: decimal(28,2)), _col30 (type: decimal(28,2))
+ | Group By Operator [GBY_74]
+ | aggregations:["sum(_col7)","sum(_col8)","sum(_col9)","sum(_col10)","sum(_col11)","sum(_col12)","sum(_col13)","sum(_col14)","sum(_col15)","sum(_col16)","sum(_col17)","sum(_col18)","sum(_col19)","sum(_col20)","sum(_col21)","sum(_col22)","sum(_col23)","sum(_col24)","sum(_col25)","sum(_col26)","sum(_col27)","sum(_col28)","sum(_col29)","sum(_col30)"]
+ | keys:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30"]
+ | Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_72]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30"]
+ | Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_134]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col4","_col5","_col6","_col8","_col9","_col10","_col11","_col12","_col13","_col16"]
+ | | Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 23 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_70]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Select Operator [SEL_51]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_126]
+ | | predicate:((sm_carrier) IN ('DIAMOND', 'AIRBORNE') and sm_ship_mode_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_49]
+ | | alias:ship_mode
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Reducer 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_68]
+ | key expressions:_col2 (type: int)
+ | Map-reduce partition columns:_col2 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 23760 Data size: 11190960 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col8 (type: string), _col9 (type: int), _col10 (type: string), _col11 (type: string), _col12 (type: string), _col13 (type: string), _col16 (type: int)
+ | Merge Join Operator [MERGEJOIN_133]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col2","_col4","_col5","_col6","_col8","_col9","_col10","_col11","_col12","_col13","_col16"]
+ | | Statistics:Num rows: 23760 Data size: 11190960 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 22 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_65]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 21600 Data size: 10173600 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_48]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 21600 Data size: 10173600 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_125]
+ | | predicate:(t_time BETWEEN 49530 AND 78330 and t_time_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 21600 Data size: 10173600 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_46]
+ | | alias:time_dim
+ | | Statistics:Num rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 16 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_63]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col8 (type: string), _col9 (type: int), _col10 (type: string), _col11 (type: string), _col12 (type: string), _col13 (type: string), _col16 (type: int)
+ | Merge Join Operator [MERGEJOIN_132]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2","_col4","_col5","_col6","_col8","_col9","_col10","_col11","_col12","_col13","_col16"]
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 21 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_60]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col2 (type: int)
+ | | Select Operator [SEL_45]
+ | | outputColumnNames:["_col0","_col2"]
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_124]
+ | | predicate:((d_year = 2002) and d_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_43]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_58]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 15 Data size: 15856 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col8 (type: string), _col9 (type: int), _col10 (type: string), _col11 (type: string), _col12 (type: string), _col13 (type: string)
+ | Merge Join Operator [MERGEJOIN_131]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col0","_col1","_col2","_col4","_col5","_col6","_col8","_col9","_col10","_col11","_col12","_col13"]
+ | | Statistics:Num rows: 15 Data size: 15856 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 14 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_53]
+ | | key expressions:_col3 (type: int)
+ | | Map-reduce partition columns:_col3 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2))
+ | | Select Operator [SEL_40]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_122]
+ | | predicate:(((cs_warehouse_sk is not null and cs_sold_date_sk is not null) and cs_sold_time_sk is not null) and cs_ship_mode_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_39]
+ | | alias:catalog_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 20 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_55]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: int), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string)
+ | Select Operator [SEL_42]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_123]
+ | predicate:w_warehouse_sk is not null (type: boolean)
+ | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_41]
+ | alias:warehouse
+ | Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [CONTAINS]
+ Reduce Output Operator [RS_82]
+ key expressions:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: int)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: int)
+ sort order:++++++++
+ Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col8 (type: decimal(38,2)), _col9 (type: decimal(38,2)), _col10 (type: decimal(38,2)), _col11 (type: decimal(38,2)), _col12 (type: decimal(38,2)), _col13 (type: decimal(38,2)), _col14 (type: decimal(38,2)), _col15 (type: decimal(38,2)), _col16 (type: decimal(38,2)), _col17 (type: decimal(38,2)), _col18 (type: decimal(38,2)), _col19 (type: decimal(38,2)), _col20 (type: decimal(38,12)), _col21 (type: decimal(38,12)), _col22 (type: decimal(38,12)), _col23 (type: decimal(38,12)), _col24 (type: decimal(38,12)), _col25 (type: decimal(38,12)), _col26 (type: decimal(38,12)), _col27 (type: decimal(38,12)), _col28 (type: decimal(38,12)), _col29 (type: decimal(38,12)), _col30 (type: decimal(38,12)), _col31 (type: decimal(38,12)), _col32 (type: decimal(38,2)), _col33 (type: decimal(38,2)), _col34 (type: decimal(38,2)), _col35 (type: decimal(38,2)), _col36 (type: decimal(38,2)), _col37 (type: decimal(38,2)), _col38 (type: decimal(38,2)), _col39 (type: decimal(38,2)), _col40 (type: decimal(38,2)), _col41 (type: decimal(38,2)), _col42 (type: decimal(38,2)), _col43 (type: decimal(38,2))
+ Group By Operator [GBY_81]
+ aggregations:["sum(_col8)","sum(_col9)","sum(_col10)","sum(_col11)","sum(_col12)","sum(_col13)","sum(_col14)","sum(_col15)","sum(_col16)","sum(_col17)","sum(_col18)","sum(_col19)","sum(_col20)","sum(_col21)","sum(_col22)","sum(_col23)","sum(_col24)","sum(_col25)","sum(_col26)","sum(_col27)","sum(_col28)","sum(_col29)","sum(_col30)","sum(_col31)","sum(_col32)","sum(_col33)","sum(_col34)","sum(_col35)","sum(_col36)","sum(_col37)","sum(_col38)","sum(_col39)","sum(_col40)","sum(_col41)","sum(_col42)","sum(_col43)"]
+ keys:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string), _col7 (type: int)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col40","_col41","_col42","_col43"]
+ Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_79]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31","_col32","_col33","_col34","_col35","_col36","_col37","_col38","_col39","_col40","_col41","_col42","_col43"]
+ Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_38]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30","_col31"]
+ Statistics:Num rows: 13068 Data size: 6155028 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_37]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)","sum(VALUE._col3)","sum(VALUE._col4)","sum(VALUE._col5)","sum(VALUE._col6)","sum(VALUE._col7)","sum(VALUE._col8)","sum(VALUE._col9)","sum(VALUE._col10)","sum(VALUE._col11)","sum(VALUE._col12)","sum(VALUE._col13)","sum(VALUE._col14)","sum(VALUE._col15)","sum(VALUE._col16)","sum(VALUE._col17)","sum(VALUE._col18)","sum(VALUE._col19)","sum(VALUE._col20)","sum(VALUE._col21)","sum(VALUE._col22)","sum(VALUE._col23)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: string), KEY._col5 (type: string), KEY._col6 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30"]
+ | Statistics:Num rows: 13068 Data size: 6155028 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_36]
+ key expressions:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: int)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: int)
+ sort order:+++++++
+ Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col7 (type: decimal(28,2)), _col8 (type: decimal(28,2)), _col9 (type: decimal(28,2)), _col10 (type: decimal(28,2)), _col11 (type: decimal(28,2)), _col12 (type: decimal(28,2)), _col13 (type: decimal(28,2)), _col14 (type: decimal(28,2)), _col15 (type: decimal(28,2)), _col16 (type: decimal(28,2)), _col17 (type: decimal(28,2)), _col18 (type: decimal(28,2)), _col19 (type: decimal(28,2)), _col20 (type: decimal(28,2)), _col21 (type: decimal(28,2)), _col22 (type: decimal(28,2)), _col23 (type: decimal(28,2)), _col24 (type: decimal(28,2)), _col25 (type: decimal(28,2)), _col26 (type: decimal(28,2)), _col27 (type: decimal(28,2)), _col28 (type: decimal(28,2)), _col29 (type: decimal(28,2)), _col30 (type: decimal(28,2))
+ Group By Operator [GBY_35]
+ aggregations:["sum(_col7)","sum(_col8)","sum(_col9)","sum(_col10)","sum(_col11)","sum(_col12)","sum(_col13)","sum(_col14)","sum(_col15)","sum(_col16)","sum(_col17)","sum(_col18)","sum(_col19)","sum(_col20)","sum(_col21)","sum(_col22)","sum(_col23)","sum(_col24)","sum(_col25)","sum(_col26)","sum(_col27)","sum(_col28)","sum(_col29)","sum(_col30)"]
+ keys:_col0 (type: string), _col1 (type: int), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: int)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30"]
+ Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_33]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23","_col24","_col25","_col26","_col27","_col28","_col29","_col30"]
+ Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_130]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col5","_col6","_col8","_col9","_col10","_col11","_col12","_col13","_col16"]
+ | Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_31]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Select Operator [SEL_12]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_121]
+ | predicate:((sm_carrier) IN ('DIAMOND', 'AIRBORNE') and sm_ship_mode_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_10]
+ | alias:ship_mode
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_29]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 23760 Data size: 11190960 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col8 (type: string), _col9 (type: int), _col10 (type: string), _col11 (type: string), _col12 (type: string), _col13 (type: string), _col16 (type: int)
+ Merge Join Operator [MERGEJOIN_129]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col2","_col4","_col5","_col6","_col8","_col9","_col10","_col11","_col12","_col13","_col16"]
+ | Statistics:Num rows: 23760 Data size: 11190960 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_26]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 21600 Data size: 10173600 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_9]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 21600 Data size: 10173600 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_120]
+ | predicate:(t_time BETWEEN 49530 AND 78330 and t_time_sk is not null) (type: boolean)
+ | Statistics:Num rows: 21600 Data size: 10173600 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_7]
+ | alias:time_dim
+ | Statistics:Num rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_24]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col8 (type: string), _col9 (type: int), _col10 (type: string), _col11 (type: string), _col12 (type: string), _col13 (type: string), _col16 (type: int)
+ Merge Join Operator [MERGEJOIN_128]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col4","_col5","_col6","_col8","_col9","_col10","_col11","_col12","_col13","_col16"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_21]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: int)
+ | Select Operator [SEL_6]
+ | outputColumnNames:["_col0","_col2"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_119]
+ | predicate:((d_year = 2002) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_4]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_19]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 15 Data size: 15856 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col8 (type: string), _col9 (type: int), _col10 (type: string), _col11 (type: string), _col12 (type: string), _col13 (type: string)
+ Merge Join Operator [MERGEJOIN_127]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col4","_col5","_col6","_col8","_col9","_col10","_col11","_col12","_col13"]
+ | Statistics:Num rows: 15 Data size: 15856 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_14]
+ | key expressions:_col3 (type: int)
+ | Map-reduce partition columns:_col3 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_117]
+ | predicate:(((ws_warehouse_sk is not null and ws_sold_date_sk is not null) and ws_sold_time_sk is not null) and ws_ship_mode_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:web_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_16]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: int), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: string)
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_118]
+ predicate:w_warehouse_sk is not null (type: boolean)
+ Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:warehouse
+ Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query67.q.out b/ql/src/test/results/clientpositive/perf/query67.q.out
new file mode 100644
index 0000000..3cc7b6a
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query67.q.out
@@ -0,0 +1,249 @@
+PREHOOK: query: explain
+select *
+from (select i_category
+ ,i_class
+ ,i_brand
+ ,i_product_name
+ ,d_year
+ ,d_qoy
+ ,d_moy
+ ,s_store_id
+ ,sumsales
+ ,rank() over (partition by i_category order by sumsales desc) rk
+ from (select i_category
+ ,i_class
+ ,i_brand
+ ,i_product_name
+ ,d_year
+ ,d_qoy
+ ,d_moy
+ ,s_store_id
+ ,sum(coalesce(ss_sales_price*ss_quantity,0)) sumsales
+ from store_sales
+ ,date_dim
+ ,store
+ ,item
+ where store_sales.ss_sold_date_sk=date_dim.d_date_sk
+ and store_sales.ss_item_sk=item.i_item_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and d_month_seq between 1193 and 1193+11
+ group by i_category, i_class, i_brand, i_product_name, d_year, d_qoy, d_moy,s_store_id with rollup)dw1) dw2
+where rk <= 100
+order by i_category
+ ,i_class
+ ,i_brand
+ ,i_product_name
+ ,d_year
+ ,d_qoy
+ ,d_moy
+ ,s_store_id
+ ,sumsales
+ ,rk
+limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select *
+from (select i_category
+ ,i_class
+ ,i_brand
+ ,i_product_name
+ ,d_year
+ ,d_qoy
+ ,d_moy
+ ,s_store_id
+ ,sumsales
+ ,rank() over (partition by i_category order by sumsales desc) rk
+ from (select i_category
+ ,i_class
+ ,i_brand
+ ,i_product_name
+ ,d_year
+ ,d_qoy
+ ,d_moy
+ ,s_store_id
+ ,sum(coalesce(ss_sales_price*ss_quantity,0)) sumsales
+ from store_sales
+ ,date_dim
+ ,store
+ ,item
+ where store_sales.ss_sold_date_sk=date_dim.d_date_sk
+ and store_sales.ss_item_sk=item.i_item_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and d_month_seq between 1193 and 1193+11
+ group by i_category, i_class, i_brand, i_product_name, d_year, d_qoy, d_moy,s_store_id with rollup)dw1) dw2
+where rk <= 100
+order by i_category
+ ,i_class
+ ,i_brand
+ ,i_product_name
+ ,d_year
+ ,d_qoy
+ ,d_moy
+ ,s_store_id
+ ,sumsales
+ ,rk
+limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_39]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_38]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_37]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
+ | Statistics:Num rows: 381150 Data size: 547437387 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_36]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: string), _col8 (type: decimal(28,2)), _col9 (type: int)
+ sort order:++++++++++
+ Statistics:Num rows: 381150 Data size: 547437387 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_32]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
+ Statistics:Num rows: 381150 Data size: 547437387 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_49]
+ predicate:(rank_window_0 <= 100) (type: boolean)
+ Statistics:Num rows: 381150 Data size: 547437387 Basic stats: COMPLETE Column stats: NONE
+ PTF Operator [PTF_31]
+ Function definitions:[{"Input definition":{"type:":"WINDOWING"}},{"name:":"windowingtablefunction","order by:":"_col9(DESC)","partition by:":"_col0"}]
+ Statistics:Num rows: 1143450 Data size: 1642312161 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_30]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col9"]
+ | Statistics:Num rows: 1143450 Data size: 1642312161 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_29]
+ key expressions:_col0 (type: string), _col9 (type: decimal(28,2))
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+-
+ Statistics:Num rows: 1143450 Data size: 1642312161 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: string), _col9 (type: decimal(28,2))
+ Group By Operator [GBY_28]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: int), KEY._col5 (type: int), KEY._col6 (type: int), KEY._col7 (type: string), KEY._col8 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col9"]
+ | Statistics:Num rows: 1143450 Data size: 1642312161 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_27]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: string), _col8 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: string), _col8 (type: string)
+ sort order:+++++++++
+ Statistics:Num rows: 2286900 Data size: 3284624322 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col9 (type: decimal(28,2))
+ Group By Operator [GBY_26]
+ aggregations:["sum(_col8)"]
+ keys:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: string), '0' (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
+ Statistics:Num rows: 2286900 Data size: 3284624322 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_24]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_56]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col3","_col4","_col7","_col8","_col9","_col11","_col13","_col14","_col15","_col16"]
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_22]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ | Select Operator [SEL_8]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_53]
+ | predicate:i_item_sk is not null (type: boolean)
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_7]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: int), _col4 (type: decimal(7,2)), _col7 (type: int), _col8 (type: int), _col9 (type: int), _col11 (type: string)
+ Merge Join Operator [MERGEJOIN_55]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col4","_col7","_col8","_col9","_col11"]
+ | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_17]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_6]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_52]
+ | predicate:s_store_sk is not null (type: boolean)
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_15]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)), _col7 (type: int), _col8 (type: int), _col9 (type: int)
+ Merge Join Operator [MERGEJOIN_54]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col4","_col7","_col8","_col9"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_10]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_50]
+ | predicate:((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_12]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: int), _col3 (type: int), _col4 (type: int)
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0","_col2","_col3","_col4"]
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_51]
+ predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:date_dim
+ Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query68.q.out b/ql/src/test/results/clientpositive/perf/query68.q.out
new file mode 100644
index 0000000..d9cfbfb
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query68.q.out
@@ -0,0 +1,241 @@
+PREHOOK: query: explain select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,extended_price ,extended_tax ,list_price from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_ext_sales_price) extended_price ,sum(ss_ext_list_price) list_price ,sum(ss_ext_tax) extended_tax from store_sales ,date_dim ,store ,household_demographics ,customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_dep_count = 4 or household_demographics.hd_vehicle_count= 2) and date_dim.d_year in (1998,1998+1,1998+2) and store.s_city in ('Rosedale','Bethlehem') group by ss_ticket_number ,ss_customer_sk ,ss_addr_sk,ca_city) dn ,customer ,customer_address current_addr where dn.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,ss_ticket_number limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select c_last_name ,c_first_name ,ca_city ,bought_city ,ss_ticket_number ,extended_price ,extended_tax ,list_price from (select ss_ticket_number ,ss_customer_sk ,ca_city bought_city ,sum(ss_ext_sales_price) extended_price ,sum(ss_ext_list_price) list_price ,sum(ss_ext_tax) extended_tax from store_sales ,date_dim ,store ,household_demographics ,customer_address where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_addr_sk = customer_address.ca_address_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_dep_count = 4 or household_demographics.hd_vehicle_count= 2) and date_dim.d_year in (1998,1998+1,1998+2) and store.s_city in ('Rosedale','Bethlehem') group by ss_ticket_number ,ss_customer_sk ,ss_addr_sk,ca_city) dn ,customer ,customer_address current_addr where dn.ss_customer_sk = customer.c_customer_sk and customer.c_current_addr_sk = current_addr.ca_address_sk and current_addr.ca_city <> bought_city order by c_last_name ,ss_ticket_number limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 10 (SIMPLE_EDGE)
+Reducer 3 <- Map 11 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 12 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 13 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 14 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Map 15 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 9
+ File Output Operator [FS_58]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_57]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_56]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_55]
+ key expressions:_col0 (type: string), _col4 (type: int)
+ sort order:++
+ Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2)), _col7 (type: decimal(17,2))
+ Select Operator [SEL_54]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_86]
+ predicate:(_col11 <> _col2) (type: boolean)
+ Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_99]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col7 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col3","_col4","_col5","_col8","_col9","_col11"]
+ | Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_51]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_42]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_93]
+ | predicate:ca_address_sk is not null (type: boolean)
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_41]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_49]
+ key expressions:_col7 (type: int)
+ Map-reduce partition columns:_col7 (type: int)
+ sort order:+
+ Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: string), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col8 (type: string), _col9 (type: string)
+ Merge Join Operator [MERGEJOIN_98]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col3","_col4","_col5","_col7","_col8","_col9"]
+ | Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_46]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: string), _col3 (type: string)
+ | Select Operator [SEL_40]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_92]
+ | predicate:(c_customer_sk is not null and c_current_addr_sk is not null) (type: boolean)
+ | Statistics:Num rows: 20000000 Data size: 17200403963 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_39]
+ | alias:customer
+ | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_44]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: string), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col5 (type: decimal(17,2))
+ Select Operator [SEL_37]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_36]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_35]
+ key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string)
+ sort order:++++
+ Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: decimal(17,2)), _col5 (type: decimal(17,2)), _col6 (type: decimal(17,2))
+ Group By Operator [GBY_34]
+ aggregations:["sum(_col6)","sum(_col7)","sum(_col8)"]
+ keys:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col18 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_33]
+ outputColumnNames:["_col1","_col3","_col5","_col18","_col6","_col7","_col8"]
+ Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_97]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col5","_col6","_col7","_col8","_col18"]
+ | Statistics:Num rows: 22000000 Data size: 22327357890 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_31]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_12]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_91]
+ | predicate:ca_address_sk is not null (type: boolean)
+ | Statistics:Num rows: 20000000 Data size: 20297597642 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_11]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_29]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 12152 Data size: 13599611 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_96]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col5","_col6","_col7","_col8"]
+ | Statistics:Num rows: 12152 Data size: 13599611 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_26]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_10]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_90]
+ | predicate:(((hd_dep_count = 4) or (hd_vehicle_count = 2)) and hd_demo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_8]
+ | alias:household_demographics
+ | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_24]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_95]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col5","_col6","_col7","_col8"]
+ | Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_21]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_89]
+ | predicate:((s_city) IN ('Rosedale', 'Bethlehem') and s_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_19]
+ key expressions:_col4 (type: int)
+ Map-reduce partition columns:_col4 (type: int)
+ sort order:+
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_94]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_14]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col8 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_87]
+ | predicate:((((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_hdemo_sk is not null) and ss_addr_sk is not null) and ss_customer_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_16]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_88]
+ predicate:((d_dom BETWEEN 1 AND 2 and (d_year) IN (1998, 1999, 2000)) and d_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:date_dim
+ Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query7.q.out b/ql/src/test/results/clientpositive/perf/query7.q.out
new file mode 100644
index 0000000..6e1ad03
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query7.q.out
@@ -0,0 +1,174 @@
+PREHOOK: query: explain select i_item_id, 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, item, promotion where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_item_sk = item.i_item_sk and store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk and store_sales.ss_promo_sk = promotion.p_promo_sk and cd_gender = 'F' and cd_marital_status = 'W' and cd_education_status = 'Primary' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 1998 group by i_item_id order by i_item_id limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_item_id, 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, item, promotion where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_item_sk = item.i_item_sk and store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk and store_sales.ss_promo_sk = promotion.p_promo_sk and cd_gender = 'F' and cd_marital_status = 'W' and cd_education_status = 'Primary' and (p_channel_email = 'N' or p_channel_event = 'N') and d_year = 1998 group by i_item_id order by i_item_id limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 11 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_41]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_40]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_39]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_38]
+ key expressions:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: double), _col2 (type: decimal(11,6)), _col3 (type: decimal(11,6)), _col4 (type: decimal(11,6))
+ Group By Operator [GBY_36]
+ | aggregations:["avg(VALUE._col0)","avg(VALUE._col1)","avg(VALUE._col2)","avg(VALUE._col3)"]
+ | keys:KEY._col0 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_35]
+ key expressions:_col0 (type: string)
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: struct), _col2 (type: struct), _col3 (type: struct), _col4 (type: struct)
+ Group By Operator [GBY_34]
+ aggregations:["avg(_col4)","avg(_col5)","avg(_col7)","avg(_col6)"]
+ keys:_col15 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_33]
+ outputColumnNames:["_col15","_col4","_col5","_col7","_col6"]
+ Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_64]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col5","_col6","_col7","_col15"]
+ | Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_31]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1150 Data size: 1356710 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_12]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1150 Data size: 1356710 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_60]
+ | predicate:(((p_channel_email = 'N') or (p_channel_event = 'N')) and p_promo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1150 Data size: 1356710 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_10]
+ | alias:promotion
+ | Statistics:Num rows: 2300 Data size: 2713420 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_29]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col15 (type: string)
+ Merge Join Operator [MERGEJOIN_63]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col3","_col4","_col5","_col6","_col7","_col15"]
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_26]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_9]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_59]
+ | predicate:i_item_sk is not null (type: boolean)
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_8]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_24]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_62]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_21]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_58]
+ | predicate:((d_year = 1998) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_19]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1361 Data size: 493209 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_61]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 1361 Data size: 493209 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_14]
+ | key expressions:_col2 (type: int)
+ | Map-reduce partition columns:_col2 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_56]
+ | predicate:(((ss_cdemo_sk is not null and ss_sold_date_sk is not null) and ss_item_sk is not null) and ss_promo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_16]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1238 Data size: 448372 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1238 Data size: 448372 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_57]
+ predicate:((((cd_gender = 'F') and (cd_marital_status = 'W')) and (cd_education_status = 'Primary')) and cd_demo_sk is not null) (type: boolean)
+ Statistics:Num rows: 1238 Data size: 448372 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:customer_demographics
+ Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query70.q.out b/ql/src/test/results/clientpositive/perf/query70.q.out
new file mode 100644
index 0000000..1900772
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query70.q.out
@@ -0,0 +1,268 @@
+PREHOOK: query: explain select sum(ss_net_profit) as total_sum ,s_state ,s_county ,grouping__id as lochierarchy , rank() over(partition by grouping__id, case when grouping__id == 2 then s_state end order by sum(ss_net_profit)) as rank_within_parent from store_sales ss join date_dim d1 on d1.d_date_sk = ss.ss_sold_date_sk join store s on s.s_store_sk = ss.ss_store_sk where d1.d_month_seq between 1193 and 1193+11 and s.s_state in ( select s_state from (select s_state as s_state, sum(ss_net_profit), rank() over ( partition by s_state order by sum(ss_net_profit) desc) as ranking from store_sales, store, date_dim where d_month_seq between 1193 and 1193+11 and date_dim.d_date_sk = store_sales.ss_sold_date_sk and store.s_store_sk = store_sales.ss_store_sk group by s_state ) tmp1 where ranking <= 5 ) group by s_state,s_county with rollup order by lochierarchy desc ,case when lochierarchy = 0 then s_state end ,rank_within_parent limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select sum(ss_net_profit) as total_sum ,s_state ,s_county ,grouping__id as lochierarchy , rank() over(partition by grouping__id, case when grouping__id == 2 then s_state end order by sum(ss_net_profit)) as rank_within_parent from store_sales ss join date_dim d1 on d1.d_date_sk = ss.ss_sold_date_sk join store s on s.s_store_sk = ss.ss_store_sk where d1.d_month_seq between 1193 and 1193+11 and s.s_state in ( select s_state from (select s_state as s_state, sum(ss_net_profit), rank() over ( partition by s_state order by sum(ss_net_profit) desc) as ranking from store_sales, store, date_dim where d_month_seq between 1193 and 1193+11 and date_dim.d_date_sk = store_sales.ss_sold_date_sk and store.s_store_sk = store_sales.ss_store_sk group by s_state ) tmp1 where ranking <= 5 ) group by s_state,s_county with rollup order by lochierarchy desc ,case when lochierarchy = 0 then s_state end ,rank_within_parent limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 11 <- Map 10 (SIMPLE_EDGE), Map 15 (SIMPLE_EDGE)
+Reducer 12 <- Map 16 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
+Reducer 13 <- Reducer 12 (SIMPLE_EDGE)
+Reducer 14 <- Reducer 13 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 9 <- Map 8 (SIMPLE_EDGE), Reducer 14 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 6
+ File Output Operator [FS_67]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 111900 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_66]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 111900 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_65]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 33144 Data size: 37089849 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_64]
+ key expressions:_col3 (type: string), CASE WHEN ((_col3 = 0)) THEN (_col1) END (type: string), _col4 (type: int)
+ sort order:-++
+ Statistics:Num rows: 33144 Data size: 37089849 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: decimal(17,2)), _col1 (type: string), _col2 (type: string)
+ Select Operator [SEL_62]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 33144 Data size: 37089849 Basic stats: COMPLETE Column stats: NONE
+ PTF Operator [PTF_61]
+ Function definitions:[{"Input definition":{"type:":"WINDOWING"}},{"name:":"windowingtablefunction","order by:":"_col4","partition by:":"_col5, CASE WHEN ((_col5 = 2)) THEN (_col0) END"}]
+ Statistics:Num rows: 33144 Data size: 37089849 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_60]
+ | outputColumnNames:["_col0","_col1","_col4","_col5"]
+ | Statistics:Num rows: 33144 Data size: 37089849 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_59]
+ key expressions:_col5 (type: string), CASE WHEN ((_col5 = 2)) THEN (_col0) END (type: string), _col4 (type: decimal(17,2))
+ Map-reduce partition columns:_col5 (type: string), CASE WHEN ((_col5 = 2)) THEN (_col0) END (type: string)
+ sort order:+++
+ Statistics:Num rows: 33144 Data size: 37089849 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: string), _col1 (type: string)
+ Select Operator [SEL_58]
+ outputColumnNames:["_col0","_col1","_col4","_col5"]
+ Statistics:Num rows: 33144 Data size: 37089849 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_57]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 33144 Data size: 37089849 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_56]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ sort order:+++
+ Statistics:Num rows: 66288 Data size: 74179698 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: decimal(17,2))
+ Group By Operator [GBY_55]
+ aggregations:["sum(_col2)"]
+ keys:_col6 (type: string), _col7 (type: string), '0' (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 66288 Data size: 74179698 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_54]
+ outputColumnNames:["_col6","_col7","_col2"]
+ Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_96]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col2","_col6","_col7"]
+ | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_50]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: decimal(7,2))
+ | Merge Join Operator [MERGEJOIN_92]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2"]
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 1 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_45]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: decimal(7,2))
+ | | Select Operator [SEL_1]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_85]
+ | | predicate:(ss_sold_date_sk is not null and ss_store_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_0]
+ | | alias:ss
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 7 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_47]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_4]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_86]
+ | predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_2]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_52]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1841 Data size: 2060546 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: string)
+ Merge Join Operator [MERGEJOIN_95]
+ | condition map:[{"":"Left Semi Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: string)","1":"_col0 (type: string)"}
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1841 Data size: 2060546 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_39]
+ | key expressions:_col2 (type: string)
+ | Map-reduce partition columns:_col2 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: string)
+ | Select Operator [SEL_6]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_87]
+ | predicate:(s_state is not null and s_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:s
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 14 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_41]
+ key expressions:_col0 (type: string)
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 1674 Data size: 1873224 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_37]
+ keys:_col0 (type: string)
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1674 Data size: 1873224 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_31]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1674 Data size: 1873224 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_88]
+ predicate:((rank_window_0 <= 5) and _col0 is not null) (type: boolean)
+ Statistics:Num rows: 1674 Data size: 1873224 Basic stats: COMPLETE Column stats: NONE
+ PTF Operator [PTF_30]
+ Function definitions:[{"Input definition":{"type:":"WINDOWING"}},{"name:":"windowingtablefunction","order by:":"_col1(DESC)","partition by:":"_col0"}]
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_29]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 13 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_28]
+ key expressions:_col0 (type: string), _col1 (type: decimal(17,2))
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+-
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: decimal(17,2))
+ Group By Operator [GBY_27]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: string)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 12 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_26]
+ key expressions:_col0 (type: string)
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: decimal(17,2))
+ Group By Operator [GBY_25]
+ aggregations:["sum(_col2)"]
+ keys:_col4 (type: string)
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_24]
+ outputColumnNames:["_col4","_col2"]
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_94]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col2","_col4"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 16 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_22]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_13]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_91]
+ | predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_11]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 11 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 937 Data size: 1790951 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(7,2)), _col4 (type: string)
+ Merge Join Operator [MERGEJOIN_93]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col4"]
+ | Statistics:Num rows: 937 Data size: 1790951 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_15]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col2 (type: decimal(7,2))
+ | Select Operator [SEL_8]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_89]
+ | predicate:(ss_store_sk is not null and ss_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_7]
+ | alias:ss
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 15 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_17]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string)
+ Select Operator [SEL_10]
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_90]
+ predicate:s_store_sk is not null (type: boolean)
+ Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_9]
+ alias:s
+ Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query71.q.out b/ql/src/test/results/clientpositive/perf/query71.q.out
new file mode 100644
index 0000000..10c4897
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query71.q.out
@@ -0,0 +1,242 @@
+PREHOOK: query: explain select i_brand_id brand_id, i_brand brand,t_hour,t_minute, sum(ext_price) ext_price from item JOIN (select ws_ext_sales_price as ext_price, ws_sold_date_sk as sold_date_sk, ws_item_sk as sold_item_sk, ws_sold_time_sk as time_sk from web_sales,date_dim where date_dim.d_date_sk = web_sales.ws_sold_date_sk and d_moy=12 and d_year=2001 union all select cs_ext_sales_price as ext_price, cs_sold_date_sk as sold_date_sk, cs_item_sk as sold_item_sk, cs_sold_time_sk as time_sk from catalog_sales,date_dim where date_dim.d_date_sk = catalog_sales.cs_sold_date_sk and d_moy=12 and d_year=2001 union all select ss_ext_sales_price as ext_price, ss_sold_date_sk as sold_date_sk, ss_item_sk as sold_item_sk, ss_sold_time_sk as time_sk from store_sales,date_dim where date_dim.d_date_sk = store_sales.ss_sold_date_sk and d_moy=12 and d_year=2001 ) tmp ON tmp.sold_item_sk = item.i_item_sk JOIN time_dim ON tmp.time_sk = time_dim.t_time_sk where i_manager_id=1 and (t_meal_time = 'breakfast' or t_meal_time = 'dinner') group by i_brand, i_brand_id,t_hour,t_minute order by ext_price desc, i_brand_id
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_brand_id brand_id, i_brand brand,t_hour,t_minute, sum(ext_price) ext_price from item JOIN (select ws_ext_sales_price as ext_price, ws_sold_date_sk as sold_date_sk, ws_item_sk as sold_item_sk, ws_sold_time_sk as time_sk from web_sales,date_dim where date_dim.d_date_sk = web_sales.ws_sold_date_sk and d_moy=12 and d_year=2001 union all select cs_ext_sales_price as ext_price, cs_sold_date_sk as sold_date_sk, cs_item_sk as sold_item_sk, cs_sold_time_sk as time_sk from catalog_sales,date_dim where date_dim.d_date_sk = catalog_sales.cs_sold_date_sk and d_moy=12 and d_year=2001 union all select ss_ext_sales_price as ext_price, ss_sold_date_sk as sold_date_sk, ss_item_sk as sold_item_sk, ss_sold_time_sk as time_sk from store_sales,date_dim where date_dim.d_date_sk = store_sales.ss_sold_date_sk and d_moy=12 and d_year=2001 ) tmp ON tmp.sold_item_sk = item.i_item_sk JOIN time_dim ON tmp.time_sk = time_dim.t_time_sk where i_manager_id=1 and (t_meal_time = 'breakfast' or t_meal_time = 'dinner') group by i_brand, i_brand_id,t_hour,t_minute order by ext_price desc, i_brand_id
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 11 <- Map 10 (SIMPLE_EDGE), Map 12 (SIMPLE_EDGE), Union 8 (CONTAINS)
+Reducer 14 <- Map 13 (SIMPLE_EDGE), Map 15 (SIMPLE_EDGE), Union 8 (CONTAINS)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Union 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 16 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 7 <- Map 6 (SIMPLE_EDGE), Map 9 (SIMPLE_EDGE), Union 8 (CONTAINS)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 5
+ File Output Operator [FS_62]
+ compressed:false
+ Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Select Operator [SEL_61]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_60]
+ key expressions:_col4 (type: decimal(17,2)), _col0 (type: int)
+ sort order:-+
+ Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: int), _col3 (type: int)
+ Group By Operator [GBY_57]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: string), KEY._col2 (type: int), KEY._col3 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_56]
+ key expressions:_col0 (type: int), _col1 (type: string), _col2 (type: int), _col3 (type: int)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: string), _col2 (type: int), _col3 (type: int)
+ sort order:++++
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: decimal(17,2))
+ Group By Operator [GBY_55]
+ aggregations:["sum(_col4)"]
+ keys:_col1 (type: int), _col2 (type: string), _col8 (type: int), _col9 (type: int)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_54]
+ outputColumnNames:["_col1","_col2","_col8","_col9","_col4"]
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_96]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col6 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col4","_col8","_col9"]
+ | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 16 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_52]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 43200 Data size: 20347200 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int)
+ | Select Operator [SEL_41]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 43200 Data size: 20347200 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_91]
+ | predicate:(((t_meal_time = 'breakfast') or (t_meal_time = 'dinner')) and t_time_sk is not null) (type: boolean)
+ | Statistics:Num rows: 43200 Data size: 20347200 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_39]
+ | alias:time_dim
+ | Statistics:Num rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_50]
+ key expressions:_col6 (type: int)
+ Map-reduce partition columns:_col6 (type: int)
+ sort order:+
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: string), _col4 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_95]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col1 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col4","_col6"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_45]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: string)
+ | Select Operator [SEL_2]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_84]
+ | predicate:((i_manager_id = 1) and i_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_0]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Union 8 [SIMPLE_EDGE]
+ |<-Reducer 11 [CONTAINS]
+ | Reduce Output Operator [RS_47]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 30132 Data size: 33718044 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: decimal(7,2)), _col2 (type: int)
+ | Select Operator [SEL_24]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_93]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2","_col3"]
+ | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 10 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_20]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: decimal(7,2))
+ | | Select Operator [SEL_15]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_87]
+ | | predicate:((cs_sold_date_sk is not null and cs_item_sk is not null) and cs_sold_time_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_14]
+ | | alias:catalog_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_22]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_18]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_88]
+ | predicate:(((d_moy = 12) and (d_year = 2001)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_16]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 14 [CONTAINS]
+ | Reduce Output Operator [RS_47]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 30132 Data size: 33718044 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: decimal(7,2)), _col2 (type: int)
+ | Select Operator [SEL_37]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_94]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2","_col3"]
+ | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 13 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_33]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: decimal(7,2))
+ | | Select Operator [SEL_28]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_89]
+ | | predicate:((ss_sold_date_sk is not null and ss_item_sk is not null) and ss_sold_time_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_27]
+ | | alias:store_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_35]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_31]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_90]
+ | predicate:(((d_moy = 12) and (d_year = 2001)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_29]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [CONTAINS]
+ Reduce Output Operator [RS_47]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 30132 Data size: 33718044 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: decimal(7,2)), _col2 (type: int)
+ Select Operator [SEL_13]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_92]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 6 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_9]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: decimal(7,2))
+ | Select Operator [SEL_4]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_85]
+ | predicate:((ws_sold_date_sk is not null and ws_item_sk is not null) and ws_sold_time_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_3]
+ | alias:web_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_11]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_7]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_86]
+ predicate:(((d_moy = 12) and (d_year = 2001)) and d_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_5]
+ alias:date_dim
+ Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query72.q.out b/ql/src/test/results/clientpositive/perf/query72.q.out
new file mode 100644
index 0000000..732eef4
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query72.q.out
@@ -0,0 +1,352 @@
+PREHOOK: query: explain select i_item_desc ,w_warehouse_name ,d1.d_week_seq ,count(case when p_promo_sk is null then 1 else 0 end) no_promo ,count(case when p_promo_sk is not null then 1 else 0 end) promo ,count(*) total_cnt from catalog_sales join inventory on (catalog_sales.cs_item_sk = inventory.inv_item_sk) join warehouse on (warehouse.w_warehouse_sk=inventory.inv_warehouse_sk) join item on (item.i_item_sk = catalog_sales.cs_item_sk) join customer_demographics on (catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk) join household_demographics on (catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk) join date_dim d1 on (catalog_sales.cs_sold_date_sk = d1.d_date_sk) join date_dim d2 on (inventory.inv_date_sk = d2.d_date_sk) join date_dim d3 on (catalog_sales.cs_ship_date_sk = d3.d_date_sk) left outer join promotion on (catalog_sales.cs_promo_sk=promotion.p_promo_sk) left outer join catalog_returns on (catalog_returns.cr_item_sk = catalog_sales.cs_item_sk and catalog_returns.cr_order_number = catalog_sales.cs_order_number) where d1.d_week_seq = d2.d_week_seq and inv_quantity_on_hand < cs_quantity and d3.d_date > d1.d_date + 5 and hd_buy_potential = '1001-5000' and d1.d_year = 2001 and hd_buy_potential = '1001-5000' and cd_marital_status = 'M' and d1.d_year = 2001 group by i_item_desc,w_warehouse_name,d1.d_week_seq order by total_cnt desc, i_item_desc, w_warehouse_name, d_week_seq limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_item_desc ,w_warehouse_name ,d1.d_week_seq ,count(case when p_promo_sk is null then 1 else 0 end) no_promo ,count(case when p_promo_sk is not null then 1 else 0 end) promo ,count(*) total_cnt from catalog_sales join inventory on (catalog_sales.cs_item_sk = inventory.inv_item_sk) join warehouse on (warehouse.w_warehouse_sk=inventory.inv_warehouse_sk) join item on (item.i_item_sk = catalog_sales.cs_item_sk) join customer_demographics on (catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk) join household_demographics on (catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk) join date_dim d1 on (catalog_sales.cs_sold_date_sk = d1.d_date_sk) join date_dim d2 on (inventory.inv_date_sk = d2.d_date_sk) join date_dim d3 on (catalog_sales.cs_ship_date_sk = d3.d_date_sk) left outer join promotion on (catalog_sales.cs_promo_sk=promotion.p_promo_sk) left outer join catalog_returns on (catalog_returns.cr_item_sk = catalog_sales.cs_item_sk and catalog_returns.cr_order_number = catalog_sales.cs_order_number) where d1.d_week_seq = d2.d_week_seq and inv_quantity_on_hand < cs_quantity and d3.d_date > d1.d_date + 5 and hd_buy_potential = '1001-5000' and d1.d_year = 2001 and hd_buy_potential = '1001-5000' and cd_marital_status = 'M' and d1.d_year = 2001 group by i_item_desc,w_warehouse_name,d1.d_week_seq order by total_cnt desc, i_item_desc, w_warehouse_name, d_week_seq limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Map 22 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Map 23 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE)
+Reducer 12 <- Reducer 11 (SIMPLE_EDGE)
+Reducer 13 <- Reducer 12 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 14 (SIMPLE_EDGE)
+Reducer 3 <- Map 15 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 16 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 17 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 18 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 19 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Map 20 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Map 21 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 13
+ File Output Operator [FS_84]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_83]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_82]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 82526 Data size: 118532118 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 12 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_81]
+ key expressions:_col5 (type: bigint), _col0 (type: string), _col1 (type: string), _col2 (type: int)
+ sort order:-+++
+ Statistics:Num rows: 82526 Data size: 118532118 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: bigint), _col4 (type: bigint)
+ Group By Operator [GBY_79]
+ | aggregations:["count(VALUE._col0)","count(VALUE._col1)","count(VALUE._col2)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 82526 Data size: 118532118 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 11 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_78]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: int)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: int)
+ sort order:+++
+ Statistics:Num rows: 165053 Data size: 237065674 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: bigint), _col4 (type: bigint), _col5 (type: bigint)
+ Group By Operator [GBY_77]
+ aggregations:["count(_col3)","count(_col4)","count()"]
+ keys:_col0 (type: string), _col1 (type: string), _col2 (type: int)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 165053 Data size: 237065674 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_75]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 165053 Data size: 237065674 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_153]
+ | condition map:[{"":"Left Outer Join0 to 1"}]
+ | keys:{"0":"_col4 (type: int), _col6 (type: int)","1":"_col0 (type: int), _col1 (type: int)"}
+ | outputColumnNames:["_col13","_col15","_col22","_col28"]
+ | Statistics:Num rows: 165053 Data size: 237065674 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 23 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_73]
+ | key expressions:_col0 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Select Operator [SEL_68]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_67]
+ | alias:catalog_returns
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 10 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_72]
+ key expressions:_col4 (type: int), _col6 (type: int)
+ Map-reduce partition columns:_col4 (type: int), _col6 (type: int)
+ sort order:++
+ Statistics:Num rows: 150049 Data size: 215514245 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col13 (type: string), _col15 (type: string), _col22 (type: int), _col28 (type: int)
+ Merge Join Operator [MERGEJOIN_152]
+ | condition map:[{"":"Left Outer Join0 to 1"}]
+ | keys:{"0":"_col5 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col6","_col13","_col15","_col22","_col28"]
+ | Statistics:Num rows: 150049 Data size: 215514245 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 22 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_70]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 2300 Data size: 2713420 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_66]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 2300 Data size: 2713420 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_65]
+ | alias:promotion
+ | Statistics:Num rows: 2300 Data size: 2713420 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_69]
+ key expressions:_col5 (type: int)
+ Map-reduce partition columns:_col5 (type: int)
+ sort order:+
+ Statistics:Num rows: 136409 Data size: 195922037 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: int), _col6 (type: int), _col13 (type: string), _col15 (type: string), _col22 (type: int)
+ Select Operator [SEL_64]
+ outputColumnNames:["_col13","_col15","_col22","_col4","_col5","_col6"]
+ Statistics:Num rows: 136409 Data size: 195922037 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_131]
+ predicate:(UDFToDouble(_col27) > (UDFToDouble(_col21) + 5.0)) (type: boolean)
+ Statistics:Num rows: 136409 Data size: 195922037 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_151]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col5","_col6","_col13","_col15","_col21","_col22","_col27"]
+ | Statistics:Num rows: 409229 Data size: 587768984 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 21 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_61]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_27]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_141]
+ | predicate:d_date_sk is not null (type: boolean)
+ | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_26]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_59]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 372027 Data size: 534335429 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: int), _col5 (type: int), _col6 (type: int), _col13 (type: string), _col15 (type: string), _col21 (type: string), _col22 (type: int)
+ Merge Join Operator [MERGEJOIN_150]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col8 (type: int), _col22 (type: int)","1":"_col0 (type: int), _col1 (type: int)"}
+ | outputColumnNames:["_col1","_col4","_col5","_col6","_col13","_col15","_col21","_col22"]
+ | Statistics:Num rows: 372027 Data size: 534335429 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 20 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_56]
+ | key expressions:_col0 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_25]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_140]
+ | predicate:(d_date_sk is not null and d_week_seq is not null) (type: boolean)
+ | Statistics:Num rows: 18263 Data size: 20436297 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_24]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_54]
+ key expressions:_col8 (type: int), _col22 (type: int)
+ Map-reduce partition columns:_col8 (type: int), _col22 (type: int)
+ sort order:++
+ Statistics:Num rows: 338207 Data size: 485759471 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col13 (type: string), _col15 (type: string), _col21 (type: string)
+ Merge Join Operator [MERGEJOIN_149]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col4","_col5","_col6","_col8","_col13","_col15","_col21","_col22"]
+ | Statistics:Num rows: 338207 Data size: 485759471 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 19 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_51]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: int)
+ | Select Operator [SEL_23]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_139]
+ | predicate:(((d_year = 2001) and d_date_sk is not null) and d_week_seq is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_21]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_49]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 307461 Data size: 441599510 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col8 (type: int), _col13 (type: string), _col15 (type: string)
+ Merge Join Operator [MERGEJOIN_148]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col4","_col5","_col6","_col8","_col13","_col15"]
+ | Statistics:Num rows: 307461 Data size: 441599510 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 18 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_46]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_20]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_138]
+ | predicate:((hd_buy_potential = '1001-5000') and hd_demo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_18]
+ | alias:household_demographics
+ | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_44]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col1 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col8 (type: int), _col13 (type: string), _col15 (type: string)
+ Merge Join Operator [MERGEJOIN_147]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col3","_col4","_col5","_col6","_col8","_col13","_col15"]
+ | Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_41]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 4950 Data size: 1792764 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_17]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 4950 Data size: 1792764 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_137]
+ | predicate:((cd_marital_status = 'M') and cd_demo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 4950 Data size: 1792764 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_15]
+ | alias:customer_demographics
+ | Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_39]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col1 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col8 (type: int), _col13 (type: string), _col15 (type: string)
+ Merge Join Operator [MERGEJOIN_146]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col8","_col13","_col15"]
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 16 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_36]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_14]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_136]
+ | predicate:i_item_sk is not null (type: boolean)
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_13]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_34]
+ key expressions:_col4 (type: int)
+ Map-reduce partition columns:_col4 (type: int)
+ sort order:+
+ Statistics:Num rows: 15 Data size: 15856 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: int), _col8 (type: int), _col13 (type: string)
+ Merge Join Operator [MERGEJOIN_145]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col10 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col8","_col13"]
+ | Statistics:Num rows: 15 Data size: 15856 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_31]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_12]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_135]
+ | predicate:w_warehouse_sk is not null (type: boolean)
+ | Statistics:Num rows: 14 Data size: 14415 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_11]
+ | alias:warehouse
+ | Statistics:Num rows: 27 Data size: 27802 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_29]
+ key expressions:_col10 (type: int)
+ Map-reduce partition columns:_col10 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: int), _col8 (type: int)
+ Select Operator [SEL_10]
+ outputColumnNames:["_col0","_col1","_col10","_col2","_col3","_col4","_col5","_col6","_col8"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_132]
+ predicate:(_col11 < _col7) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Merge Join Operator [MERGEJOIN_144]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int)","1":"_col1 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col10","_col11"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_5]
+ | key expressions:_col4 (type: int)
+ | Map-reduce partition columns:_col4 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: int), _col7 (type: int)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_133]
+ | predicate:((((cs_item_sk is not null and cs_bill_cdemo_sk is not null) and cs_bill_hdemo_sk is not null) and cs_sold_date_sk is not null) and cs_ship_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:catalog_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 14 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_7]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int)
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_134]
+ predicate:((inv_item_sk is not null and inv_warehouse_sk is not null) and inv_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_2]
+ alias:inventory
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query73.q.out b/ql/src/test/results/clientpositive/perf/query73.q.out
new file mode 100644
index 0000000..5e6d43e
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query73.q.out
@@ -0,0 +1,177 @@
+PREHOOK: query: explain select c_last_name ,c_first_name ,c_salutation ,c_preferred_cust_flag ,ss_ticket_number ,cnt from (select ss_ticket_number ,ss_customer_sk ,count(*) cnt from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_buy_potential = '1001-5000' or household_demographics.hd_buy_potential = '5001-10000') and household_demographics.hd_vehicle_count > 0 and case when household_demographics.hd_vehicle_count > 0 then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end > 1 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_county in ('Kittitas County','Adams County','Richland County','Furnas County') group by ss_ticket_number,ss_customer_sk) dj,customer where dj.ss_customer_sk = customer.c_customer_sk and cnt between 1 and 5 order by cnt desc
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select c_last_name ,c_first_name ,c_salutation ,c_preferred_cust_flag ,ss_ticket_number ,cnt from (select ss_ticket_number ,ss_customer_sk ,count(*) cnt from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and date_dim.d_dom between 1 and 2 and (household_demographics.hd_buy_potential = '1001-5000' or household_demographics.hd_buy_potential = '5001-10000') and household_demographics.hd_vehicle_count > 0 and case when household_demographics.hd_vehicle_count > 0 then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end > 1 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_county in ('Kittitas County','Adams County','Richland County','Furnas County') group by ss_ticket_number,ss_customer_sk) dj,customer where dj.ss_customer_sk = customer.c_customer_sk and cnt between 1 and 5 order by cnt desc
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 11 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_45]
+ compressed:false
+ Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Select Operator [SEL_44]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_43]
+ key expressions:_col5 (type: bigint)
+ sort order:-
+ Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int)
+ Select Operator [SEL_42]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_69]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_40]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ | Select Operator [SEL_36]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_65]
+ | predicate:c_customer_sk is not null (type: boolean)
+ | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_35]
+ | alias:customer
+ | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_38]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 3038 Data size: 3399902 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: bigint)
+ Select Operator [SEL_32]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 3038 Data size: 3399902 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_60]
+ predicate:_col2 BETWEEN 1 AND 5 (type: boolean)
+ Statistics:Num rows: 3038 Data size: 3399902 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_31]
+ | aggregations:["count(VALUE._col0)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 6076 Data size: 6799805 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_30]
+ key expressions:_col0 (type: int), _col1 (type: int)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ sort order:++
+ Statistics:Num rows: 12152 Data size: 13599611 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: bigint)
+ Group By Operator [GBY_29]
+ aggregations:["count()"]
+ keys:_col1 (type: int), _col4 (type: int)
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 12152 Data size: 13599611 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_68]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col4"]
+ | Statistics:Num rows: 12152 Data size: 13599611 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_26]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 400 Data size: 42800 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_10]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 400 Data size: 42800 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_64]
+ | predicate:(((((hd_buy_potential = '1001-5000') or (hd_buy_potential = '5001-10000')) and (hd_vehicle_count > 0)) and (CASE WHEN ((hd_vehicle_count > 0)) THEN ((UDFToDouble(hd_dep_count) / UDFToDouble(hd_vehicle_count))) ELSE (null) END > 1.0)) and hd_demo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 400 Data size: 42800 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_8]
+ | alias:household_demographics
+ | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_24]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col4 (type: int)
+ Merge Join Operator [MERGEJOIN_67]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col4"]
+ | Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_21]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_63]
+ | predicate:((s_county) IN ('Kittitas County', 'Adams County', 'Richland County', 'Furnas County') and s_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_19]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: int), _col4 (type: int)
+ Merge Join Operator [MERGEJOIN_66]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_14]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_61]
+ | predicate:(((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_hdemo_sk is not null) and ss_customer_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_16]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_62]
+ predicate:((d_dom BETWEEN 1 AND 2 and (d_year) IN (1998, 1999, 2000)) and d_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:date_dim
+ Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query75.q.out b/ql/src/test/results/clientpositive/perf/query75.q.out
new file mode 100644
index 0000000..ec7312c
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query75.q.out
@@ -0,0 +1,719 @@
+PREHOOK: query: explain WITH all_sales AS ( SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,SUM(sales_cnt) AS sales_cnt ,SUM(sales_amt) AS sales_amt FROM (SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,cs_quantity - COALESCE(cr_return_quantity,0) AS sales_cnt ,cs_ext_sales_price - COALESCE(cr_return_amount,0.0) AS sales_amt FROM catalog_sales JOIN item ON i_item_sk=cs_item_sk JOIN date_dim ON d_date_sk=cs_sold_date_sk LEFT JOIN catalog_returns ON (cs_order_number=cr_order_number AND cs_item_sk=cr_item_sk) WHERE i_category='Sports' UNION ALL SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,ss_quantity - COALESCE(sr_return_quantity,0) AS sales_cnt ,ss_ext_sales_price - COALESCE(sr_return_amt,0.0) AS sales_amt FROM store_sales JOIN item ON i_item_sk=ss_item_sk JOIN date_dim ON d_date_sk=ss_sold_date_sk LEFT JOIN store_returns ON (ss_ticket_number=sr_ticket_number AND ss_item_sk=sr_item_sk) WHERE i_category='Sports' UNION ALL SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,ws_quantity - COALESCE(wr_return_quantity,0) AS sales_cnt ,ws_ext_sales_price - COALESCE(wr_return_amt,0.0) AS sales_amt FROM web_sales JOIN item ON i_item_sk=ws_item_sk JOIN date_dim ON d_date_sk=ws_sold_date_sk LEFT JOIN web_returns ON (ws_order_number=wr_order_number AND ws_item_sk=wr_item_sk) WHERE i_category='Sports') sales_detail GROUP BY d_year, i_brand_id, i_class_id, i_category_id, i_manufact_id) SELECT prev_yr.d_year AS prev_year ,curr_yr.d_year AS year ,curr_yr.i_brand_id ,curr_yr.i_class_id ,curr_yr.i_category_id ,curr_yr.i_manufact_id ,prev_yr.sales_cnt AS prev_yr_cnt ,curr_yr.sales_cnt AS curr_yr_cnt ,curr_yr.sales_cnt-prev_yr.sales_cnt AS sales_cnt_diff ,curr_yr.sales_amt-prev_yr.sales_amt AS sales_amt_diff FROM all_sales curr_yr, all_sales prev_yr WHERE curr_yr.i_brand_id=prev_yr.i_brand_id AND curr_yr.i_class_id=prev_yr.i_class_id AND curr_yr.i_category_id=prev_yr.i_category_id AND curr_yr.i_manufact_id=prev_yr.i_manufact_id AND curr_yr.d_year=2002 AND prev_yr.d_year=2002-1 AND CAST(curr_yr.sales_cnt AS DECIMAL(17,2))/CAST(prev_yr.sales_cnt AS DECIMAL(17,2))<0.9 ORDER BY sales_cnt_diff limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain WITH all_sales AS ( SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,SUM(sales_cnt) AS sales_cnt ,SUM(sales_amt) AS sales_amt FROM (SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,cs_quantity - COALESCE(cr_return_quantity,0) AS sales_cnt ,cs_ext_sales_price - COALESCE(cr_return_amount,0.0) AS sales_amt FROM catalog_sales JOIN item ON i_item_sk=cs_item_sk JOIN date_dim ON d_date_sk=cs_sold_date_sk LEFT JOIN catalog_returns ON (cs_order_number=cr_order_number AND cs_item_sk=cr_item_sk) WHERE i_category='Sports' UNION ALL SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,ss_quantity - COALESCE(sr_return_quantity,0) AS sales_cnt ,ss_ext_sales_price - COALESCE(sr_return_amt,0.0) AS sales_amt FROM store_sales JOIN item ON i_item_sk=ss_item_sk JOIN date_dim ON d_date_sk=ss_sold_date_sk LEFT JOIN store_returns ON (ss_ticket_number=sr_ticket_number AND ss_item_sk=sr_item_sk) WHERE i_category='Sports' UNION ALL SELECT d_year ,i_brand_id ,i_class_id ,i_category_id ,i_manufact_id ,ws_quantity - COALESCE(wr_return_quantity,0) AS sales_cnt ,ws_ext_sales_price - COALESCE(wr_return_amt,0.0) AS sales_amt FROM web_sales JOIN item ON i_item_sk=ws_item_sk JOIN date_dim ON d_date_sk=ws_sold_date_sk LEFT JOIN web_returns ON (ws_order_number=wr_order_number AND ws_item_sk=wr_item_sk) WHERE i_category='Sports') sales_detail GROUP BY d_year, i_brand_id, i_class_id, i_category_id, i_manufact_id) SELECT prev_yr.d_year AS prev_year ,curr_yr.d_year AS year ,curr_yr.i_brand_id ,curr_yr.i_class_id ,curr_yr.i_category_id ,curr_yr.i_manufact_id ,prev_yr.sales_cnt AS prev_yr_cnt ,curr_yr.sales_cnt AS curr_yr_cnt ,curr_yr.sales_cnt-prev_yr.sales_cnt AS sales_cnt_diff ,curr_yr.sales_amt-prev_yr.sales_amt AS sales_amt_diff FROM all_sales curr_yr, all_sales prev_yr WHERE curr_yr.i_brand_id=prev_yr.i_brand_id AND curr_yr.i_class_id=prev_yr.i_class_id AND curr_yr.i_category_id=prev_yr.i_category_id AND curr_yr.i_manufact_id=prev_yr.i_manufact_id AND curr_yr.d_year=2002 AND prev_yr.d_year=2002-1 AND CAST(curr_yr.sales_cnt AS DECIMAL(17,2))/CAST(prev_yr.sales_cnt AS DECIMAL(17,2))<0.9 ORDER BY sales_cnt_diff limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 13 <- Map 12 (SIMPLE_EDGE), Map 16 (SIMPLE_EDGE)
+Reducer 14 <- Map 17 (SIMPLE_EDGE), Reducer 13 (SIMPLE_EDGE)
+Reducer 15 <- Map 18 (SIMPLE_EDGE), Reducer 14 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 9 (SIMPLE_EDGE)
+Reducer 20 <- Map 19 (SIMPLE_EDGE), Map 23 (SIMPLE_EDGE)
+Reducer 21 <- Map 24 (SIMPLE_EDGE), Reducer 20 (SIMPLE_EDGE)
+Reducer 22 <- Map 25 (SIMPLE_EDGE), Reducer 21 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 27 <- Map 26 (SIMPLE_EDGE), Map 32 (SIMPLE_EDGE)
+Reducer 28 <- Map 33 (SIMPLE_EDGE), Reducer 27 (SIMPLE_EDGE)
+Reducer 29 <- Map 34 (SIMPLE_EDGE), Reducer 28 (SIMPLE_EDGE), Union 30 (CONTAINS)
+Reducer 3 <- Map 10 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 31 <- Union 30 (SIMPLE_EDGE)
+Reducer 36 <- Map 35 (SIMPLE_EDGE), Map 39 (SIMPLE_EDGE)
+Reducer 37 <- Map 40 (SIMPLE_EDGE), Reducer 36 (SIMPLE_EDGE)
+Reducer 38 <- Map 41 (SIMPLE_EDGE), Reducer 37 (SIMPLE_EDGE), Union 30 (CONTAINS)
+Reducer 4 <- Map 11 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE), Union 5 (CONTAINS)
+Reducer 43 <- Map 42 (SIMPLE_EDGE), Map 46 (SIMPLE_EDGE)
+Reducer 44 <- Map 47 (SIMPLE_EDGE), Reducer 43 (SIMPLE_EDGE)
+Reducer 45 <- Map 48 (SIMPLE_EDGE), Reducer 44 (SIMPLE_EDGE), Union 30 (CONTAINS)
+Reducer 6 <- Union 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 31 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Reducer 7 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 8
+ File Output Operator [FS_170]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 111900 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_169]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 111900 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_168]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
+ | Statistics:Num rows: 12152 Data size: 13598865 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_167]
+ key expressions:_col8 (type: bigint)
+ sort order:+
+ Statistics:Num rows: 12152 Data size: 13598865 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: bigint), _col7 (type: bigint), _col9 (type: double)
+ Select Operator [SEL_166]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"]
+ Statistics:Num rows: 12152 Data size: 13598865 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_231]
+ predicate:((CAST( _col5 AS decimal(17,2)) / CAST( _col12 AS decimal(17,2))) < 0.9) (type: boolean)
+ Statistics:Num rows: 12152 Data size: 13598865 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_274]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)","1":"_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col12","_col13"]
+ | Statistics:Num rows: 36458 Data size: 40798834 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 31 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_163]
+ | key expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | Map-reduce partition columns:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | sort order:++++
+ | Statistics:Num rows: 33144 Data size: 37089849 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: int), _col5 (type: bigint), _col6 (type: double)
+ | Group By Operator [GBY_158]
+ | | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
+ | | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: int), KEY._col4 (type: int)
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | | Statistics:Num rows: 33144 Data size: 37089849 Basic stats: COMPLETE Column stats: NONE
+ | |<-Union 30 [SIMPLE_EDGE]
+ | |<-Reducer 29 [CONTAINS]
+ | | Reduce Output Operator [RS_157]
+ | | key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | | sort order:+++++
+ | | Statistics:Num rows: 66288 Data size: 74179698 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col5 (type: bigint), _col6 (type: double)
+ | | Group By Operator [GBY_156]
+ | | aggregations:["sum(_col5)","sum(_col6)"]
+ | | keys:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | | Statistics:Num rows: 66288 Data size: 74179698 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_103]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ | | Merge Join Operator [MERGEJOIN_267]
+ | | | condition map:[{"":"Left Outer Join0 to 1"}]
+ | | | keys:{"0":"_col2 (type: int), _col1 (type: int)","1":"_col1 (type: int), _col0 (type: int)"}
+ | | | outputColumnNames:["_col3","_col4","_col6","_col7","_col8","_col10","_col12","_col15","_col16"]
+ | | | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 34 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_101]
+ | | | key expressions:_col1 (type: int), _col0 (type: int)
+ | | | Map-reduce partition columns:_col1 (type: int), _col0 (type: int)
+ | | | sort order:++
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | value expressions:_col2 (type: int), _col3 (type: decimal(7,2))
+ | | | Select Operator [SEL_89]
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | TableScan [TS_88]
+ | | | alias:catalog_returns
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | |<-Reducer 28 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_100]
+ | | key expressions:_col2 (type: int), _col1 (type: int)
+ | | Map-reduce partition columns:_col2 (type: int), _col1 (type: int)
+ | | sort order:++
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col3 (type: int), _col4 (type: decimal(7,2)), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col10 (type: int), _col12 (type: int)
+ | | Merge Join Operator [MERGEJOIN_266]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10","_col12"]
+ | | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 33 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_98]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:2001 (type: int)
+ | | | Select Operator [SEL_87]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_246]
+ | | | predicate:((d_year = 2001) and d_date_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_85]
+ | | | alias:date_dim
+ | | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 27 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_96]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 7940 Data size: 11405340 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col10 (type: int)
+ | | Merge Join Operator [MERGEJOIN_265]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+ | | | Statistics:Num rows: 7940 Data size: 11405340 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 26 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_91]
+ | | | key expressions:_col1 (type: int)
+ | | | Map-reduce partition columns:_col1 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2))
+ | | | Select Operator [SEL_81]
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | Filter Operator [FIL_244]
+ | | | predicate:(cs_item_sk is not null and cs_sold_date_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | TableScan [TS_80]
+ | | | alias:catalog_sales
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | |<-Map 32 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_93]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: int)
+ | | Select Operator [SEL_84]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col5"]
+ | | Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_245]
+ | | predicate:((((((i_category = 'Sports') and i_item_sk is not null) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) (type: boolean)
+ | | Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_82]
+ | | alias:item
+ | | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 38 [CONTAINS]
+ | | Reduce Output Operator [RS_157]
+ | | key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | | sort order:+++++
+ | | Statistics:Num rows: 66288 Data size: 74179698 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col5 (type: bigint), _col6 (type: double)
+ | | Group By Operator [GBY_156]
+ | | aggregations:["sum(_col5)","sum(_col6)"]
+ | | keys:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | | Statistics:Num rows: 66288 Data size: 74179698 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_127]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ | | Merge Join Operator [MERGEJOIN_270]
+ | | | condition map:[{"":"Left Outer Join0 to 1"}]
+ | | | keys:{"0":"_col2 (type: int), _col1 (type: int)","1":"_col1 (type: int), _col0 (type: int)"}
+ | | | outputColumnNames:["_col3","_col4","_col6","_col7","_col8","_col10","_col12","_col15","_col16"]
+ | | | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 41 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_125]
+ | | | key expressions:_col1 (type: int), _col0 (type: int)
+ | | | Map-reduce partition columns:_col1 (type: int), _col0 (type: int)
+ | | | sort order:++
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | value expressions:_col2 (type: int), _col3 (type: decimal(7,2))
+ | | | Select Operator [SEL_113]
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | TableScan [TS_112]
+ | | | alias:store_returns
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | |<-Reducer 37 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_124]
+ | | key expressions:_col2 (type: int), _col1 (type: int)
+ | | Map-reduce partition columns:_col2 (type: int), _col1 (type: int)
+ | | sort order:++
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col3 (type: int), _col4 (type: decimal(7,2)), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col10 (type: int), _col12 (type: int)
+ | | Merge Join Operator [MERGEJOIN_269]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10","_col12"]
+ | | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 40 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_122]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:2001 (type: int)
+ | | | Select Operator [SEL_111]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_250]
+ | | | predicate:((d_year = 2001) and d_date_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_109]
+ | | | alias:date_dim
+ | | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 36 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_120]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 7940 Data size: 11405340 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col10 (type: int)
+ | | Merge Join Operator [MERGEJOIN_268]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+ | | | Statistics:Num rows: 7940 Data size: 11405340 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 35 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_115]
+ | | | key expressions:_col1 (type: int)
+ | | | Map-reduce partition columns:_col1 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2))
+ | | | Select Operator [SEL_105]
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | Filter Operator [FIL_248]
+ | | | predicate:(ss_item_sk is not null and ss_sold_date_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | TableScan [TS_104]
+ | | | alias:store_sales
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | |<-Map 39 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_117]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: int)
+ | | Select Operator [SEL_108]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col5"]
+ | | Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_249]
+ | | predicate:((((((i_category = 'Sports') and i_item_sk is not null) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) (type: boolean)
+ | | Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_106]
+ | | alias:item
+ | | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 45 [CONTAINS]
+ | Reduce Output Operator [RS_157]
+ | key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | sort order:+++++
+ | Statistics:Num rows: 66288 Data size: 74179698 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col5 (type: bigint), _col6 (type: double)
+ | Group By Operator [GBY_156]
+ | aggregations:["sum(_col5)","sum(_col6)"]
+ | keys:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 66288 Data size: 74179698 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_153]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_273]
+ | | condition map:[{"":"Left Outer Join0 to 1"}]
+ | | keys:{"0":"_col2 (type: int), _col1 (type: int)","1":"_col1 (type: int), _col0 (type: int)"}
+ | | outputColumnNames:["_col3","_col4","_col6","_col7","_col8","_col10","_col12","_col15","_col16"]
+ | | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 48 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_151]
+ | | key expressions:_col1 (type: int), _col0 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int), _col0 (type: int)
+ | | sort order:++
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col2 (type: int), _col3 (type: decimal(7,2))
+ | | Select Operator [SEL_139]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_138]
+ | | alias:web_returns
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Reducer 44 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_150]
+ | key expressions:_col2 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col2 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: int), _col4 (type: decimal(7,2)), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col10 (type: int), _col12 (type: int)
+ | Merge Join Operator [MERGEJOIN_272]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10","_col12"]
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 47 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_148]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:2001 (type: int)
+ | | Select Operator [SEL_137]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_254]
+ | | predicate:((d_year = 2001) and d_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_135]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 43 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_146]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 7940 Data size: 11405340 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col10 (type: int)
+ | Merge Join Operator [MERGEJOIN_271]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+ | | Statistics:Num rows: 7940 Data size: 11405340 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 42 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_141]
+ | | key expressions:_col1 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2))
+ | | Select Operator [SEL_131]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_252]
+ | | predicate:(ws_item_sk is not null and ws_sold_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_130]
+ | | alias:web_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 46 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_143]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: int)
+ | Select Operator [SEL_134]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col5"]
+ | Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_253]
+ | predicate:((((((i_category = 'Sports') and i_item_sk is not null) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) (type: boolean)
+ | Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_132]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_161]
+ key expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ Map-reduce partition columns:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ sort order:++++
+ Statistics:Num rows: 33144 Data size: 37089849 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col5 (type: bigint), _col6 (type: double)
+ Group By Operator [GBY_78]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: int), KEY._col4 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 33144 Data size: 37089849 Basic stats: COMPLETE Column stats: NONE
+ |<-Union 5 [SIMPLE_EDGE]
+ |<-Reducer 15 [CONTAINS]
+ | Reduce Output Operator [RS_77]
+ | key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | sort order:+++++
+ | Statistics:Num rows: 66288 Data size: 74179698 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col5 (type: bigint), _col6 (type: double)
+ | Group By Operator [GBY_76]
+ | aggregations:["sum(_col5)","sum(_col6)"]
+ | keys:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 66288 Data size: 74179698 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_47]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_261]
+ | | condition map:[{"":"Left Outer Join0 to 1"}]
+ | | keys:{"0":"_col2 (type: int), _col1 (type: int)","1":"_col1 (type: int), _col0 (type: int)"}
+ | | outputColumnNames:["_col3","_col4","_col6","_col7","_col8","_col10","_col12","_col15","_col16"]
+ | | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 18 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_45]
+ | | key expressions:_col1 (type: int), _col0 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int), _col0 (type: int)
+ | | sort order:++
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col2 (type: int), _col3 (type: decimal(7,2))
+ | | Select Operator [SEL_33]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_32]
+ | | alias:store_returns
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Reducer 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_44]
+ | key expressions:_col2 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col2 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: int), _col4 (type: decimal(7,2)), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col10 (type: int), _col12 (type: int)
+ | Merge Join Operator [MERGEJOIN_260]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10","_col12"]
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 17 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_42]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:2002 (type: int)
+ | | Select Operator [SEL_31]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_238]
+ | | predicate:((d_year = 2002) and d_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_29]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_40]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 7940 Data size: 11405340 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col10 (type: int)
+ | Merge Join Operator [MERGEJOIN_259]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+ | | Statistics:Num rows: 7940 Data size: 11405340 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 12 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_35]
+ | | key expressions:_col1 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2))
+ | | Select Operator [SEL_25]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_236]
+ | | predicate:(ss_item_sk is not null and ss_sold_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_24]
+ | | alias:store_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 16 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_37]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: int)
+ | Select Operator [SEL_28]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col5"]
+ | Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_237]
+ | predicate:((((((i_category = 'Sports') and i_item_sk is not null) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) (type: boolean)
+ | Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_26]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 22 [CONTAINS]
+ | Reduce Output Operator [RS_77]
+ | key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | sort order:+++++
+ | Statistics:Num rows: 66288 Data size: 74179698 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col5 (type: bigint), _col6 (type: double)
+ | Group By Operator [GBY_76]
+ | aggregations:["sum(_col5)","sum(_col6)"]
+ | keys:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 66288 Data size: 74179698 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_73]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_264]
+ | | condition map:[{"":"Left Outer Join0 to 1"}]
+ | | keys:{"0":"_col2 (type: int), _col1 (type: int)","1":"_col1 (type: int), _col0 (type: int)"}
+ | | outputColumnNames:["_col3","_col4","_col6","_col7","_col8","_col10","_col12","_col15","_col16"]
+ | | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 25 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_71]
+ | | key expressions:_col1 (type: int), _col0 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int), _col0 (type: int)
+ | | sort order:++
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col2 (type: int), _col3 (type: decimal(7,2))
+ | | Select Operator [SEL_59]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_58]
+ | | alias:web_returns
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Reducer 21 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_70]
+ | key expressions:_col2 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col2 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: int), _col4 (type: decimal(7,2)), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col10 (type: int), _col12 (type: int)
+ | Merge Join Operator [MERGEJOIN_263]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10","_col12"]
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 24 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_68]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:2002 (type: int)
+ | | Select Operator [SEL_57]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_242]
+ | | predicate:((d_year = 2002) and d_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_55]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 20 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_66]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 7940 Data size: 11405340 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col10 (type: int)
+ | Merge Join Operator [MERGEJOIN_262]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+ | | Statistics:Num rows: 7940 Data size: 11405340 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 19 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_61]
+ | | key expressions:_col1 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2))
+ | | Select Operator [SEL_51]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_240]
+ | | predicate:(ws_item_sk is not null and ws_sold_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_50]
+ | | alias:web_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 23 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_63]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: int)
+ | Select Operator [SEL_54]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col5"]
+ | Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_241]
+ | predicate:((((((i_category = 'Sports') and i_item_sk is not null) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) (type: boolean)
+ | Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_52]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [CONTAINS]
+ Reduce Output Operator [RS_77]
+ key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ sort order:+++++
+ Statistics:Num rows: 66288 Data size: 74179698 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: bigint), _col6 (type: double)
+ Group By Operator [GBY_76]
+ aggregations:["sum(_col5)","sum(_col6)"]
+ keys:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 66288 Data size: 74179698 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_23]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_258]
+ | condition map:[{"":"Left Outer Join0 to 1"}]
+ | keys:{"0":"_col2 (type: int), _col1 (type: int)","1":"_col1 (type: int), _col0 (type: int)"}
+ | outputColumnNames:["_col3","_col4","_col6","_col7","_col8","_col10","_col12","_col15","_col16"]
+ | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_21]
+ | key expressions:_col1 (type: int), _col0 (type: int)
+ | Map-reduce partition columns:_col1 (type: int), _col0 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col2 (type: int), _col3 (type: decimal(7,2))
+ | Select Operator [SEL_9]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_8]
+ | alias:catalog_returns
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col2 (type: int), _col1 (type: int)
+ Map-reduce partition columns:_col2 (type: int), _col1 (type: int)
+ sort order:++
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: int), _col4 (type: decimal(7,2)), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col10 (type: int), _col12 (type: int)
+ Merge Join Operator [MERGEJOIN_257]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10","_col12"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_18]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:2002 (type: int)
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_234]
+ | predicate:((d_year = 2002) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_16]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 7940 Data size: 11405340 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)), _col6 (type: int), _col7 (type: int), _col8 (type: int), _col10 (type: int)
+ Merge Join Operator [MERGEJOIN_256]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col10"]
+ | Statistics:Num rows: 7940 Data size: 11405340 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_11]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_232]
+ | predicate:(cs_item_sk is not null and cs_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:catalog_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_13]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: int)
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col5"]
+ Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_233]
+ predicate:((((((i_category = 'Sports') and i_item_sk is not null) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) (type: boolean)
+ Statistics:Num rows: 7219 Data size: 10368491 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:item
+ Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query76.q.out b/ql/src/test/results/clientpositive/perf/query76.q.out
new file mode 100644
index 0000000..8ac297f
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query76.q.out
@@ -0,0 +1,284 @@
+PREHOOK: query: explain select channel, col_name, d_year, d_qoy, i_category, COUNT(*) sales_cnt, SUM(ext_sales_price) sales_amt FROM ( SELECT 'store' as channel, 'ss_addr_sk' col_name, d_year, d_qoy, i_category, ss_ext_sales_price ext_sales_price FROM store_sales, item, date_dim WHERE ss_addr_sk IS NULL AND store_sales.ss_sold_date_sk=date_dim.d_date_sk AND store_sales.ss_item_sk=item.i_item_sk UNION ALL SELECT 'web' as channel, 'ws_web_page_sk' col_name, d_year, d_qoy, i_category, ws_ext_sales_price ext_sales_price FROM web_sales, item, date_dim WHERE ws_web_page_sk IS NULL AND web_sales.ws_sold_date_sk=date_dim.d_date_sk AND web_sales.ws_item_sk=item.i_item_sk UNION ALL SELECT 'catalog' as channel, 'cs_warehouse_sk' col_name, d_year, d_qoy, i_category, cs_ext_sales_price ext_sales_price FROM catalog_sales, item, date_dim WHERE cs_warehouse_sk IS NULL AND catalog_sales.cs_sold_date_sk=date_dim.d_date_sk AND catalog_sales.cs_item_sk=item.i_item_sk) foo GROUP BY channel, col_name, d_year, d_qoy, i_category ORDER BY channel, col_name, d_year, d_qoy, i_category limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select channel, col_name, d_year, d_qoy, i_category, COUNT(*) sales_cnt, SUM(ext_sales_price) sales_amt FROM ( SELECT 'store' as channel, 'ss_addr_sk' col_name, d_year, d_qoy, i_category, ss_ext_sales_price ext_sales_price FROM store_sales, item, date_dim WHERE ss_addr_sk IS NULL AND store_sales.ss_sold_date_sk=date_dim.d_date_sk AND store_sales.ss_item_sk=item.i_item_sk UNION ALL SELECT 'web' as channel, 'ws_web_page_sk' col_name, d_year, d_qoy, i_category, ws_ext_sales_price ext_sales_price FROM web_sales, item, date_dim WHERE ws_web_page_sk IS NULL AND web_sales.ws_sold_date_sk=date_dim.d_date_sk AND web_sales.ws_item_sk=item.i_item_sk UNION ALL SELECT 'catalog' as channel, 'cs_warehouse_sk' col_name, d_year, d_qoy, i_category, cs_ext_sales_price ext_sales_price FROM catalog_sales, item, date_dim WHERE cs_warehouse_sk IS NULL AND catalog_sales.cs_sold_date_sk=date_dim.d_date_sk AND catalog_sales.cs_item_sk=item.i_item_sk) foo GROUP BY channel, col_name, d_year, d_qoy, i_category ORDER BY channel, col_name, d_year, d_qoy, i_category limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Map 12 (SIMPLE_EDGE), Map 9 (SIMPLE_EDGE)
+Reducer 11 <- Map 13 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE), Union 4 (CONTAINS)
+Reducer 15 <- Map 14 (SIMPLE_EDGE), Map 17 (SIMPLE_EDGE)
+Reducer 16 <- Map 18 (SIMPLE_EDGE), Reducer 15 (SIMPLE_EDGE), Union 4 (CONTAINS)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 3 <- Map 8 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE), Union 4 (CONTAINS)
+Reducer 5 <- Union 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 6
+ File Output Operator [FS_65]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_64]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_63]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 419265 Data size: 602181138 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_62]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string)
+ sort order:+++++
+ Statistics:Num rows: 419265 Data size: 602181138 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: bigint), _col6 (type: decimal(17,2))
+ Group By Operator [GBY_60]
+ | aggregations:["count(VALUE._col0)","sum(VALUE._col1)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: int), KEY._col3 (type: int), KEY._col4 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 419265 Data size: 602181138 Basic stats: COMPLETE Column stats: NONE
+ |<-Union 4 [SIMPLE_EDGE]
+ |<-Reducer 11 [CONTAINS]
+ | Reduce Output Operator [RS_59]
+ | key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string)
+ | Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string)
+ | sort order:+++++
+ | Statistics:Num rows: 838530 Data size: 1204362276 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col5 (type: bigint), _col6 (type: decimal(17,2))
+ | Group By Operator [GBY_58]
+ | aggregations:["count()","sum(_col5)"]
+ | keys:_col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 838530 Data size: 1204362276 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_35]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_93]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col3","_col5","_col7","_col8"]
+ | | Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 13 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_33]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: int)
+ | | Select Operator [SEL_24]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_86]
+ | | predicate:d_date_sk is not null (type: boolean)
+ | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_23]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_31]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: decimal(7,2)), _col5 (type: string)
+ | Merge Join Operator [MERGEJOIN_92]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col0","_col3","_col5"]
+ | | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 12 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_28]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string)
+ | | Select Operator [SEL_22]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_85]
+ | | predicate:i_item_sk is not null (type: boolean)
+ | | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_21]
+ | | alias:item
+ | | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_26]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col3 (type: decimal(7,2))
+ | Select Operator [SEL_20]
+ | outputColumnNames:["_col0","_col1","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_84]
+ | predicate:((ws_web_page_sk is null and ws_item_sk is not null) and ws_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_18]
+ | alias:web_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 16 [CONTAINS]
+ | Reduce Output Operator [RS_59]
+ | key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string)
+ | Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string)
+ | sort order:+++++
+ | Statistics:Num rows: 838530 Data size: 1204362276 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col5 (type: bigint), _col6 (type: decimal(17,2))
+ | Group By Operator [GBY_58]
+ | aggregations:["count()","sum(_col5)"]
+ | keys:_col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 838530 Data size: 1204362276 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_55]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_95]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col3","_col5","_col7","_col8"]
+ | | Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 18 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_53]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: int)
+ | | Select Operator [SEL_44]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_89]
+ | | predicate:d_date_sk is not null (type: boolean)
+ | | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_43]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_51]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: decimal(7,2)), _col5 (type: string)
+ | Merge Join Operator [MERGEJOIN_94]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col0","_col3","_col5"]
+ | | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 14 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_46]
+ | | key expressions:_col2 (type: int)
+ | | Map-reduce partition columns:_col2 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col0 (type: int), _col3 (type: decimal(7,2))
+ | | Select Operator [SEL_40]
+ | | outputColumnNames:["_col0","_col2","_col3"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_87]
+ | | predicate:((cs_warehouse_sk is null and cs_item_sk is not null) and cs_sold_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_38]
+ | | alias:catalog_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_48]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_42]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_88]
+ | predicate:i_item_sk is not null (type: boolean)
+ | Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_41]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [CONTAINS]
+ Reduce Output Operator [RS_59]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string)
+ sort order:+++++
+ Statistics:Num rows: 838530 Data size: 1204362276 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: bigint), _col6 (type: decimal(17,2))
+ Group By Operator [GBY_58]
+ aggregations:["count()","sum(_col5)"]
+ keys:_col0 (type: string), _col1 (type: string), _col2 (type: int), _col3 (type: int), _col4 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 838530 Data size: 1204362276 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_17]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_91]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col3","_col5","_col7","_col8"]
+ | Statistics:Num rows: 279510 Data size: 401454092 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_15]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int)
+ | Select Operator [SEL_6]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_83]
+ | predicate:d_date_sk is not null (type: boolean)
+ | Statistics:Num rows: 36525 Data size: 40871475 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_13]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: decimal(7,2)), _col5 (type: string)
+ Merge Join Operator [MERGEJOIN_90]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col3","_col5"]
+ | Statistics:Num rows: 254100 Data size: 364958258 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_8]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col3 (type: decimal(7,2))
+ | Select Operator [SEL_2]
+ | outputColumnNames:["_col0","_col1","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_81]
+ | predicate:((ss_addr_sk is null and ss_item_sk is not null) and ss_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_10]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string)
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_82]
+ predicate:i_item_sk is not null (type: boolean)
+ Statistics:Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_3]
+ alias:item
+ Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query79.q.out b/ql/src/test/results/clientpositive/perf/query79.q.out
new file mode 100644
index 0000000..74be131
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query79.q.out
@@ -0,0 +1,181 @@
+PREHOOK: query: explain select c_last_name,c_first_name,substr(s_city,1,30) sub,ss_ticket_number,amt,profit from (select ss_ticket_number ,ss_customer_sk ,store.s_city ,sum(ss_coupon_amt) amt ,sum(ss_net_profit) profit from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and (household_demographics.hd_dep_count = 8 or household_demographics.hd_vehicle_count > 0) and date_dim.d_dow = 1 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_number_employees between 200 and 295 group by ss_ticket_number,ss_customer_sk,ss_addr_sk,store.s_city) ms,customer where ms.ss_customer_sk = customer.c_customer_sk order by c_last_name,c_first_name,sub, profit limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select c_last_name,c_first_name,substr(s_city,1,30) sub,ss_ticket_number,amt,profit from (select ss_ticket_number ,ss_customer_sk ,store.s_city ,sum(ss_coupon_amt) amt ,sum(ss_net_profit) profit from store_sales,date_dim,store,household_demographics where store_sales.ss_sold_date_sk = date_dim.d_date_sk and store_sales.ss_store_sk = store.s_store_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and (household_demographics.hd_dep_count = 8 or household_demographics.hd_vehicle_count > 0) and date_dim.d_dow = 1 and date_dim.d_year in (1998,1998+1,1998+2) and store.s_number_employees between 200 and 295 group by ss_ticket_number,ss_customer_sk,ss_addr_sk,store.s_city) ms,customer where ms.ss_customer_sk = customer.c_customer_sk order by c_last_name,c_first_name,sub, profit limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 11 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_43]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_42]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_41]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_40]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col5 (type: decimal(17,2))
+ sort order:++++
+ Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: int), _col4 (type: decimal(17,2))
+ Select Operator [SEL_39]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_66]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col3","_col4","_col6","_col7"]
+ | Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_37]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string)
+ | Select Operator [SEL_33]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_62]
+ | predicate:c_customer_sk is not null (type: boolean)
+ | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_32]
+ | alias:customer
+ | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_35]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 6076 Data size: 6799805 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: string), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2))
+ Select Operator [SEL_30]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 6076 Data size: 6799805 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_29]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: int), KEY._col2 (type: int), KEY._col3 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 6076 Data size: 6799805 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_28]
+ key expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col3 (type: string)
+ sort order:++++
+ Statistics:Num rows: 12152 Data size: 13599611 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: decimal(17,2)), _col5 (type: decimal(17,2))
+ Group By Operator [GBY_27]
+ aggregations:["sum(_col6)","sum(_col7)"]
+ keys:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col13 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 12152 Data size: 13599611 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_26]
+ outputColumnNames:["_col1","_col3","_col5","_col13","_col6","_col7"]
+ Statistics:Num rows: 12152 Data size: 13599611 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_65]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col5","_col6","_col7","_col13"]
+ | Statistics:Num rows: 12152 Data size: 13599611 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_24]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 3000 Data size: 321000 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_10]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 3000 Data size: 321000 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_61]
+ | predicate:(((hd_dep_count = 8) or (hd_vehicle_count > 0)) and hd_demo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 3000 Data size: 321000 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_8]
+ | alias:household_demographics
+ | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_22]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2)), _col13 (type: string)
+ Merge Join Operator [MERGEJOIN_64]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col5","_col6","_col7","_col13"]
+ | Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_19]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: string)
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0","_col2"]
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_60]
+ | predicate:(s_number_employees BETWEEN 200 AND 295 and s_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_17]
+ key expressions:_col4 (type: int)
+ Map-reduce partition columns:_col4 (type: int)
+ sort order:+
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_63]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_12]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col5 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_58]
+ | predicate:(((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_hdemo_sk is not null) and ss_customer_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_14]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_59]
+ predicate:(((d_dow = 1) and (d_year) IN (1998, 1999, 2000)) and d_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:date_dim
+ Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query80.q.out b/ql/src/test/results/clientpositive/perf/query80.q.out
new file mode 100644
index 0000000..c02bdb6
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query80.q.out
@@ -0,0 +1,602 @@
+PREHOOK: query: explain with ssr as (select s_store_id as store_id, sum(ss_ext_sales_price) as sales, sum(coalesce(sr_return_amt, 0)) as returns, sum(ss_net_profit - coalesce(sr_net_loss, 0)) as profit from store_sales left outer join store_returns on (ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number), date_dim, store, item, promotion where ss_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and ss_store_sk = s_store_sk and ss_item_sk = i_item_sk and i_current_price > 50 and ss_promo_sk = p_promo_sk and p_channel_tv = 'N' group by s_store_id) , csr as (select cp_catalog_page_id as catalog_page_id, sum(cs_ext_sales_price) as sales, sum(coalesce(cr_return_amount, 0)) as returns, sum(cs_net_profit - coalesce(cr_net_loss, 0)) as profit from catalog_sales left outer join catalog_returns on (cs_item_sk = cr_item_sk and cs_order_number = cr_order_number), date_dim, catalog_page, item, promotion where cs_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and cs_catalog_page_sk = cp_catalog_page_sk and cs_item_sk = i_item_sk and i_current_price > 50 and cs_promo_sk = p_promo_sk and p_channel_tv = 'N' group by cp_catalog_page_id) , wsr as (select web_site_id, sum(ws_ext_sales_price) as sales, sum(coalesce(wr_return_amt, 0)) as returns, sum(ws_net_profit - coalesce(wr_net_loss, 0)) as profit from web_sales left outer join web_returns on (ws_item_sk = wr_item_sk and ws_order_number = wr_order_number), date_dim, web_site, item, promotion where ws_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and ws_web_site_sk = web_site_sk and ws_item_sk = i_item_sk and i_current_price > 50 and ws_promo_sk = p_promo_sk and p_channel_tv = 'N' group by web_site_id) select channel , id , sum(sales) as sales , sum(returns) as returns , sum(profit) as profit from (select 'store channel' as channel , concat('store', store_id) as id , sales , returns , profit from ssr union all select 'catalog channel' as channel , concat('catalog_page', catalog_page_id) as id , sales , returns , profit from csr union all select 'web channel' as channel , concat('web_site', web_site_id) as id , sales , returns , profit from wsr ) x group by channel, id with rollup order by channel ,id limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain with ssr as (select s_store_id as store_id, sum(ss_ext_sales_price) as sales, sum(coalesce(sr_return_amt, 0)) as returns, sum(ss_net_profit - coalesce(sr_net_loss, 0)) as profit from store_sales left outer join store_returns on (ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number), date_dim, store, item, promotion where ss_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and ss_store_sk = s_store_sk and ss_item_sk = i_item_sk and i_current_price > 50 and ss_promo_sk = p_promo_sk and p_channel_tv = 'N' group by s_store_id) , csr as (select cp_catalog_page_id as catalog_page_id, sum(cs_ext_sales_price) as sales, sum(coalesce(cr_return_amount, 0)) as returns, sum(cs_net_profit - coalesce(cr_net_loss, 0)) as profit from catalog_sales left outer join catalog_returns on (cs_item_sk = cr_item_sk and cs_order_number = cr_order_number), date_dim, catalog_page, item, promotion where cs_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and cs_catalog_page_sk = cp_catalog_page_sk and cs_item_sk = i_item_sk and i_current_price > 50 and cs_promo_sk = p_promo_sk and p_channel_tv = 'N' group by cp_catalog_page_id) , wsr as (select web_site_id, sum(ws_ext_sales_price) as sales, sum(coalesce(wr_return_amt, 0)) as returns, sum(ws_net_profit - coalesce(wr_net_loss, 0)) as profit from web_sales left outer join web_returns on (ws_item_sk = wr_item_sk and ws_order_number = wr_order_number), date_dim, web_site, item, promotion where ws_sold_date_sk = d_date_sk and d_date between cast('1998-08-04' as date) and (cast('1998-09-04' as date)) and ws_web_site_sk = web_site_sk and ws_item_sk = i_item_sk and i_current_price > 50 and ws_promo_sk = p_promo_sk and p_channel_tv = 'N' group by web_site_id) select channel , id , sum(sales) as sales , sum(returns) as returns , sum(profit) as profit from (select 'store channel' as channel , concat('store', store_id) as id , sales , returns , profit from ssr union all select 'catalog channel' as channel , concat('catalog_page', catalog_page_id) as id , sales , returns , profit from csr union all select 'web channel' as channel , concat('web_site', web_site_id) as id , sales , returns , profit from wsr ) x group by channel, id with rollup order by channel ,id limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Reducer 9 (SIMPLE_EDGE)
+Reducer 17 <- Map 16 (SIMPLE_EDGE), Map 23 (SIMPLE_EDGE)
+Reducer 18 <- Map 24 (SIMPLE_EDGE), Reducer 17 (SIMPLE_EDGE)
+Reducer 19 <- Map 25 (SIMPLE_EDGE), Reducer 18 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 11 (SIMPLE_EDGE)
+Reducer 20 <- Map 26 (SIMPLE_EDGE), Reducer 19 (SIMPLE_EDGE)
+Reducer 21 <- Map 27 (SIMPLE_EDGE), Reducer 20 (SIMPLE_EDGE)
+Reducer 22 <- Reducer 21 (SIMPLE_EDGE), Union 8 (CONTAINS)
+Reducer 29 <- Map 28 (SIMPLE_EDGE), Map 35 (SIMPLE_EDGE)
+Reducer 3 <- Map 12 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 30 <- Map 36 (SIMPLE_EDGE), Reducer 29 (SIMPLE_EDGE)
+Reducer 31 <- Map 37 (SIMPLE_EDGE), Reducer 30 (SIMPLE_EDGE)
+Reducer 32 <- Map 38 (SIMPLE_EDGE), Reducer 31 (SIMPLE_EDGE)
+Reducer 33 <- Map 39 (SIMPLE_EDGE), Reducer 32 (SIMPLE_EDGE)
+Reducer 34 <- Reducer 33 (SIMPLE_EDGE), Union 8 (CONTAINS)
+Reducer 4 <- Map 13 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 14 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 15 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE), Union 8 (CONTAINS)
+Reducer 9 <- Union 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 10
+ File Output Operator [FS_143]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_142]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_141]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 209632 Data size: 301089849 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_140]
+ key expressions:_col0 (type: string), _col1 (type: string)
+ sort order:++
+ Statistics:Num rows: 209632 Data size: 301089849 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(27,2)), _col3 (type: decimal(32,2)), _col4 (type: decimal(33,2))
+ Select Operator [SEL_139]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 209632 Data size: 301089849 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_138]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string)
+ | outputColumnNames:["_col0","_col1","_col3","_col4","_col5"]
+ | Statistics:Num rows: 209632 Data size: 301089849 Basic stats: COMPLETE Column stats: NONE
+ |<-Union 8 [SIMPLE_EDGE]
+ |<-Reducer 22 [CONTAINS]
+ | Reduce Output Operator [RS_137]
+ | key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ | Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ | sort order:+++
+ | Statistics:Num rows: 419265 Data size: 602181135 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: decimal(27,2)), _col4 (type: decimal(32,2)), _col5 (type: decimal(33,2))
+ | Group By Operator [GBY_136]
+ | aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"]
+ | keys:_col0 (type: string), _col1 (type: string), '0' (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 419265 Data size: 602181135 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_87]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 46585 Data size: 66909015 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_86]
+ | | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
+ | | keys:KEY._col0 (type: string)
+ | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | Statistics:Num rows: 46585 Data size: 66909015 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 21 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_85]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 93170 Data size: 133818030 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: decimal(17,2)), _col2 (type: decimal(22,2)), _col3 (type: decimal(23,2))
+ | Group By Operator [GBY_84]
+ | aggregations:["sum(_col1)","sum(_col2)","sum(_col3)"]
+ | keys:_col0 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 93170 Data size: 133818030 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_82]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 93170 Data size: 133818030 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_228]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col5","_col6","_col9","_col10","_col14"]
+ | | Statistics:Num rows: 93170 Data size: 133818030 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 27 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_80]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 575 Data size: 678355 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_58]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 575 Data size: 678355 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_212]
+ | | predicate:((p_channel_tv = 'N') and p_promo_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 575 Data size: 678355 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_56]
+ | | alias:promotion
+ | | Statistics:Num rows: 2300 Data size: 2713420 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 20 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_78]
+ | key expressions:_col3 (type: int)
+ | Map-reduce partition columns:_col3 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 84700 Data size: 121652752 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col14 (type: string)
+ | Merge Join Operator [MERGEJOIN_227]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col3","_col5","_col6","_col9","_col10","_col14"]
+ | | Statistics:Num rows: 84700 Data size: 121652752 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 26 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_75]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 77000 Data size: 110593409 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_55]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 77000 Data size: 110593409 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_211]
+ | | predicate:((i_current_price > 50) and i_item_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 77000 Data size: 110593409 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_53]
+ | | alias:item
+ | | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 19 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_73]
+ | key expressions:_col2 (type: int)
+ | Map-reduce partition columns:_col2 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 25300 Data size: 11659344 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col14 (type: string)
+ | Merge Join Operator [MERGEJOIN_226]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col2","_col3","_col5","_col6","_col9","_col10","_col14"]
+ | | Statistics:Num rows: 25300 Data size: 11659344 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 25 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_70]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 23000 Data size: 10599404 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string)
+ | | Select Operator [SEL_52]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 23000 Data size: 10599404 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_210]
+ | | predicate:cp_catalog_page_sk is not null (type: boolean)
+ | | Statistics:Num rows: 23000 Data size: 10599404 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_51]
+ | | alias:catalog_page
+ | | Statistics:Num rows: 46000 Data size: 21198808 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 18 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_68]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: int), _col3 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2))
+ | Merge Join Operator [MERGEJOIN_225]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 24 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_65]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_50]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_209]
+ | | predicate:(d_date BETWEEN 1998-08-04 AND 1998-09-04 and d_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_48]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_63]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2))
+ | Merge Join Operator [MERGEJOIN_224]
+ | | condition map:[{"":"Left Outer Join0 to 1"}]
+ | | keys:{"0":"_col2 (type: int), _col4 (type: int)","1":"_col0 (type: int), _col1 (type: int)"}
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 16 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_59]
+ | | key expressions:_col2 (type: int), _col4 (type: int)
+ | | Map-reduce partition columns:_col2 (type: int), _col4 (type: int)
+ | | sort order:++
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col0 (type: int), _col1 (type: int), _col3 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2))
+ | | Select Operator [SEL_45]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_207]
+ | | predicate:(((cs_sold_date_sk is not null and cs_catalog_page_sk is not null) and cs_item_sk is not null) and cs_promo_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_44]
+ | | alias:catalog_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 23 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_60]
+ | key expressions:_col0 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col2 (type: decimal(7,2)), _col3 (type: decimal(7,2))
+ | Select Operator [SEL_47]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_208]
+ | predicate:cr_item_sk is not null (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_46]
+ | alias:catalog_returns
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 34 [CONTAINS]
+ | Reduce Output Operator [RS_137]
+ | key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ | Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ | sort order:+++
+ | Statistics:Num rows: 419265 Data size: 602181135 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: decimal(27,2)), _col4 (type: decimal(32,2)), _col5 (type: decimal(33,2))
+ | Group By Operator [GBY_136]
+ | aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"]
+ | keys:_col0 (type: string), _col1 (type: string), '0' (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 419265 Data size: 602181135 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_133]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 46585 Data size: 66909015 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_132]
+ | | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
+ | | keys:KEY._col0 (type: string)
+ | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | Statistics:Num rows: 46585 Data size: 66909015 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 33 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_131]
+ | key expressions:_col0 (type: string)
+ | Map-reduce partition columns:_col0 (type: string)
+ | sort order:+
+ | Statistics:Num rows: 93170 Data size: 133818030 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: decimal(17,2)), _col2 (type: decimal(22,2)), _col3 (type: decimal(23,2))
+ | Group By Operator [GBY_130]
+ | aggregations:["sum(_col1)","sum(_col2)","sum(_col3)"]
+ | keys:_col0 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 93170 Data size: 133818030 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_128]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 93170 Data size: 133818030 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_233]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col5","_col6","_col9","_col10","_col14"]
+ | | Statistics:Num rows: 93170 Data size: 133818030 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 39 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_126]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 575 Data size: 678355 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_104]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 575 Data size: 678355 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_218]
+ | | predicate:((p_channel_tv = 'N') and p_promo_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 575 Data size: 678355 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_102]
+ | | alias:promotion
+ | | Statistics:Num rows: 2300 Data size: 2713420 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 32 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_124]
+ | key expressions:_col3 (type: int)
+ | Map-reduce partition columns:_col3 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 84700 Data size: 121652752 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col14 (type: string)
+ | Merge Join Operator [MERGEJOIN_232]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col3","_col5","_col6","_col9","_col10","_col14"]
+ | | Statistics:Num rows: 84700 Data size: 121652752 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 38 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_121]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 77000 Data size: 110593409 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_101]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 77000 Data size: 110593409 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_217]
+ | | predicate:((i_current_price > 50) and i_item_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 77000 Data size: 110593409 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_99]
+ | | alias:item
+ | | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 31 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_119]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col14 (type: string)
+ | Merge Join Operator [MERGEJOIN_231]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col3","_col5","_col6","_col9","_col10","_col14"]
+ | | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 37 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_116]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 42 Data size: 77704 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string)
+ | | Select Operator [SEL_98]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 42 Data size: 77704 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_216]
+ | | predicate:web_site_sk is not null (type: boolean)
+ | | Statistics:Num rows: 42 Data size: 77704 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_97]
+ | | alias:web_site
+ | | Statistics:Num rows: 84 Data size: 155408 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 30 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_114]
+ | key expressions:_col2 (type: int)
+ | Map-reduce partition columns:_col2 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2))
+ | Merge Join Operator [MERGEJOIN_230]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 36 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_111]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_96]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_215]
+ | | predicate:(d_date BETWEEN 1998-08-04 AND 1998-09-04 and d_date_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_94]
+ | | alias:date_dim
+ | | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 29 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_109]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2))
+ | Merge Join Operator [MERGEJOIN_229]
+ | | condition map:[{"":"Left Outer Join0 to 1"}]
+ | | keys:{"0":"_col1 (type: int), _col4 (type: int)","1":"_col0 (type: int), _col1 (type: int)"}
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 28 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_105]
+ | | key expressions:_col1 (type: int), _col4 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int), _col4 (type: int)
+ | | sort order:++
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2))
+ | | Select Operator [SEL_91]
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_213]
+ | | predicate:(((ws_sold_date_sk is not null and ws_web_site_sk is not null) and ws_item_sk is not null) and ws_promo_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_90]
+ | | alias:web_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 35 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_106]
+ | key expressions:_col0 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col2 (type: decimal(7,2)), _col3 (type: decimal(7,2))
+ | Select Operator [SEL_93]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_214]
+ | predicate:wr_item_sk is not null (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_92]
+ | alias:web_returns
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 7 [CONTAINS]
+ Reduce Output Operator [RS_137]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ sort order:+++
+ Statistics:Num rows: 419265 Data size: 602181135 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: decimal(27,2)), _col4 (type: decimal(32,2)), _col5 (type: decimal(33,2))
+ Group By Operator [GBY_136]
+ aggregations:["sum(_col2)","sum(_col3)","sum(_col4)"]
+ keys:_col0 (type: string), _col1 (type: string), '0' (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 419265 Data size: 602181135 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_43]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ Statistics:Num rows: 46585 Data size: 66909015 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_42]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
+ | keys:KEY._col0 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 46585 Data size: 66909015 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_41]
+ key expressions:_col0 (type: string)
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 93170 Data size: 133818030 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: decimal(17,2)), _col2 (type: decimal(22,2)), _col3 (type: decimal(23,2))
+ Group By Operator [GBY_40]
+ aggregations:["sum(_col1)","sum(_col2)","sum(_col3)"]
+ keys:_col0 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 93170 Data size: 133818030 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_38]
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 93170 Data size: 133818030 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_223]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col5","_col6","_col9","_col10","_col14"]
+ | Statistics:Num rows: 93170 Data size: 133818030 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_36]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 575 Data size: 678355 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_14]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 575 Data size: 678355 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_206]
+ | predicate:((p_channel_tv = 'N') and p_promo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 575 Data size: 678355 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_12]
+ | alias:promotion
+ | Statistics:Num rows: 2300 Data size: 2713420 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_34]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 84700 Data size: 121652752 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col14 (type: string)
+ Merge Join Operator [MERGEJOIN_222]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col3","_col5","_col6","_col9","_col10","_col14"]
+ | Statistics:Num rows: 84700 Data size: 121652752 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_31]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 77000 Data size: 110593409 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_11]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 77000 Data size: 110593409 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_205]
+ | predicate:((i_current_price > 50) and i_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 77000 Data size: 110593409 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_9]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_29]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2)), _col14 (type: string)
+ Merge Join Operator [MERGEJOIN_221]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col5","_col6","_col9","_col10","_col14"]
+ | Statistics:Num rows: 22096 Data size: 24726566 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_26]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_8]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_204]
+ | predicate:s_store_sk is not null (type: boolean)
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_7]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_24]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_220]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_21]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_6]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_203]
+ | predicate:(d_date BETWEEN 1998-08-04 AND 1998-09-04 and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_4]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_19]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col9 (type: decimal(7,2)), _col10 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_219]
+ | condition map:[{"":"Left Outer Join0 to 1"}]
+ | keys:{"0":"_col1 (type: int), _col4 (type: int)","1":"_col0 (type: int), _col1 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col5","_col6","_col9","_col10"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_15]
+ | key expressions:_col1 (type: int), _col4 (type: int)
+ | Map-reduce partition columns:_col1 (type: int), _col4 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_201]
+ | predicate:(((ss_sold_date_sk is not null and ss_store_sk is not null) and ss_item_sk is not null) and ss_promo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_16]
+ key expressions:_col0 (type: int), _col1 (type: int)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ sort order:++
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col2 (type: decimal(7,2)), _col3 (type: decimal(7,2))
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_202]
+ predicate:sr_item_sk is not null (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_2]
+ alias:store_returns
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query82.q.out b/ql/src/test/results/clientpositive/perf/query82.q.out
new file mode 100644
index 0000000..12e72f0
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query82.q.out
@@ -0,0 +1,127 @@
+PREHOOK: query: explain select i_item_id ,i_item_desc ,i_current_price from item, inventory, date_dim, store_sales where i_current_price between 30 and 30+30 and inv_item_sk = i_item_sk and d_date_sk=inv_date_sk and d_date between '2002-05-30' and '2002-07-30' and i_manufact_id in (437,129,727,663) and inv_quantity_on_hand between 100 and 500 and ss_item_sk = i_item_sk group by i_item_id,i_item_desc,i_current_price order by i_item_id limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_item_id ,i_item_desc ,i_current_price from item, inventory, date_dim, store_sales where i_current_price between 30 and 30+30 and inv_item_sk = i_item_sk and d_date_sk=inv_date_sk and d_date between '2002-05-30' and '2002-07-30' and i_manufact_id in (437,129,727,663) and inv_quantity_on_hand between 100 and 500 and ss_item_sk = i_item_sk group by i_item_id,i_item_desc,i_current_price order by i_item_id limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 7 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 5
+ File Output Operator [FS_31]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_30]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_29]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_28]
+ key expressions:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: decimal(7,2))
+ Group By Operator [GBY_26]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: decimal(7,2))
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_25]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: decimal(7,2))
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: decimal(7,2))
+ sort order:+++
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_24]
+ keys:_col1 (type: string), _col2 (type: string), _col3 (type: decimal(7,2))
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_47]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col5 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3"]
+ | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_21]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_8]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_44]
+ | predicate:(d_date BETWEEN '2002-05-30' AND '2002-07-30' and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_6]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_19]
+ key expressions:_col5 (type: int)
+ Map-reduce partition columns:_col5 (type: int)
+ sort order:+
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_46]
+ | condition map:[{"":"Inner Join 0 to 1"},{"":"Inner Join 0 to 2"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col1 (type: int)","2":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col5"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_12]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 57750 Data size: 82945057 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: decimal(7,2))
+ | Select Operator [SEL_2]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 57750 Data size: 82945057 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_42]
+ | predicate:((i_current_price BETWEEN 30 AND 60 and (i_manufact_id) IN (437, 129, 727, 663)) and i_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 57750 Data size: 82945057 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_0]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 6 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_14]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int)
+ | Select Operator [SEL_5]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_43]
+ | predicate:((inv_quantity_on_hand BETWEEN 100 AND 500 and inv_item_sk is not null) and inv_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_3]
+ | alias:inventory
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_16]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Select Operator [SEL_10]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_45]
+ predicate:ss_item_sk is not null (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_9]
+ alias:store_sales
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query84.q.out b/ql/src/test/results/clientpositive/perf/query84.q.out
new file mode 100644
index 0000000..83f10f0
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query84.q.out
@@ -0,0 +1,171 @@
+PREHOOK: query: explain select c_customer_id as customer_id ,concat(c_last_name, ', ', c_first_name) as customername from customer ,customer_address ,customer_demographics ,household_demographics ,income_band ,store_returns where ca_city = 'Hopewell' and customer.c_current_addr_sk = customer_address.ca_address_sk and ib_lower_bound >= 32287 and ib_upper_bound <= 32287 + 50000 and income_band.ib_income_band_sk = household_demographics.hd_income_band_sk and customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk and household_demographics.hd_demo_sk = customer.c_current_hdemo_sk and store_returns.sr_cdemo_sk = customer_demographics.cd_demo_sk order by customer_id limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select c_customer_id as customer_id ,concat(c_last_name, ', ', c_first_name) as customername from customer ,customer_address ,customer_demographics ,household_demographics ,income_band ,store_returns where ca_city = 'Hopewell' and customer.c_current_addr_sk = customer_address.ca_address_sk and ib_lower_bound >= 32287 and ib_upper_bound <= 32287 + 50000 and income_band.ib_income_band_sk = household_demographics.hd_income_band_sk and customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk and household_demographics.hd_demo_sk = customer.c_current_hdemo_sk and store_returns.sr_cdemo_sk = customer_demographics.cd_demo_sk order by customer_id limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 3 <- Map 11 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 9 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 10 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 6
+ File Output Operator [FS_40]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_39]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 86000 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_38]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 29282000 Data size: 25183113621 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_37]
+ key expressions:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 29282000 Data size: 25183113621 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string)
+ Select Operator [SEL_36]
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 29282000 Data size: 25183113621 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_71]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col11 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col4","_col5"]
+ | Statistics:Num rows: 29282000 Data size: 25183113621 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_34]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_11]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_66]
+ | predicate:(((ib_lower_bound >= 32287) and (ib_upper_bound <= 82287)) and ib_income_band_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_9]
+ | alias:income_band
+ | Statistics:Num rows: 20 Data size: 240 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_32]
+ key expressions:_col11 (type: int)
+ Map-reduce partition columns:_col11 (type: int)
+ sort order:+
+ Statistics:Num rows: 26620000 Data size: 22893739160 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: string), _col4 (type: string), _col5 (type: string)
+ Merge Join Operator [MERGEJOIN_70]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col4","_col5","_col11"]
+ | Statistics:Num rows: 26620000 Data size: 22893739160 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_29]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int)
+ | Select Operator [SEL_8]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_65]
+ | predicate:(hd_demo_sk is not null and hd_income_band_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_7]
+ | alias:household_demographics
+ | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_27]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 24200000 Data size: 20812489695 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: string), _col4 (type: string), _col5 (type: string)
+ Merge Join Operator [MERGEJOIN_69]
+ | condition map:[{"":"Inner Join 0 to 1"},{"":"Inner Join 1 to 2"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)","2":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col4","_col5"]
+ | Statistics:Num rows: 24200000 Data size: 20812489695 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_24]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Select Operator [SEL_13]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_67]
+ | predicate:sr_cdemo_sk is not null (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_12]
+ | alias:store_returns
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_22]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_6]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_64]
+ | predicate:cd_demo_sk is not null (type: boolean)
+ | Statistics:Num rows: 9900 Data size: 3585529 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:customer_demographics
+ | Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 11000000 Data size: 9460222384 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: string), _col2 (type: int), _col4 (type: string), _col5 (type: string)
+ Merge Join Operator [MERGEJOIN_68]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col4","_col5"]
+ | Statistics:Num rows: 11000000 Data size: 9460222384 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_15]
+ | key expressions:_col3 (type: int)
+ | Map-reduce partition columns:_col3 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10000000 Data size: 8600201981 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: string), _col1 (type: int), _col2 (type: int), _col4 (type: string), _col5 (type: string)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 10000000 Data size: 8600201981 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_62]
+ | predicate:((c_current_addr_sk is not null and c_current_cdemo_sk is not null) and c_current_hdemo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 10000000 Data size: 8600201981 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_0]
+ | alias:customer
+ | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_17]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_63]
+ predicate:((ca_city = 'Hopewell') and ca_address_sk is not null) (type: boolean)
+ Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:customer_address
+ Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query85.q.out b/ql/src/test/results/clientpositive/perf/query85.q.out
new file mode 100644
index 0000000..f564a24
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query85.q.out
@@ -0,0 +1,275 @@
+PREHOOK: query: explain select substr(r_reason_desc,1,20) as r ,avg(ws_quantity) wq ,avg(wr_refunded_cash) ref ,avg(wr_fee) fee from web_sales, web_returns, web_page, customer_demographics cd1, customer_demographics cd2, customer_address, date_dim, reason where web_sales.ws_web_page_sk = web_page.wp_web_page_sk and web_sales.ws_item_sk = web_returns.wr_item_sk and web_sales.ws_order_number = web_returns.wr_order_number and web_sales.ws_sold_date_sk = date_dim.d_date_sk and d_year = 1998 and cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk and cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk and customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk and reason.r_reason_sk = web_returns.wr_reason_sk and ( ( cd1.cd_marital_status = 'M' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = '4 yr Degree' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 100.00 and 150.00 ) or ( cd1.cd_marital_status = 'D' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = 'Primary' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 50.00 and 100.00 ) or ( cd1.cd_marital_status = 'U' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = 'Advanced Degree' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 150.00 and 200.00 ) ) and ( ( ca_country = 'United States' and ca_state in ('KY', 'GA', 'NM') and ws_net_profit between 100 and 200 ) or ( ca_country = 'United States' and ca_state in ('MT', 'OR', 'IN') and ws_net_profit between 150 and 300 ) or ( ca_country = 'United States' and ca_state in ('WI', 'MO', 'WV') and ws_net_profit between 50 and 250 ) ) group by r_reason_desc order by r, wq, ref, fee limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select substr(r_reason_desc,1,20) as r ,avg(ws_quantity) wq ,avg(wr_refunded_cash) ref ,avg(wr_fee) fee from web_sales, web_returns, web_page, customer_demographics cd1, customer_demographics cd2, customer_address, date_dim, reason where web_sales.ws_web_page_sk = web_page.wp_web_page_sk and web_sales.ws_item_sk = web_returns.wr_item_sk and web_sales.ws_order_number = web_returns.wr_order_number and web_sales.ws_sold_date_sk = date_dim.d_date_sk and d_year = 1998 and cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk and cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk and customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk and reason.r_reason_sk = web_returns.wr_reason_sk and ( ( cd1.cd_marital_status = 'M' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = '4 yr Degree' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 100.00 and 150.00 ) or ( cd1.cd_marital_status = 'D' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = 'Primary' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 50.00 and 100.00 ) or ( cd1.cd_marital_status = 'U' and cd1.cd_marital_status = cd2.cd_marital_status and cd1.cd_education_status = 'Advanced Degree' and cd1.cd_education_status = cd2.cd_education_status and ws_sales_price between 150.00 and 200.00 ) ) and ( ( ca_country = 'United States' and ca_state in ('KY', 'GA', 'NM') and ws_net_profit between 100 and 200 ) or ( ca_country = 'United States' and ca_state in ('MT', 'OR', 'IN') and ws_net_profit between 150 and 300 ) or ( ca_country = 'United States' and ca_state in ('WI', 'MO', 'WV') and ws_net_profit between 50 and 250 ) ) group by r_reason_desc order by r, wq, ref, fee limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Reducer 9 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 11 (SIMPLE_EDGE)
+Reducer 3 <- Map 12 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 13 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 14 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 15 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 16 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Map 17 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 10
+ File Output Operator [FS_94]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 101400 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_93]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 101400 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_92]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 4991250 Data size: 5065519540 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_91]
+ key expressions:_col0 (type: string), _col1 (type: double), _col2 (type: decimal(11,6)), _col3 (type: decimal(11,6))
+ sort order:++++
+ Statistics:Num rows: 4991250 Data size: 5065519540 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_90]
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 4991250 Data size: 5065519540 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_89]
+ | aggregations:["avg(VALUE._col0)","avg(VALUE._col1)","avg(VALUE._col2)"]
+ | keys:KEY._col0 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 4991250 Data size: 5065519540 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_88]
+ key expressions:_col0 (type: string)
+ Map-reduce partition columns:_col0 (type: string)
+ sort order:+
+ Statistics:Num rows: 9982500 Data size: 10131039080 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: struct), _col2 (type: struct), _col3 (type: struct)
+ Group By Operator [GBY_87]
+ aggregations:["avg(_col4)","avg(_col14)","avg(_col13)"]
+ keys:_col28 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 9982500 Data size: 10131039080 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_86]
+ outputColumnNames:["_col28","_col4","_col14","_col13"]
+ Statistics:Num rows: 9982500 Data size: 10131039080 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_146]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col11 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col13","_col14","_col28"]
+ | Statistics:Num rows: 9982500 Data size: 10131039080 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_84]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 36 Data size: 7200 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_75]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 36 Data size: 7200 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_139]
+ | predicate:r_reason_sk is not null (type: boolean)
+ | Statistics:Num rows: 36 Data size: 7200 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_74]
+ | alias:reason
+ | Statistics:Num rows: 72 Data size: 14400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_82]
+ key expressions:_col11 (type: int)
+ Map-reduce partition columns:_col11 (type: int)
+ sort order:+
+ Statistics:Num rows: 9075000 Data size: 9210035328 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: int), _col13 (type: decimal(7,2)), _col14 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_145]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col4","_col11","_col13","_col14"]
+ | Statistics:Num rows: 9075000 Data size: 9210035328 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 16 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_79]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_73]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_138]
+ | predicate:((d_year = 1998) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_71]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_77]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 8250000 Data size: 8372759208 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: int), _col11 (type: int), _col13 (type: decimal(7,2)), _col14 (type: decimal(7,2))
+ Select Operator [SEL_70]
+ outputColumnNames:["_col0","_col11","_col13","_col14","_col4"]
+ Statistics:Num rows: 8250000 Data size: 8372759208 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_130]
+ predicate:(((_col23) IN ('KY', 'GA', 'NM') and _col6 BETWEEN 100 AND 200) or ((_col23) IN ('MT', 'OR', 'IN') and _col6 BETWEEN 150 AND 300) or ((_col23) IN ('WI', 'MO', 'WV') and _col6 BETWEEN 50 AND 250)) (type: boolean)
+ Statistics:Num rows: 8250000 Data size: 8372759208 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_144]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col9 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col4","_col6","_col11","_col13","_col14","_col23"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_67]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_52]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_137]
+ | predicate:((((ca_state) IN ('KY', 'GA', 'NM') or (ca_state) IN ('MT', 'OR', 'IN') or (ca_state) IN ('WI', 'MO', 'WV')) and (ca_country = 'United States')) and ca_address_sk is not null) (type: boolean)
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_50]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_65]
+ key expressions:_col9 (type: int)
+ Map-reduce partition columns:_col9 (type: int)
+ sort order:+
+ Statistics:Num rows: 2722 Data size: 986020 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col4 (type: int), _col6 (type: decimal(7,2)), _col11 (type: int), _col13 (type: decimal(7,2)), _col14 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_143]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col10 (type: int), _col17 (type: string), _col18 (type: string)","1":"_col0 (type: int), _col1 (type: string), _col2 (type: string)"}
+ | outputColumnNames:["_col0","_col4","_col6","_col9","_col11","_col13","_col14"]
+ | Statistics:Num rows: 2722 Data size: 986020 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_62]
+ | key expressions:_col0 (type: int), _col1 (type: string), _col2 (type: string)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: string), _col2 (type: string)
+ | sort order:+++
+ | Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_49]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_136]
+ | predicate:((((((cd_education_status = '4 yr Degree') or (cd_education_status = 'Primary') or (cd_education_status = 'Advanced Degree')) and ((cd_marital_status = 'M') or (cd_marital_status = 'D') or (cd_marital_status = 'U'))) and cd_demo_sk is not null) and cd_marital_status is not null) and cd_education_status is not null) (type: boolean)
+ | Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_47]
+ | alias:cd1
+ | Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_60]
+ key expressions:_col10 (type: int), _col17 (type: string), _col18 (type: string)
+ Map-reduce partition columns:_col10 (type: int), _col17 (type: string), _col18 (type: string)
+ sort order:+++
+ Statistics:Num rows: 1044 Data size: 611694 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col4 (type: int), _col6 (type: decimal(7,2)), _col9 (type: int), _col11 (type: int), _col13 (type: decimal(7,2)), _col14 (type: decimal(7,2))
+ Select Operator [SEL_46]
+ outputColumnNames:["_col0","_col10","_col11","_col13","_col14","_col17","_col18","_col4","_col6","_col9"]
+ Statistics:Num rows: 1044 Data size: 611694 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_131]
+ predicate:(((_col17 = 'M') and (_col18 = '4 yr Degree') and _col5 BETWEEN 100.0 AND 150.0) or ((_col17 = 'D') and (_col18 = 'Primary') and _col5 BETWEEN 50.0 AND 100.0) or ((_col17 = 'U') and (_col18 = 'Advanced Degree') and _col5 BETWEEN 150.0 AND 200.0)) (type: boolean)
+ Statistics:Num rows: 1044 Data size: 611694 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_142]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col8 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col4","_col5","_col6","_col9","_col10","_col11","_col13","_col14","_col17","_col18"]
+ | Statistics:Num rows: 2784 Data size: 1631186 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_43]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string)
+ | Select Operator [SEL_21]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_135]
+ | predicate:((((((cd_education_status = '4 yr Degree') or (cd_education_status = 'Primary') or (cd_education_status = 'Advanced Degree')) and ((cd_marital_status = 'M') or (cd_marital_status = 'D') or (cd_marital_status = 'U'))) and cd_demo_sk is not null) and cd_marital_status is not null) and cd_education_status is not null) (type: boolean)
+ | Statistics:Num rows: 2475 Data size: 896382 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_19]
+ | alias:cd1
+ | Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_41]
+ key expressions:_col8 (type: int)
+ Map-reduce partition columns:_col8 (type: int)
+ sort order:+
+ Statistics:Num rows: 2531 Data size: 1482897 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col9 (type: int), _col10 (type: int), _col11 (type: int), _col13 (type: decimal(7,2)), _col14 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_141]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col4","_col5","_col6","_col8","_col9","_col10","_col11","_col13","_col14"]
+ | Statistics:Num rows: 2531 Data size: 1482897 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_38]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 2301 Data size: 1348089 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_18]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 2301 Data size: 1348089 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_134]
+ | predicate:wp_web_page_sk is not null (type: boolean)
+ | Statistics:Num rows: 2301 Data size: 1348089 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_17]
+ | alias:web_page
+ | Statistics:Num rows: 4602 Data size: 2696178 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_36]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2)), _col8 (type: int), _col9 (type: int), _col10 (type: int), _col11 (type: int), _col13 (type: decimal(7,2)), _col14 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_140]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int), _col3 (type: int)","1":"_col0 (type: int), _col5 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col4","_col5","_col6","_col8","_col9","_col10","_col11","_col13","_col14"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_31]
+ | key expressions:_col1 (type: int), _col3 (type: int)
+ | Map-reduce partition columns:_col1 (type: int), _col3 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col2 (type: int), _col4 (type: int), _col5 (type: decimal(7,2)), _col6 (type: decimal(7,2))
+ | Select Operator [SEL_2]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_132]
+ | predicate:((((((ws_sales_price BETWEEN 100.0 AND 150.0 or ws_sales_price BETWEEN 50.0 AND 100.0 or ws_sales_price BETWEEN 150.0 AND 200.0) and (ws_net_profit BETWEEN 100 AND 200 or ws_net_profit BETWEEN 150 AND 300 or ws_net_profit BETWEEN 50 AND 250)) and ws_item_sk is not null) and ws_order_number is not null) and ws_web_page_sk is not null) and ws_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:web_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_33]
+ key expressions:_col0 (type: int), _col5 (type: int)
+ Map-reduce partition columns:_col0 (type: int), _col5 (type: int)
+ sort order:++
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: int), _col6 (type: decimal(7,2)), _col7 (type: decimal(7,2))
+ Select Operator [SEL_16]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_133]
+ predicate:(((((wr_item_sk is not null and wr_order_number is not null) and wr_refunded_cdemo_sk is not null) and wr_returning_cdemo_sk is not null) and wr_refunded_addr_sk is not null) and wr_reason_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_15]
+ alias:web_returns
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query87.q.out b/ql/src/test/results/clientpositive/perf/query87.q.out
new file mode 100644
index 0000000..28acd2d
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query87.q.out
@@ -0,0 +1,334 @@
+PREHOOK: query: explain select count(*) from (select distinct c_last_name as l1, c_first_name as f1, d_date as d1 from store_sales JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t1 LEFT OUTER JOIN ( select distinct c_last_name as l2, c_first_name as f2, d_date as d2 from catalog_sales JOIN date_dim ON catalog_sales.cs_sold_date_sk = date_dim.d_date_sk JOIN customer ON catalog_sales.cs_bill_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t2 ON t1.l1 = t2.l2 and t1.f1 = t2.f2 and t1.d1 = t2.d2 LEFT OUTER JOIN (select distinct c_last_name as l3, c_first_name as f3, d_date as d3 from web_sales JOIN date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk JOIN customer ON web_sales.ws_bill_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t3 ON t1.l1 = t3.l3 and t1.f1 = t3.f3 and t1.d1 = t3.d3 WHERE l2 is null and l3 is null
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(*) from (select distinct c_last_name as l1, c_first_name as f1, d_date as d1 from store_sales JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk JOIN customer ON store_sales.ss_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t1 LEFT OUTER JOIN ( select distinct c_last_name as l2, c_first_name as f2, d_date as d2 from catalog_sales JOIN date_dim ON catalog_sales.cs_sold_date_sk = date_dim.d_date_sk JOIN customer ON catalog_sales.cs_bill_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t2 ON t1.l1 = t2.l2 and t1.f1 = t2.f2 and t1.d1 = t2.d2 LEFT OUTER JOIN (select distinct c_last_name as l3, c_first_name as f3, d_date as d3 from web_sales JOIN date_dim ON web_sales.ws_sold_date_sk = date_dim.d_date_sk JOIN customer ON web_sales.ws_bill_customer_sk = customer.c_customer_sk where d_month_seq between 1193 and 1193+11 ) t3 ON t1.l1 = t3.l3 and t1.f1 = t3.f3 and t1.d1 = t3.d3 WHERE l2 is null and l3 is null
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 11 <- Map 10 (SIMPLE_EDGE), Map 14 (SIMPLE_EDGE)
+Reducer 12 <- Map 15 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE)
+Reducer 13 <- Reducer 12 (SIMPLE_EDGE)
+Reducer 17 <- Map 16 (SIMPLE_EDGE), Map 20 (SIMPLE_EDGE)
+Reducer 18 <- Map 21 (SIMPLE_EDGE), Reducer 17 (SIMPLE_EDGE)
+Reducer 19 <- Reducer 18 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 13 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 19 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_80]
+ compressed:false
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Group By Operator [GBY_78]
+ | aggregations:["count(VALUE._col0)"]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_77]
+ sort order:
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: bigint)
+ Group By Operator [GBY_76]
+ aggregations:["count()"]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_75]
+ Statistics:Num rows: 12100000 Data size: 10406244848 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_102]
+ predicate:_col6 is null (type: boolean)
+ Statistics:Num rows: 12100000 Data size: 10406244848 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_120]
+ | condition map:[{"":"Left Outer Join0 to 1"}]
+ | keys:{"0":"_col0 (type: string), _col1 (type: string), _col2 (type: string)","1":"_col0 (type: string), _col1 (type: string), _col2 (type: string)"}
+ | outputColumnNames:["_col6"]
+ | Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 19 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_72]
+ | key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ | Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ | sort order:+++
+ | Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_70]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_69]
+ | | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string)
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 18 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_68]
+ | key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ | Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ | sort order:+++
+ | Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_67]
+ | keys:_col3 (type: string), _col6 (type: string), _col7 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_118]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col3","_col6","_col7"]
+ | | Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 21 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_64]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string), _col2 (type: string)
+ | | Select Operator [SEL_55]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_112]
+ | | predicate:c_customer_sk is not null (type: boolean)
+ | | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_54]
+ | | alias:customer
+ | | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_62]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: string)
+ | Merge Join Operator [MERGEJOIN_117]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col3"]
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 16 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_57]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col1 (type: int)
+ | | Select Operator [SEL_50]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_110]
+ | | predicate:(ws_sold_date_sk is not null and ws_bill_customer_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_49]
+ | | alias:web_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 20 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_59]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_53]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_111]
+ | predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_51]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_71]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ sort order:+++
+ Statistics:Num rows: 12100000 Data size: 10406244848 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_48]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 12100000 Data size: 10406244848 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_103]
+ predicate:_col3 is null (type: boolean)
+ Statistics:Num rows: 12100000 Data size: 10406244848 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_119]
+ | condition map:[{"":"Left Outer Join0 to 1"}]
+ | keys:{"0":"_col0 (type: string), _col1 (type: string), _col2 (type: string)","1":"_col0 (type: string), _col1 (type: string), _col2 (type: string)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 24200000 Data size: 20812489696 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_45]
+ | key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ | Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ | sort order:+++
+ | Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_43]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_42]
+ | | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string)
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_41]
+ | key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ | Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ | sort order:+++
+ | Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_40]
+ | keys:_col3 (type: string), _col6 (type: string), _col7 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_116]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col3","_col6","_col7"]
+ | | Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 15 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_37]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col1 (type: string), _col2 (type: string)
+ | | Select Operator [SEL_28]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_109]
+ | | predicate:c_customer_sk is not null (type: boolean)
+ | | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_27]
+ | | alias:customer
+ | | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_35]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col3 (type: string)
+ | Merge Join Operator [MERGEJOIN_115]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col3"]
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 10 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_30]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col1 (type: int)
+ | | Select Operator [SEL_23]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_107]
+ | | predicate:(cs_sold_date_sk is not null and cs_bill_customer_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_22]
+ | | alias:catalog_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_32]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string)
+ | Select Operator [SEL_26]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_108]
+ | predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_24]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_44]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ sort order:+++
+ Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_21]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_20]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 22000000 Data size: 18920444769 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_19]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ sort order:+++
+ Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_18]
+ keys:_col3 (type: string), _col6 (type: string), _col7 (type: string)
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_114]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col3","_col6","_col7"]
+ | Statistics:Num rows: 44000000 Data size: 37840889538 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_15]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string)
+ | Select Operator [SEL_6]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_106]
+ | predicate:c_customer_sk is not null (type: boolean)
+ | Statistics:Num rows: 40000000 Data size: 34400807926 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:customer
+ | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_13]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: string)
+ Merge Join Operator [MERGEJOIN_113]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_8]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_104]
+ | predicate:(ss_sold_date_sk is not null and ss_customer_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_10]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string)
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_105]
+ predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) (type: boolean)
+ Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:date_dim
+ Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query88.q.out b/ql/src/test/results/clientpositive/perf/query88.q.out
new file mode 100644
index 0000000..c86347b
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query88.q.out
@@ -0,0 +1,1157 @@
+Warning: Shuffle Join MERGEJOIN[413][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 6' is a cross product
+Warning: Shuffle Join MERGEJOIN[414][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Reducer 7' is a cross product
+Warning: Shuffle Join MERGEJOIN[415][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3]] in Stage 'Reducer 8' is a cross product
+Warning: Shuffle Join MERGEJOIN[416][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3, $hdt$_4]] in Stage 'Reducer 9' is a cross product
+Warning: Shuffle Join MERGEJOIN[417][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3, $hdt$_4, $hdt$_5]] in Stage 'Reducer 10' is a cross product
+Warning: Shuffle Join MERGEJOIN[418][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3, $hdt$_4, $hdt$_5, $hdt$_6]] in Stage 'Reducer 11' is a cross product
+Warning: Shuffle Join MERGEJOIN[419][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3, $hdt$_4, $hdt$_5, $hdt$_6, $hdt$_7]] in Stage 'Reducer 12' is a cross product
+PREHOOK: query: explain
+select *
+from
+ (select count(*) h8_30_to_9
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 8
+ and time_dim.t_minute >= 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s1,
+ (select count(*) h9_to_9_30
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 9
+ and time_dim.t_minute < 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s2,
+ (select count(*) h9_30_to_10
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 9
+ and time_dim.t_minute >= 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s3,
+ (select count(*) h10_to_10_30
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 10
+ and time_dim.t_minute < 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s4,
+ (select count(*) h10_30_to_11
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 10
+ and time_dim.t_minute >= 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s5,
+ (select count(*) h11_to_11_30
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 11
+ and time_dim.t_minute < 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s6,
+ (select count(*) h11_30_to_12
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 11
+ and time_dim.t_minute >= 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s7,
+ (select count(*) h12_to_12_30
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 12
+ and time_dim.t_minute < 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s8
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select *
+from
+ (select count(*) h8_30_to_9
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 8
+ and time_dim.t_minute >= 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s1,
+ (select count(*) h9_to_9_30
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 9
+ and time_dim.t_minute < 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s2,
+ (select count(*) h9_30_to_10
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 9
+ and time_dim.t_minute >= 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s3,
+ (select count(*) h10_to_10_30
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 10
+ and time_dim.t_minute < 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s4,
+ (select count(*) h10_30_to_11
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 10
+ and time_dim.t_minute >= 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s5,
+ (select count(*) h11_to_11_30
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 11
+ and time_dim.t_minute < 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s6,
+ (select count(*) h11_30_to_12
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 11
+ and time_dim.t_minute >= 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s7,
+ (select count(*) h12_to_12_30
+ from store_sales, household_demographics , time_dim, store
+ where store_sales.ss_sold_time_sk = time_dim.t_time_sk
+ and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
+ and store_sales.ss_store_sk = store.s_store_sk
+ and time_dim.t_hour = 12
+ and time_dim.t_minute < 30
+ and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or
+ (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or
+ (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2))
+ and store.s_store_name = 'ese') s8
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 10 <- Reducer 52 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 11 <- Reducer 10 (SIMPLE_EDGE), Reducer 60 (SIMPLE_EDGE)
+Reducer 12 <- Reducer 11 (SIMPLE_EDGE), Reducer 68 (SIMPLE_EDGE)
+Reducer 17 <- Map 16 (SIMPLE_EDGE), Map 21 (SIMPLE_EDGE)
+Reducer 18 <- Map 22 (SIMPLE_EDGE), Reducer 17 (SIMPLE_EDGE)
+Reducer 19 <- Map 23 (SIMPLE_EDGE), Reducer 18 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE)
+Reducer 20 <- Reducer 19 (SIMPLE_EDGE)
+Reducer 25 <- Map 24 (SIMPLE_EDGE), Map 29 (SIMPLE_EDGE)
+Reducer 26 <- Map 30 (SIMPLE_EDGE), Reducer 25 (SIMPLE_EDGE)
+Reducer 27 <- Map 31 (SIMPLE_EDGE), Reducer 26 (SIMPLE_EDGE)
+Reducer 28 <- Reducer 27 (SIMPLE_EDGE)
+Reducer 3 <- Map 14 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 33 <- Map 32 (SIMPLE_EDGE), Map 37 (SIMPLE_EDGE)
+Reducer 34 <- Map 38 (SIMPLE_EDGE), Reducer 33 (SIMPLE_EDGE)
+Reducer 35 <- Map 39 (SIMPLE_EDGE), Reducer 34 (SIMPLE_EDGE)
+Reducer 36 <- Reducer 35 (SIMPLE_EDGE)
+Reducer 4 <- Map 15 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 41 <- Map 40 (SIMPLE_EDGE), Map 45 (SIMPLE_EDGE)
+Reducer 42 <- Map 46 (SIMPLE_EDGE), Reducer 41 (SIMPLE_EDGE)
+Reducer 43 <- Map 47 (SIMPLE_EDGE), Reducer 42 (SIMPLE_EDGE)
+Reducer 44 <- Reducer 43 (SIMPLE_EDGE)
+Reducer 49 <- Map 48 (SIMPLE_EDGE), Map 53 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 50 <- Map 54 (SIMPLE_EDGE), Reducer 49 (SIMPLE_EDGE)
+Reducer 51 <- Map 55 (SIMPLE_EDGE), Reducer 50 (SIMPLE_EDGE)
+Reducer 52 <- Reducer 51 (SIMPLE_EDGE)
+Reducer 57 <- Map 56 (SIMPLE_EDGE), Map 61 (SIMPLE_EDGE)
+Reducer 58 <- Map 62 (SIMPLE_EDGE), Reducer 57 (SIMPLE_EDGE)
+Reducer 59 <- Map 63 (SIMPLE_EDGE), Reducer 58 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 20 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 60 <- Reducer 59 (SIMPLE_EDGE)
+Reducer 65 <- Map 64 (SIMPLE_EDGE), Map 69 (SIMPLE_EDGE)
+Reducer 66 <- Map 70 (SIMPLE_EDGE), Reducer 65 (SIMPLE_EDGE)
+Reducer 67 <- Map 71 (SIMPLE_EDGE), Reducer 66 (SIMPLE_EDGE)
+Reducer 68 <- Reducer 67 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 28 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Reducer 36 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 44 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 12
+ File Output Operator [FS_277]
+ compressed:false
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Merge Join Operator [MERGEJOIN_419]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_273]
+ | sort order:
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: bigint), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: bigint), _col4 (type: bigint), _col5 (type: bigint), _col6 (type: bigint)
+ | Merge Join Operator [MERGEJOIN_418]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{}
+ | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 10 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_270]
+ | | sort order:
+ | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: bigint), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: bigint), _col4 (type: bigint), _col5 (type: bigint)
+ | | Merge Join Operator [MERGEJOIN_417]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{}
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 52 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_268]
+ | | | sort order:
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col0 (type: bigint)
+ | | | Group By Operator [GBY_184]
+ | | | | aggregations:["count(VALUE._col0)"]
+ | | | | outputColumnNames:["_col0"]
+ | | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Reducer 51 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_183]
+ | | | sort order:
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col0 (type: bigint)
+ | | | Group By Operator [GBY_182]
+ | | | aggregations:["count()"]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | Merge Join Operator [MERGEJOIN_406]
+ | | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | | | Statistics:Num rows: 8712 Data size: 4103352 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Map 55 [SIMPLE_EDGE]
+ | | | | Reduce Output Operator [RS_179]
+ | | | | key expressions:_col0 (type: int)
+ | | | | Map-reduce partition columns:_col0 (type: int)
+ | | | | sort order:+
+ | | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | | Select Operator [SEL_165]
+ | | | | outputColumnNames:["_col0"]
+ | | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | | Filter Operator [FIL_380]
+ | | | | predicate:((s_store_name = 'ese') and s_store_sk is not null) (type: boolean)
+ | | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | | TableScan [TS_163]
+ | | | | alias:store
+ | | | | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Reducer 50 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_177]
+ | | | key expressions:_col2 (type: int)
+ | | | Map-reduce partition columns:_col2 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ | | | Merge Join Operator [MERGEJOIN_405]
+ | | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | | | outputColumnNames:["_col2"]
+ | | | | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Map 54 [SIMPLE_EDGE]
+ | | | | Reduce Output Operator [RS_174]
+ | | | | key expressions:_col0 (type: int)
+ | | | | Map-reduce partition columns:_col0 (type: int)
+ | | | | sort order:+
+ | | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | | Select Operator [SEL_162]
+ | | | | outputColumnNames:["_col0"]
+ | | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | | Filter Operator [FIL_379]
+ | | | | predicate:(((t_hour = 11) and (t_minute < 30)) and t_time_sk is not null) (type: boolean)
+ | | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | | TableScan [TS_160]
+ | | | | alias:time_dim
+ | | | | Statistics:Num rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Reducer 49 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_172]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col2 (type: int)
+ | | | Merge Join Operator [MERGEJOIN_404]
+ | | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | | | outputColumnNames:["_col0","_col2"]
+ | | | | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Map 48 [SIMPLE_EDGE]
+ | | | | Reduce Output Operator [RS_167]
+ | | | | key expressions:_col1 (type: int)
+ | | | | Map-reduce partition columns:_col1 (type: int)
+ | | | | sort order:+
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | | value expressions:_col0 (type: int), _col2 (type: int)
+ | | | | Select Operator [SEL_156]
+ | | | | outputColumnNames:["_col0","_col1","_col2"]
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | | Filter Operator [FIL_377]
+ | | | | predicate:((ss_hdemo_sk is not null and ss_sold_time_sk is not null) and ss_store_sk is not null) (type: boolean)
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | | TableScan [TS_155]
+ | | | | alias:store_sales
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | |<-Map 53 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_169]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | Select Operator [SEL_159]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_378]
+ | | | predicate:((((hd_dep_count = 3) and (hd_vehicle_count <= 5)) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and hd_demo_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_157]
+ | | | alias:household_demographics
+ | | | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 9 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_267]
+ | | sort order:
+ | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: bigint), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: bigint), _col4 (type: bigint)
+ | | Merge Join Operator [MERGEJOIN_416]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{}
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 44 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_265]
+ | | | sort order:
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col0 (type: bigint)
+ | | | Group By Operator [GBY_153]
+ | | | | aggregations:["count(VALUE._col0)"]
+ | | | | outputColumnNames:["_col0"]
+ | | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Reducer 43 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_152]
+ | | | sort order:
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col0 (type: bigint)
+ | | | Group By Operator [GBY_151]
+ | | | aggregations:["count()"]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | Merge Join Operator [MERGEJOIN_403]
+ | | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | | | Statistics:Num rows: 8712 Data size: 4103352 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Map 47 [SIMPLE_EDGE]
+ | | | | Reduce Output Operator [RS_148]
+ | | | | key expressions:_col0 (type: int)
+ | | | | Map-reduce partition columns:_col0 (type: int)
+ | | | | sort order:+
+ | | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | | Select Operator [SEL_134]
+ | | | | outputColumnNames:["_col0"]
+ | | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | | Filter Operator [FIL_376]
+ | | | | predicate:((s_store_name = 'ese') and s_store_sk is not null) (type: boolean)
+ | | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | | TableScan [TS_132]
+ | | | | alias:store
+ | | | | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Reducer 42 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_146]
+ | | | key expressions:_col2 (type: int)
+ | | | Map-reduce partition columns:_col2 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ | | | Merge Join Operator [MERGEJOIN_402]
+ | | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | | | outputColumnNames:["_col2"]
+ | | | | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Map 46 [SIMPLE_EDGE]
+ | | | | Reduce Output Operator [RS_143]
+ | | | | key expressions:_col0 (type: int)
+ | | | | Map-reduce partition columns:_col0 (type: int)
+ | | | | sort order:+
+ | | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | | Select Operator [SEL_131]
+ | | | | outputColumnNames:["_col0"]
+ | | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | | Filter Operator [FIL_375]
+ | | | | predicate:(((t_hour = 10) and (t_minute >= 30)) and t_time_sk is not null) (type: boolean)
+ | | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | | TableScan [TS_129]
+ | | | | alias:time_dim
+ | | | | Statistics:Num rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Reducer 41 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_141]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col2 (type: int)
+ | | | Merge Join Operator [MERGEJOIN_401]
+ | | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | | | outputColumnNames:["_col0","_col2"]
+ | | | | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Map 40 [SIMPLE_EDGE]
+ | | | | Reduce Output Operator [RS_136]
+ | | | | key expressions:_col1 (type: int)
+ | | | | Map-reduce partition columns:_col1 (type: int)
+ | | | | sort order:+
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | | value expressions:_col0 (type: int), _col2 (type: int)
+ | | | | Select Operator [SEL_125]
+ | | | | outputColumnNames:["_col0","_col1","_col2"]
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | | Filter Operator [FIL_373]
+ | | | | predicate:((ss_hdemo_sk is not null and ss_sold_time_sk is not null) and ss_store_sk is not null) (type: boolean)
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | | TableScan [TS_124]
+ | | | | alias:store_sales
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | |<-Map 45 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_138]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | Select Operator [SEL_128]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_374]
+ | | | predicate:((((hd_dep_count = 3) and (hd_vehicle_count <= 5)) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and hd_demo_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_126]
+ | | | alias:household_demographics
+ | | | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 8 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_264]
+ | | sort order:
+ | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: bigint), _col1 (type: bigint), _col2 (type: bigint), _col3 (type: bigint)
+ | | Merge Join Operator [MERGEJOIN_415]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{}
+ | | | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 36 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_262]
+ | | | sort order:
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col0 (type: bigint)
+ | | | Group By Operator [GBY_122]
+ | | | | aggregations:["count(VALUE._col0)"]
+ | | | | outputColumnNames:["_col0"]
+ | | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Reducer 35 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_121]
+ | | | sort order:
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col0 (type: bigint)
+ | | | Group By Operator [GBY_120]
+ | | | aggregations:["count()"]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | Merge Join Operator [MERGEJOIN_400]
+ | | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | | | Statistics:Num rows: 8712 Data size: 4103352 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Map 39 [SIMPLE_EDGE]
+ | | | | Reduce Output Operator [RS_117]
+ | | | | key expressions:_col0 (type: int)
+ | | | | Map-reduce partition columns:_col0 (type: int)
+ | | | | sort order:+
+ | | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | | Select Operator [SEL_103]
+ | | | | outputColumnNames:["_col0"]
+ | | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | | Filter Operator [FIL_372]
+ | | | | predicate:((s_store_name = 'ese') and s_store_sk is not null) (type: boolean)
+ | | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | | TableScan [TS_101]
+ | | | | alias:store
+ | | | | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Reducer 34 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_115]
+ | | | key expressions:_col2 (type: int)
+ | | | Map-reduce partition columns:_col2 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ | | | Merge Join Operator [MERGEJOIN_399]
+ | | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | | | outputColumnNames:["_col2"]
+ | | | | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Map 38 [SIMPLE_EDGE]
+ | | | | Reduce Output Operator [RS_112]
+ | | | | key expressions:_col0 (type: int)
+ | | | | Map-reduce partition columns:_col0 (type: int)
+ | | | | sort order:+
+ | | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | | Select Operator [SEL_100]
+ | | | | outputColumnNames:["_col0"]
+ | | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | | Filter Operator [FIL_371]
+ | | | | predicate:(((t_hour = 10) and (t_minute < 30)) and t_time_sk is not null) (type: boolean)
+ | | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | | TableScan [TS_98]
+ | | | | alias:time_dim
+ | | | | Statistics:Num rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Reducer 33 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_110]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col2 (type: int)
+ | | | Merge Join Operator [MERGEJOIN_398]
+ | | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | | | outputColumnNames:["_col0","_col2"]
+ | | | | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Map 32 [SIMPLE_EDGE]
+ | | | | Reduce Output Operator [RS_105]
+ | | | | key expressions:_col1 (type: int)
+ | | | | Map-reduce partition columns:_col1 (type: int)
+ | | | | sort order:+
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | | value expressions:_col0 (type: int), _col2 (type: int)
+ | | | | Select Operator [SEL_94]
+ | | | | outputColumnNames:["_col0","_col1","_col2"]
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | | Filter Operator [FIL_369]
+ | | | | predicate:((ss_hdemo_sk is not null and ss_sold_time_sk is not null) and ss_store_sk is not null) (type: boolean)
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | | TableScan [TS_93]
+ | | | | alias:store_sales
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | |<-Map 37 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_107]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | Select Operator [SEL_97]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_370]
+ | | | predicate:((((hd_dep_count = 3) and (hd_vehicle_count <= 5)) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and hd_demo_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_95]
+ | | | alias:household_demographics
+ | | | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 7 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_261]
+ | | sort order:
+ | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: bigint), _col1 (type: bigint), _col2 (type: bigint)
+ | | Merge Join Operator [MERGEJOIN_414]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{}
+ | | | outputColumnNames:["_col0","_col1","_col2"]
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 28 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_259]
+ | | | sort order:
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col0 (type: bigint)
+ | | | Group By Operator [GBY_91]
+ | | | | aggregations:["count(VALUE._col0)"]
+ | | | | outputColumnNames:["_col0"]
+ | | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Reducer 27 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_90]
+ | | | sort order:
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col0 (type: bigint)
+ | | | Group By Operator [GBY_89]
+ | | | aggregations:["count()"]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | Merge Join Operator [MERGEJOIN_397]
+ | | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | | | Statistics:Num rows: 8712 Data size: 4103352 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Map 31 [SIMPLE_EDGE]
+ | | | | Reduce Output Operator [RS_86]
+ | | | | key expressions:_col0 (type: int)
+ | | | | Map-reduce partition columns:_col0 (type: int)
+ | | | | sort order:+
+ | | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | | Select Operator [SEL_72]
+ | | | | outputColumnNames:["_col0"]
+ | | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | | Filter Operator [FIL_368]
+ | | | | predicate:((s_store_name = 'ese') and s_store_sk is not null) (type: boolean)
+ | | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | | TableScan [TS_70]
+ | | | | alias:store
+ | | | | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Reducer 26 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_84]
+ | | | key expressions:_col2 (type: int)
+ | | | Map-reduce partition columns:_col2 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ | | | Merge Join Operator [MERGEJOIN_396]
+ | | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | | | outputColumnNames:["_col2"]
+ | | | | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Map 30 [SIMPLE_EDGE]
+ | | | | Reduce Output Operator [RS_81]
+ | | | | key expressions:_col0 (type: int)
+ | | | | Map-reduce partition columns:_col0 (type: int)
+ | | | | sort order:+
+ | | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | | Select Operator [SEL_69]
+ | | | | outputColumnNames:["_col0"]
+ | | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | | Filter Operator [FIL_367]
+ | | | | predicate:(((t_hour = 9) and (t_minute >= 30)) and t_time_sk is not null) (type: boolean)
+ | | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | | TableScan [TS_67]
+ | | | | alias:time_dim
+ | | | | Statistics:Num rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Reducer 25 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_79]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col2 (type: int)
+ | | | Merge Join Operator [MERGEJOIN_395]
+ | | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | | | outputColumnNames:["_col0","_col2"]
+ | | | | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Map 24 [SIMPLE_EDGE]
+ | | | | Reduce Output Operator [RS_74]
+ | | | | key expressions:_col1 (type: int)
+ | | | | Map-reduce partition columns:_col1 (type: int)
+ | | | | sort order:+
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | | value expressions:_col0 (type: int), _col2 (type: int)
+ | | | | Select Operator [SEL_63]
+ | | | | outputColumnNames:["_col0","_col1","_col2"]
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | | Filter Operator [FIL_365]
+ | | | | predicate:((ss_hdemo_sk is not null and ss_sold_time_sk is not null) and ss_store_sk is not null) (type: boolean)
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | | TableScan [TS_62]
+ | | | | alias:store_sales
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | |<-Map 29 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_76]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | Select Operator [SEL_66]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_366]
+ | | | predicate:((((hd_dep_count = 3) and (hd_vehicle_count <= 5)) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and hd_demo_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_64]
+ | | | alias:household_demographics
+ | | | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 6 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_258]
+ | | sort order:
+ | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: bigint), _col1 (type: bigint)
+ | | Merge Join Operator [MERGEJOIN_413]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{}
+ | | | outputColumnNames:["_col0","_col1"]
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 20 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_256]
+ | | | sort order:
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col0 (type: bigint)
+ | | | Group By Operator [GBY_60]
+ | | | | aggregations:["count(VALUE._col0)"]
+ | | | | outputColumnNames:["_col0"]
+ | | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Reducer 19 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_59]
+ | | | sort order:
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col0 (type: bigint)
+ | | | Group By Operator [GBY_58]
+ | | | aggregations:["count()"]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | | Merge Join Operator [MERGEJOIN_394]
+ | | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | | | Statistics:Num rows: 8712 Data size: 4103352 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Map 23 [SIMPLE_EDGE]
+ | | | | Reduce Output Operator [RS_55]
+ | | | | key expressions:_col0 (type: int)
+ | | | | Map-reduce partition columns:_col0 (type: int)
+ | | | | sort order:+
+ | | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | | Select Operator [SEL_41]
+ | | | | outputColumnNames:["_col0"]
+ | | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | | Filter Operator [FIL_364]
+ | | | | predicate:((s_store_name = 'ese') and s_store_sk is not null) (type: boolean)
+ | | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | | TableScan [TS_39]
+ | | | | alias:store
+ | | | | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Reducer 18 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_53]
+ | | | key expressions:_col2 (type: int)
+ | | | Map-reduce partition columns:_col2 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ | | | Merge Join Operator [MERGEJOIN_393]
+ | | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | | | outputColumnNames:["_col2"]
+ | | | | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Map 22 [SIMPLE_EDGE]
+ | | | | Reduce Output Operator [RS_50]
+ | | | | key expressions:_col0 (type: int)
+ | | | | Map-reduce partition columns:_col0 (type: int)
+ | | | | sort order:+
+ | | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | | Select Operator [SEL_38]
+ | | | | outputColumnNames:["_col0"]
+ | | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | | Filter Operator [FIL_363]
+ | | | | predicate:(((t_hour = 9) and (t_minute < 30)) and t_time_sk is not null) (type: boolean)
+ | | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | | TableScan [TS_36]
+ | | | | alias:time_dim
+ | | | | Statistics:Num rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Reducer 17 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_48]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | | | value expressions:_col2 (type: int)
+ | | | Merge Join Operator [MERGEJOIN_392]
+ | | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | | | outputColumnNames:["_col0","_col2"]
+ | | | | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | | | |<-Map 16 [SIMPLE_EDGE]
+ | | | | Reduce Output Operator [RS_43]
+ | | | | key expressions:_col1 (type: int)
+ | | | | Map-reduce partition columns:_col1 (type: int)
+ | | | | sort order:+
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | | value expressions:_col0 (type: int), _col2 (type: int)
+ | | | | Select Operator [SEL_32]
+ | | | | outputColumnNames:["_col0","_col1","_col2"]
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | | Filter Operator [FIL_361]
+ | | | | predicate:((ss_hdemo_sk is not null and ss_sold_time_sk is not null) and ss_store_sk is not null) (type: boolean)
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | | TableScan [TS_31]
+ | | | | alias:store_sales
+ | | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | |<-Map 21 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_45]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | Select Operator [SEL_35]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_362]
+ | | | predicate:((((hd_dep_count = 3) and (hd_vehicle_count <= 5)) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and hd_demo_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_33]
+ | | | alias:household_demographics
+ | | | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 5 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_255]
+ | | sort order:
+ | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: bigint)
+ | | Group By Operator [GBY_29]
+ | | | aggregations:["count(VALUE._col0)"]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 4 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_28]
+ | | sort order:
+ | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col0 (type: bigint)
+ | | Group By Operator [GBY_27]
+ | | aggregations:["count()"]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | | Merge Join Operator [MERGEJOIN_391]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | | Statistics:Num rows: 8712 Data size: 4103352 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 15 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_24]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | Select Operator [SEL_10]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_360]
+ | | | predicate:((s_store_name = 'ese') and s_store_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_8]
+ | | | alias:store
+ | | | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 3 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_22]
+ | | key expressions:_col2 (type: int)
+ | | Map-reduce partition columns:_col2 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ | | Merge Join Operator [MERGEJOIN_390]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col2"]
+ | | | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 14 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_19]
+ | | | key expressions:_col0 (type: int)
+ | | | Map-reduce partition columns:_col0 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | Select Operator [SEL_7]
+ | | | outputColumnNames:["_col0"]
+ | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | Filter Operator [FIL_359]
+ | | | predicate:(((t_hour = 8) and (t_minute >= 30)) and t_time_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | | TableScan [TS_5]
+ | | | alias:time_dim
+ | | | Statistics:Num rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Reducer 2 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_17]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | | value expressions:_col2 (type: int)
+ | | Merge Join Operator [MERGEJOIN_389]
+ | | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | | outputColumnNames:["_col0","_col2"]
+ | | | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | | |<-Map 1 [SIMPLE_EDGE]
+ | | | Reduce Output Operator [RS_12]
+ | | | key expressions:_col1 (type: int)
+ | | | Map-reduce partition columns:_col1 (type: int)
+ | | | sort order:+
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | value expressions:_col0 (type: int), _col2 (type: int)
+ | | | Select Operator [SEL_1]
+ | | | outputColumnNames:["_col0","_col1","_col2"]
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | Filter Operator [FIL_357]
+ | | | predicate:((ss_hdemo_sk is not null and ss_sold_time_sk is not null) and ss_store_sk is not null) (type: boolean)
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | | TableScan [TS_0]
+ | | | alias:store_sales
+ | | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | |<-Map 13 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_14]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_4]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_358]
+ | | predicate:((((hd_dep_count = 3) and (hd_vehicle_count <= 5)) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and hd_demo_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_2]
+ | | alias:household_demographics
+ | | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 60 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_271]
+ | sort order:
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: bigint)
+ | Group By Operator [GBY_215]
+ | | aggregations:["count(VALUE._col0)"]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 59 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_214]
+ | sort order:
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: bigint)
+ | Group By Operator [GBY_213]
+ | aggregations:["count()"]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_409]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | Statistics:Num rows: 8712 Data size: 4103352 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 63 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_210]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_196]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_384]
+ | | predicate:((s_store_name = 'ese') and s_store_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_194]
+ | | alias:store
+ | | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 58 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_208]
+ | key expressions:_col2 (type: int)
+ | Map-reduce partition columns:_col2 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_408]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col2"]
+ | | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 62 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_205]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_193]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_383]
+ | | predicate:(((t_hour = 11) and (t_minute >= 30)) and t_time_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_191]
+ | | alias:time_dim
+ | | Statistics:Num rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 57 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_203]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: int)
+ | Merge Join Operator [MERGEJOIN_407]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col0","_col2"]
+ | | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 56 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_198]
+ | | key expressions:_col1 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col0 (type: int), _col2 (type: int)
+ | | Select Operator [SEL_187]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_381]
+ | | predicate:((ss_hdemo_sk is not null and ss_sold_time_sk is not null) and ss_store_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_186]
+ | | alias:store_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 61 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_200]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_190]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_382]
+ | predicate:((((hd_dep_count = 3) and (hd_vehicle_count <= 5)) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and hd_demo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_188]
+ | alias:household_demographics
+ | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 68 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_274]
+ sort order:
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: bigint)
+ Group By Operator [GBY_246]
+ | aggregations:["count(VALUE._col0)"]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 67 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_245]
+ sort order:
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: bigint)
+ Group By Operator [GBY_244]
+ aggregations:["count()"]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_412]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | Statistics:Num rows: 8712 Data size: 4103352 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 71 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_241]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_227]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_388]
+ | predicate:((s_store_name = 'ese') and s_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_225]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 66 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_239]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_411]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col2"]
+ | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 70 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_236]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_224]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_387]
+ | predicate:(((t_hour = 12) and (t_minute < 30)) and t_time_sk is not null) (type: boolean)
+ | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_222]
+ | alias:time_dim
+ | Statistics:Num rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 65 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_234]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: int)
+ Merge Join Operator [MERGEJOIN_410]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2"]
+ | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 64 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_229]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col2 (type: int)
+ | Select Operator [SEL_218]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_385]
+ | predicate:((ss_hdemo_sk is not null and ss_sold_time_sk is not null) and ss_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_217]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 69 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_231]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_221]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_386]
+ predicate:((((hd_dep_count = 3) and (hd_vehicle_count <= 5)) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and hd_demo_sk is not null) (type: boolean)
+ Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_219]
+ alias:household_demographics
+ Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query89.q.out b/ql/src/test/results/clientpositive/perf/query89.q.out
new file mode 100644
index 0000000..6a68384
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query89.q.out
@@ -0,0 +1,224 @@
+PREHOOK: query: explain
+select *
+from(
+select i_category, i_class, i_brand,
+ s_store_name, s_company_name,
+ d_moy,
+ sum(ss_sales_price) sum_sales,
+ avg(sum(ss_sales_price)) over
+ (partition by i_category, i_brand, s_store_name, s_company_name)
+ avg_monthly_sales
+from item, store_sales, date_dim, store
+where store_sales.ss_item_sk = item.i_item_sk and
+ store_sales.ss_sold_date_sk = date_dim.d_date_sk and
+ store_sales.ss_store_sk = store.s_store_sk and
+ d_year in (2000) and
+ ((i_category in ('Home','Books','Electronics') and
+ i_class in ('wallpaper','parenting','musical')
+ )
+ or (i_category in ('Shoes','Jewelry','Men') and
+ i_class in ('womens','birdal','pants')
+ ))
+group by i_category, i_class, i_brand,
+ s_store_name, s_company_name, d_moy) tmp1
+where case when (avg_monthly_sales <> 0) then (abs(sum_sales - avg_monthly_sales) / avg_monthly_sales) else null end > 0.1
+order by sum_sales - avg_monthly_sales, s_store_name
+limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select *
+from(
+select i_category, i_class, i_brand,
+ s_store_name, s_company_name,
+ d_moy,
+ sum(ss_sales_price) sum_sales,
+ avg(sum(ss_sales_price)) over
+ (partition by i_category, i_brand, s_store_name, s_company_name)
+ avg_monthly_sales
+from item, store_sales, date_dim, store
+where store_sales.ss_item_sk = item.i_item_sk and
+ store_sales.ss_sold_date_sk = date_dim.d_date_sk and
+ store_sales.ss_store_sk = store.s_store_sk and
+ d_year in (2000) and
+ ((i_category in ('Home','Books','Electronics') and
+ i_class in ('wallpaper','parenting','musical')
+ )
+ or (i_category in ('Shoes','Jewelry','Men') and
+ i_class in ('womens','birdal','pants')
+ ))
+group by i_category, i_class, i_brand,
+ s_store_name, s_company_name, d_moy) tmp1
+where case when (avg_monthly_sales <> 0) then (abs(sum_sales - avg_monthly_sales) / avg_monthly_sales) else null end > 0.1
+order by sum_sales - avg_monthly_sales, s_store_name
+limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_46]
+ compressed:false
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_45]
+ Number of rows:100
+ Statistics:Num rows: 100 Data size: 143600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_44]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ | Statistics:Num rows: 25621 Data size: 36799001 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_43]
+ key expressions:(_col6 - _col7) (type: decimal(22,6)), _col3 (type: string)
+ sort order:++
+ Statistics:Num rows: 25621 Data size: 36799001 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: decimal(17,2)), _col7 (type: decimal(21,6))
+ Select Operator [SEL_40]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"]
+ Statistics:Num rows: 25621 Data size: 36799001 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_56]
+ predicate:(CASE WHEN ((avg_window_0 <> 0)) THEN ((abs((_col6 - avg_window_0)) / avg_window_0)) ELSE (null) END > 0.1) (type: boolean)
+ Statistics:Num rows: 25621 Data size: 36799001 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_39]
+ outputColumnNames:["avg_window_0","_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 76865 Data size: 110399877 Basic stats: COMPLETE Column stats: NONE
+ PTF Operator [PTF_38]
+ Function definitions:[{"Input definition":{"type:":"WINDOWING"}},{"name:":"windowingtablefunction","order by:":"_col0, _col2, _col3, _col4","partition by:":"_col0, _col2, _col3, _col4"}]
+ Statistics:Num rows: 76865 Data size: 110399877 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_37]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 76865 Data size: 110399877 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_36]
+ key expressions:_col0 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ sort order:++++
+ Statistics:Num rows: 76865 Data size: 110399877 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col5 (type: int), _col6 (type: decimal(17,2))
+ Select Operator [SEL_35]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 76865 Data size: 110399877 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_34]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: int), KEY._col4 (type: string), KEY._col5 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 76865 Data size: 110399877 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_33]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: int), _col4 (type: string), _col5 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: int), _col4 (type: string), _col5 (type: string)
+ sort order:++++++
+ Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col6 (type: decimal(17,2))
+ Group By Operator [GBY_32]
+ aggregations:["sum(_col7)"]
+ keys:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col10 (type: int), _col12 (type: string), _col13 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_31]
+ outputColumnNames:["_col1","_col2","_col3","_col10","_col12","_col13","_col7"]
+ Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_63]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col6 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col7","_col10","_col12","_col13"]
+ | Statistics:Num rows: 153730 Data size: 220799755 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_29]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string)
+ | Select Operator [SEL_15]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_60]
+ | predicate:s_store_sk is not null (type: boolean)
+ | Statistics:Num rows: 852 Data size: 1628138 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_14]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_27]
+ key expressions:_col6 (type: int)
+ Map-reduce partition columns:_col6 (type: int)
+ sort order:+
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col7 (type: decimal(7,2)), _col10 (type: int)
+ Merge Join Operator [MERGEJOIN_62]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col6","_col7","_col10"]
+ | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_24]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: int)
+ | Select Operator [SEL_13]
+ | outputColumnNames:["_col0","_col2"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_59]
+ | predicate:((d_year) IN (2000) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_11]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_22]
+ key expressions:_col4 (type: int)
+ Map-reduce partition columns:_col4 (type: int)
+ sort order:+
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col6 (type: int), _col7 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_61]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col1 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col4","_col6","_col7"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_17]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string)
+ | Select Operator [SEL_2]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_57]
+ | predicate:(((((i_category) IN ('Home', 'Books', 'Electronics') or (i_category) IN ('Shoes', 'Jewelry', 'Men')) and ((i_class) IN ('wallpaper', 'parenting', 'musical') or (i_class) IN ('womens', 'birdal', 'pants'))) and (((i_category) IN ('Home', 'Books', 'Electronics') and (i_class) IN ('wallpaper', 'parenting', 'musical')) or ((i_category) IN ('Shoes', 'Jewelry', 'Men') and (i_class) IN ('womens', 'birdal', 'pants')))) and i_item_sk is not null) (type: boolean)
+ | Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_0]
+ | alias:item
+ | Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_19]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: decimal(7,2))
+ Select Operator [SEL_10]
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_58]
+ predicate:((ss_item_sk is not null and ss_sold_date_sk is not null) and ss_store_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_9]
+ alias:store_sales
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query90.q.out b/ql/src/test/results/clientpositive/perf/query90.q.out
new file mode 100644
index 0000000..a1ace3b
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query90.q.out
@@ -0,0 +1,260 @@
+Warning: Shuffle Join MERGEJOIN[104][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 6' is a cross product
+PREHOOK: query: explain select cast(amc as decimal(15,4))/cast(pmc as decimal(15,4)) am_pm_ratio from ( select count(*) amc from web_sales, household_demographics , time_dim, web_page where ws_sold_time_sk = time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 6 and 6+1 and household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 5000 and 5200) at, ( select count(*) pmc from web_sales, household_demographics , time_dim, web_page where ws_sold_time_sk = time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 14 and 14+1 and household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 5000 and 5200) pt order by am_pm_ratio limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select cast(amc as decimal(15,4))/cast(pmc as decimal(15,4)) am_pm_ratio from ( select count(*) amc from web_sales, household_demographics , time_dim, web_page where ws_sold_time_sk = time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 6 and 6+1 and household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 5000 and 5200) at, ( select count(*) pmc from web_sales, household_demographics , time_dim, web_page where ws_sold_time_sk = time_dim.t_time_sk and ws_ship_hdemo_sk = household_demographics.hd_demo_sk and ws_web_page_sk = web_page.wp_web_page_sk and time_dim.t_hour between 14 and 14+1 and household_demographics.hd_dep_count = 8 and web_page.wp_char_count between 5000 and 5200) pt order by am_pm_ratio limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 12 <- Map 11 (SIMPLE_EDGE), Map 16 (SIMPLE_EDGE)
+Reducer 13 <- Map 17 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE)
+Reducer 14 <- Map 18 (SIMPLE_EDGE), Reducer 13 (SIMPLE_EDGE)
+Reducer 15 <- Reducer 14 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 9 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 10 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 15 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_70]
+ compressed:false
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_69]
+ Number of rows:100
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_68]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_67]
+ key expressions:_col0 (type: decimal(35,20))
+ sort order:+
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_66]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_104]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{}
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_64]
+ | sort order:
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: bigint)
+ | Group By Operator [GBY_60]
+ | | aggregations:["count(VALUE._col0)"]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_59]
+ | sort order:
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col0 (type: bigint)
+ | Group By Operator [GBY_58]
+ | aggregations:["count()"]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_103]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | | Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 18 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_55]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1151 Data size: 674337 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_41]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 1151 Data size: 674337 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_97]
+ | | predicate:(wp_char_count BETWEEN 5000 AND 5200 and wp_web_page_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1151 Data size: 674337 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_39]
+ | | alias:web_page
+ | | Statistics:Num rows: 4602 Data size: 2696178 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_53]
+ | key expressions:_col2 (type: int)
+ | Map-reduce partition columns:_col2 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 23760 Data size: 11190960 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_102]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col2"]
+ | | Statistics:Num rows: 23760 Data size: 11190960 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 17 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_50]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 21600 Data size: 10173600 Basic stats: COMPLETE Column stats: NONE
+ | | Select Operator [SEL_38]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 21600 Data size: 10173600 Basic stats: COMPLETE Column stats: NONE
+ | | Filter Operator [FIL_96]
+ | | predicate:(t_hour BETWEEN 14 AND 15 and t_time_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 21600 Data size: 10173600 Basic stats: COMPLETE Column stats: NONE
+ | | TableScan [TS_36]
+ | | alias:time_dim
+ | | Statistics:Num rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_48]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col2 (type: int)
+ | Merge Join Operator [MERGEJOIN_101]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col0","_col2"]
+ | | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 11 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_43]
+ | | key expressions:_col1 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col0 (type: int), _col2 (type: int)
+ | | Select Operator [SEL_32]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_94]
+ | | predicate:((ws_ship_hdemo_sk is not null and ws_sold_time_sk is not null) and ws_web_page_sk is not null) (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_31]
+ | | alias:web_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 16 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_45]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_35]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_95]
+ | predicate:((hd_dep_count = 8) and hd_demo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_33]
+ | alias:household_demographics
+ | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_63]
+ sort order:
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: bigint)
+ Group By Operator [GBY_29]
+ | aggregations:["count(VALUE._col0)"]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_28]
+ sort order:
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: bigint)
+ Group By Operator [GBY_27]
+ aggregations:["count()"]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_100]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | Statistics:Num rows: 26136 Data size: 12310056 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_24]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1151 Data size: 674337 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_10]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1151 Data size: 674337 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_93]
+ | predicate:(wp_char_count BETWEEN 5000 AND 5200 and wp_web_page_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1151 Data size: 674337 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_8]
+ | alias:web_page
+ | Statistics:Num rows: 4602 Data size: 2696178 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_22]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 23760 Data size: 11190960 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_99]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col2"]
+ | Statistics:Num rows: 23760 Data size: 11190960 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_19]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 21600 Data size: 10173600 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 21600 Data size: 10173600 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_92]
+ | predicate:(t_hour BETWEEN 6 AND 7 and t_time_sk is not null) (type: boolean)
+ | Statistics:Num rows: 21600 Data size: 10173600 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:time_dim
+ | Statistics:Num rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_17]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: int)
+ Merge Join Operator [MERGEJOIN_98]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2"]
+ | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_12]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col2 (type: int)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_90]
+ | predicate:((ws_ship_hdemo_sk is not null and ws_sold_time_sk is not null) and ws_web_page_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:web_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_14]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_91]
+ predicate:((hd_dep_count = 8) and hd_demo_sk is not null) (type: boolean)
+ Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:household_demographics
+ Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query91.q.out b/ql/src/test/results/clientpositive/perf/query91.q.out
new file mode 100644
index 0000000..6e0096c
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query91.q.out
@@ -0,0 +1,232 @@
+PREHOOK: query: explain select cc_call_center_id Call_Center, cc_name Call_Center_Name, cc_manager Manager, sum(cr_net_loss) Returns_Loss from call_center, catalog_returns, date_dim, customer, customer_address, customer_demographics, household_demographics where catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk and catalog_returns.cr_returned_date_sk = date_dim.d_date_sk and catalog_returns.cr_returning_customer_sk= customer.c_customer_sk and customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk and household_demographics.hd_demo_sk = customer.c_current_hdemo_sk and customer_address.ca_address_sk = customer.c_current_addr_sk and d_year = 1999 and d_moy = 11 and ( (cd_marital_status = 'M' and cd_education_status = 'Unknown') or(cd_marital_status = 'W' and cd_education_status = 'Advanced Degree')) and hd_buy_potential like '0-500%' and ca_gmt_offset = -7 group by cc_call_center_id,cc_name,cc_manager,cd_marital_status,cd_education_status order by Returns_Loss desc
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select cc_call_center_id Call_Center, cc_name Call_Center_Name, cc_manager Manager, sum(cr_net_loss) Returns_Loss from call_center, catalog_returns, date_dim, customer, customer_address, customer_demographics, household_demographics where catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk and catalog_returns.cr_returned_date_sk = date_dim.d_date_sk and catalog_returns.cr_returning_customer_sk= customer.c_customer_sk and customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk and household_demographics.hd_demo_sk = customer.c_current_hdemo_sk and customer_address.ca_address_sk = customer.c_current_addr_sk and d_year = 1999 and d_moy = 11 and ( (cd_marital_status = 'M' and cd_education_status = 'Unknown') or(cd_marital_status = 'W' and cd_education_status = 'Advanced Degree')) and hd_buy_potential like '0-500%' and ca_gmt_offset = -7 group by cc_call_center_id,cc_name,cc_manager,cd_marital_status,cd_education_status order by Returns_Loss desc
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 10 (SIMPLE_EDGE)
+Reducer 3 <- Map 11 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 12 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 13 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 14 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Map 15 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE)
+Reducer 8 <- Reducer 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 9
+ File Output Operator [FS_59]
+ compressed:false
+ Statistics:Num rows: 6655000 Data size: 6754026054 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Select Operator [SEL_58]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 6655000 Data size: 6754026054 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_57]
+ key expressions:_col3 (type: decimal(17,2))
+ sort order:-
+ Statistics:Num rows: 6655000 Data size: 6754026054 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string)
+ Select Operator [SEL_56]
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 6655000 Data size: 6754026054 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_55]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: string), KEY._col3 (type: string), KEY._col4 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 6655000 Data size: 6754026054 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_54]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string)
+ sort order:+++++
+ Statistics:Num rows: 13310000 Data size: 13508052108 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: decimal(17,2))
+ Group By Operator [GBY_53]
+ aggregations:["sum(_col7)"]
+ keys:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col18 (type: string), _col19 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 13310000 Data size: 13508052108 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_52]
+ outputColumnNames:["_col1","_col2","_col3","_col18","_col19","_col7"]
+ Statistics:Num rows: 13310000 Data size: 13508052108 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_99]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col13 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col7","_col18","_col19"]
+ | Statistics:Num rows: 13310000 Data size: 13508052108 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_50]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_21]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_93]
+ | predicate:((hd_buy_potential like '0-500%') and hd_demo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_19]
+ | alias:household_demographics
+ | Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_48]
+ key expressions:_col13 (type: int)
+ Map-reduce partition columns:_col13 (type: int)
+ sort order:+
+ Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col7 (type: decimal(7,2)), _col18 (type: string), _col19 (type: string)
+ Merge Join Operator [MERGEJOIN_98]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col12 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col7","_col13","_col18","_col19"]
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_45]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 4950 Data size: 1792764 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string)
+ | Select Operator [SEL_14]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 4950 Data size: 1792764 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_92]
+ | predicate:(((((cd_marital_status = 'M') or (cd_marital_status = 'W')) and ((cd_education_status = 'Unknown') or (cd_education_status = 'Advanced Degree'))) and (((cd_marital_status = 'M') and (cd_education_status = 'Unknown')) or ((cd_marital_status = 'W') and (cd_education_status = 'Advanced Degree')))) and cd_demo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 4950 Data size: 1792764 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_12]
+ | alias:customer_demographics
+ | Statistics:Num rows: 19800 Data size: 7171059 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_43]
+ key expressions:_col12 (type: int)
+ Map-reduce partition columns:_col12 (type: int)
+ sort order:+
+ Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col7 (type: decimal(7,2)), _col13 (type: int)
+ Merge Join Operator [MERGEJOIN_97]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col14 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col7","_col12","_col13"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_40]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_11]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_91]
+ | predicate:((ca_gmt_offset = -7) and ca_address_sk is not null) (type: boolean)
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_9]
+ | alias:customer_address
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_38]
+ key expressions:_col14 (type: int)
+ Map-reduce partition columns:_col14 (type: int)
+ sort order:+
+ Statistics:Num rows: 5500000 Data size: 4730111191 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col7 (type: decimal(7,2)), _col12 (type: int), _col13 (type: int)
+ Merge Join Operator [MERGEJOIN_96]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col5 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col7","_col12","_col13","_col14"]
+ | Statistics:Num rows: 5500000 Data size: 4730111191 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_35]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 5000000 Data size: 4300100990 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: int), _col2 (type: int), _col3 (type: int)
+ | Select Operator [SEL_8]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 5000000 Data size: 4300100990 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_90]
+ | predicate:(((c_customer_sk is not null and c_current_addr_sk is not null) and c_current_cdemo_sk is not null) and c_current_hdemo_sk is not null) (type: boolean)
+ | Statistics:Num rows: 5000000 Data size: 4300100990 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_7]
+ | alias:customer
+ | Statistics:Num rows: 80000000 Data size: 68801615852 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_33]
+ key expressions:_col5 (type: int)
+ Map-reduce partition columns:_col5 (type: int)
+ sort order:+
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col7 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_95]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col4 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col5","_col7"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_30]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_6]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_89]
+ | predicate:(((d_year = 1999) and (d_moy = 11)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 9131 Data size: 10217589 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_4]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_28]
+ key expressions:_col4 (type: int)
+ Map-reduce partition columns:_col4 (type: int)
+ sort order:+
+ Statistics:Num rows: 33 Data size: 67485 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string), _col5 (type: int), _col7 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_94]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col2 (type: int)"}
+ | outputColumnNames:["_col1","_col2","_col3","_col4","_col5","_col7"]
+ | Statistics:Num rows: 33 Data size: 67485 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_23]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 30 Data size: 61350 Basic stats: COMPLETE Column stats: NONE
+ | value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: string)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3"]
+ | Statistics:Num rows: 30 Data size: 61350 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_87]
+ | predicate:cc_call_center_sk is not null (type: boolean)
+ | Statistics:Num rows: 30 Data size: 61350 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_0]
+ | alias:call_center
+ | Statistics:Num rows: 60 Data size: 122700 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_25]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col1 (type: int), _col3 (type: decimal(7,2))
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_88]
+ predicate:((cr_call_center_sk is not null and cr_returned_date_sk is not null) and cr_returning_customer_sk is not null) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_2]
+ alias:catalog_returns
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query92.q.out b/ql/src/test/results/clientpositive/perf/query92.q.out
new file mode 100644
index 0000000..6c94599
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query92.q.out
@@ -0,0 +1,160 @@
+PREHOOK: query: explain SELECT sum(case when ssci.customer_sk is not null and csci.customer_sk is null then 1 else 0 end) as store_only, sum(case when ssci.customer_sk is null and csci.customer_sk is not null then 1 else 0 end) as catalog_only, sum(case when ssci.customer_sk is not null and csci.customer_sk is not null then 1 else 0 end) as store_and_catalog FROM (SELECT ss.ss_customer_sk as customer_sk, ss.ss_item_sk as item_sk FROM store_sales ss JOIN date_dim d1 ON (ss.ss_sold_date_sk = d1.d_date_sk) WHERE d1.d_month_seq >= 1206 and d1.d_month_seq <= 1217 GROUP BY ss.ss_customer_sk, ss.ss_item_sk) ssci FULL OUTER JOIN (SELECT cs.cs_bill_customer_sk as customer_sk, cs.cs_item_sk as item_sk FROM catalog_sales cs JOIN date_dim d2 ON (cs.cs_sold_date_sk = d2.d_date_sk) WHERE d2.d_month_seq >= 1206 and d2.d_month_seq <= 1217 GROUP BY cs.cs_bill_customer_sk, cs.cs_item_sk) csci ON (ssci.customer_sk=csci.customer_sk and ssci.item_sk = csci.item_sk)
+PREHOOK: type: QUERY
+POSTHOOK: query: explain SELECT sum(case when ssci.customer_sk is not null and csci.customer_sk is null then 1 else 0 end) as store_only, sum(case when ssci.customer_sk is null and csci.customer_sk is not null then 1 else 0 end) as catalog_only, sum(case when ssci.customer_sk is not null and csci.customer_sk is not null then 1 else 0 end) as store_and_catalog FROM (SELECT ss.ss_customer_sk as customer_sk, ss.ss_item_sk as item_sk FROM store_sales ss JOIN date_dim d1 ON (ss.ss_sold_date_sk = d1.d_date_sk) WHERE d1.d_month_seq >= 1206 and d1.d_month_seq <= 1217 GROUP BY ss.ss_customer_sk, ss.ss_item_sk) ssci FULL OUTER JOIN (SELECT cs.cs_bill_customer_sk as customer_sk, cs.cs_item_sk as item_sk FROM catalog_sales cs JOIN date_dim d2 ON (cs.cs_sold_date_sk = d2.d_date_sk) WHERE d2.d_month_seq >= 1206 and d2.d_month_seq <= 1217 GROUP BY cs.cs_bill_customer_sk, cs.cs_item_sk) csci ON (ssci.customer_sk=csci.customer_sk and ssci.item_sk = csci.item_sk)
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 8 <- Map 10 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 5
+ File Output Operator [FS_39]
+ compressed:false
+ Statistics:Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Group By Operator [GBY_37]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_36]
+ sort order:
+ Statistics:Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: bigint), _col1 (type: bigint), _col2 (type: bigint)
+ Group By Operator [GBY_35]
+ aggregations:["sum(_col0)","sum(_col1)","sum(_col2)"]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_33]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 2454 Data size: 2746629 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_50]
+ | condition map:[{"":"Outer Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int), _col1 (type: int)","1":"_col0 (type: int), _col1 (type: int)"}
+ | outputColumnNames:["_col0","_col2"]
+ | Statistics:Num rows: 2454 Data size: 2746629 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_30]
+ | key expressions:_col0 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 2231 Data size: 2496936 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_14]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 2231 Data size: 2496936 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_13]
+ | | keys:KEY._col0 (type: int), KEY._col1 (type: int)
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 2231 Data size: 2496936 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 2 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_12]
+ | key expressions:_col0 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 4463 Data size: 4994992 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_11]
+ | keys:_col1 (type: int), _col2 (type: int)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 4463 Data size: 4994992 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_48]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2"]
+ | | Statistics:Num rows: 4463 Data size: 4994992 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 1 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_6]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: int)
+ | | Select Operator [SEL_1]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_44]
+ | | predicate:ss_sold_date_sk is not null (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_0]
+ | | alias:ss
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 6 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_8]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 4058 Data size: 4540902 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_4]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 4058 Data size: 4540902 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_45]
+ | predicate:(((d_month_seq >= 1206) and (d_month_seq <= 1217)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 4058 Data size: 4540902 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_2]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_31]
+ key expressions:_col0 (type: int), _col1 (type: int)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ sort order:++
+ Statistics:Num rows: 2231 Data size: 2496936 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_28]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: int)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 2231 Data size: 2496936 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_27]
+ key expressions:_col0 (type: int), _col1 (type: int)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ sort order:++
+ Statistics:Num rows: 4463 Data size: 4994992 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_26]
+ keys:_col1 (type: int), _col2 (type: int)
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 4463 Data size: 4994992 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_49]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2"]
+ | Statistics:Num rows: 4463 Data size: 4994992 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_23]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 4058 Data size: 4540902 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_19]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 4058 Data size: 4540902 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_47]
+ | predicate:(((d_month_seq >= 1206) and (d_month_seq <= 1217)) and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 4058 Data size: 4540902 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_17]
+ | alias:d1
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_21]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: int)
+ Select Operator [SEL_16]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_46]
+ predicate:cs_sold_date_sk is not null (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_15]
+ alias:cs
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query93.q.out b/ql/src/test/results/clientpositive/perf/query93.q.out
new file mode 100644
index 0000000..b51b639
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query93.q.out
@@ -0,0 +1,114 @@
+PREHOOK: query: explain select ss_customer_sk ,sum(act_sales) sumsales from (select ss_item_sk ,ss_ticket_number ,ss_customer_sk ,case when sr_return_quantity is not null then (ss_quantity-sr_return_quantity)*ss_sales_price else (ss_quantity*ss_sales_price) end act_sales from store_sales left outer join store_returns on (store_returns.sr_item_sk = store_sales.ss_item_sk and store_returns.sr_ticket_number = store_sales.ss_ticket_number) ,reason where store_returns.sr_reason_sk = reason.r_reason_sk and r_reason_desc = 'Did not like the warranty') t group by ss_customer_sk order by sumsales, ss_customer_sk limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select ss_customer_sk ,sum(act_sales) sumsales from (select ss_item_sk ,ss_ticket_number ,ss_customer_sk ,case when sr_return_quantity is not null then (ss_quantity-sr_return_quantity)*ss_sales_price else (ss_quantity*ss_sales_price) end act_sales from store_sales left outer join store_returns on (store_returns.sr_item_sk = store_sales.ss_item_sk and store_returns.sr_ticket_number = store_sales.ss_ticket_number) ,reason where store_returns.sr_reason_sk = reason.r_reason_sk and r_reason_desc = 'Did not like the warranty') t group by ss_customer_sk order by sumsales, ss_customer_sk limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 3 <- Map 7 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 5
+ File Output Operator [FS_24]
+ compressed:false
+ Statistics:Num rows: 9 Data size: 1875 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_23]
+ Number of rows:100
+ Statistics:Num rows: 9 Data size: 1875 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_22]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 9 Data size: 1875 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_21]
+ key expressions:_col1 (type: decimal(28,2)), _col0 (type: int)
+ sort order:++
+ Statistics:Num rows: 9 Data size: 1875 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_19]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: int)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 9 Data size: 1875 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_18]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 19 Data size: 3960 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: decimal(28,2))
+ Group By Operator [GBY_17]
+ aggregations:["sum(_col1)"]
+ keys:_col0 (type: int)
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 19 Data size: 3960 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_15]
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 19 Data size: 3960 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_33]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col6 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col4","_col8"]
+ | Statistics:Num rows: 19 Data size: 3960 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_13]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18 Data size: 3600 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_6]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18 Data size: 3600 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_31]
+ | predicate:((r_reason_desc = 'Did not like the warranty') and r_reason_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18 Data size: 3600 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_4]
+ | alias:reason
+ | Statistics:Num rows: 72 Data size: 14400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_11]
+ key expressions:_col6 (type: int)
+ Map-reduce partition columns:_col6 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)), _col8 (type: int)
+ Filter Operator [FIL_29]
+ predicate:_col6 is not null (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Merge Join Operator [MERGEJOIN_32]
+ | condition map:[{"":"Left Outer Join0 to 1"}]
+ | keys:{"0":"_col0 (type: int), _col2 (type: int)","1":"_col0 (type: int), _col2 (type: int)"}
+ | outputColumnNames:["_col1","_col3","_col4","_col6","_col8"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_7]
+ | key expressions:_col0 (type: int), _col2 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col2 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col1 (type: int), _col3 (type: int), _col4 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_8]
+ key expressions:_col0 (type: int), _col2 (type: int)
+ Map-reduce partition columns:_col0 (type: int), _col2 (type: int)
+ sort order:++
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col3 (type: int)
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_2]
+ alias:store_returns
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query94.q.out b/ql/src/test/results/clientpositive/perf/query94.q.out
new file mode 100644
index 0000000..389d6e7
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query94.q.out
@@ -0,0 +1,228 @@
+PREHOOK: query: explain SELECT count(distinct ws_order_number) as order_count, sum(ws_ext_ship_cost) as total_shipping_cost, sum(ws_net_profit) as total_net_profit FROM web_sales ws1 JOIN customer_address ca ON (ws1.ws_ship_addr_sk = ca.ca_address_sk) JOIN web_site s ON (ws1.ws_web_site_sk = s.web_site_sk) JOIN date_dim d ON (ws1.ws_ship_date_sk = d.d_date_sk) LEFT SEMI JOIN (SELECT ws2.ws_order_number as ws_order_number FROM web_sales ws2 JOIN web_sales ws3 ON (ws2.ws_order_number = ws3.ws_order_number) WHERE ws2.ws_warehouse_sk <> ws3.ws_warehouse_sk ) ws_wh1 ON (ws1.ws_order_number = ws_wh1.ws_order_number) LEFT OUTER JOIN web_returns wr1 ON (ws1.ws_order_number = wr1.wr_order_number) WHERE d.d_date between '1999-05-01' and '1999-07-01' and ca.ca_state = 'TX' and s.web_company_name = 'pri' and wr1.wr_order_number is null limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain SELECT count(distinct ws_order_number) as order_count, sum(ws_ext_ship_cost) as total_shipping_cost, sum(ws_net_profit) as total_net_profit FROM web_sales ws1 JOIN customer_address ca ON (ws1.ws_ship_addr_sk = ca.ca_address_sk) JOIN web_site s ON (ws1.ws_web_site_sk = s.web_site_sk) JOIN date_dim d ON (ws1.ws_ship_date_sk = d.d_date_sk) LEFT SEMI JOIN (SELECT ws2.ws_order_number as ws_order_number FROM web_sales ws2 JOIN web_sales ws3 ON (ws2.ws_order_number = ws3.ws_order_number) WHERE ws2.ws_warehouse_sk <> ws3.ws_warehouse_sk ) ws_wh1 ON (ws1.ws_order_number = ws_wh1.ws_order_number) LEFT OUTER JOIN web_returns wr1 ON (ws1.ws_order_number = wr1.wr_order_number) WHERE d.d_date between '1999-05-01' and '1999-07-01' and ca.ca_state = 'TX' and s.web_company_name = 'pri' and wr1.wr_order_number is null limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 3 <- Map 11 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 12 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 13 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Map 14 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE)
+Reducer 7 <- Reducer 6 (SIMPLE_EDGE)
+Reducer 9 <- Map 10 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 7
+ File Output Operator [FS_56]
+ compressed:false
+ Statistics:Num rows: 1 Data size: 344 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_55]
+ Number of rows:100
+ Statistics:Num rows: 1 Data size: 344 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_53]
+ | aggregations:["count(DISTINCT KEY._col0:0._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 344 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 6 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_52]
+ key expressions:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 7320500 Data size: 7429428820 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(17,2)), _col3 (type: decimal(17,2))
+ Group By Operator [GBY_51]
+ aggregations:["count(DISTINCT _col3)","sum(_col4)","sum(_col5)"]
+ keys:_col3 (type: int)
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 7320500 Data size: 7429428820 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_50]
+ outputColumnNames:["_col3","_col4","_col5"]
+ Statistics:Num rows: 7320500 Data size: 7429428820 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_78]
+ predicate:_col12 is null (type: boolean)
+ Statistics:Num rows: 7320500 Data size: 7429428820 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_92]
+ | condition map:[{"":"Left Outer Join0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col3","_col4","_col5","_col12"]
+ | Statistics:Num rows: 14641000 Data size: 14858857640 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_47]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Select Operator [SEL_23]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_22]
+ | alias:wr1
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_46]
+ key expressions:_col3 (type: int)
+ Map-reduce partition columns:_col3 (type: int)
+ sort order:+
+ Statistics:Num rows: 13310000 Data size: 13508052108 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col4 (type: decimal(7,2)), _col5 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_91]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col3","_col4","_col5"]
+ | Statistics:Num rows: 13310000 Data size: 13508052108 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_44]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_21]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_85]
+ | predicate:(d_date BETWEEN '1999-05-01' AND '1999-07-01' and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_19]
+ | alias:d
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_42]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: int), _col4 (type: decimal(7,2)), _col5 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_90]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col3","_col4","_col5"]
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 12 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_39]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 21 Data size: 38852 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_18]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 21 Data size: 38852 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_84]
+ | predicate:((web_company_name = 'pri') and web_site_sk is not null) (type: boolean)
+ | Statistics:Num rows: 21 Data size: 38852 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_16]
+ | alias:s
+ | Statistics:Num rows: 84 Data size: 155408 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_37]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)), _col5 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_89]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_34]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_15]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_83]
+ | predicate:((ca_state = 'TX') and ca_address_sk is not null) (type: boolean)
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_13]
+ | alias:ca
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_32]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)), _col5 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_88]
+ | condition map:[{"":"Left Semi Join 0 to 1"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_27]
+ | key expressions:_col3 (type: int)
+ | Map-reduce partition columns:_col3 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col4 (type: decimal(7,2)), _col5 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_79]
+ | predicate:(((ws_order_number is not null and ws_ship_addr_sk is not null) and ws_web_site_sk is not null) and ws_ship_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:ws1
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_29]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Group By Operator [GBY_25]
+ keys:_col0 (type: int)
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Select Operator [SEL_12]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_80]
+ predicate:(_col0 <> _col2) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Merge Join Operator [MERGEJOIN_87]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col1 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_9]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int)
+ | Select Operator [SEL_5]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_82]
+ | predicate:ws_order_number is not null (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_4]
+ | alias:ws1
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_7]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int)
+ Select Operator [SEL_3]
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_81]
+ predicate:ws_order_number is not null (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_2]
+ alias:ws1
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query95.q.out b/ql/src/test/results/clientpositive/perf/query95.q.out
new file mode 100644
index 0000000..712dfdd
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query95.q.out
@@ -0,0 +1,275 @@
+PREHOOK: query: explain SELECT count(distinct ws1.ws_order_number) as order_count, sum(ws1.ws_ext_ship_cost) as total_shipping_cost, sum(ws1.ws_net_profit) as total_net_profit FROM web_sales ws1 JOIN customer_address ca ON (ws1.ws_ship_addr_sk = ca.ca_address_sk) JOIN web_site s ON (ws1.ws_web_site_sk = s.web_site_sk) JOIN date_dim d ON (ws1.ws_ship_date_sk = d.d_date_sk) LEFT SEMI JOIN (SELECT ws2.ws_order_number as ws_order_number FROM web_sales ws2 JOIN web_sales ws3 ON (ws2.ws_order_number = ws3.ws_order_number) WHERE ws2.ws_warehouse_sk <> ws3.ws_warehouse_sk ) ws_wh1 ON (ws1.ws_order_number = ws_wh1.ws_order_number) LEFT SEMI JOIN (SELECT wr_order_number FROM web_returns wr JOIN (SELECT ws4.ws_order_number as ws_order_number FROM web_sales ws4 JOIN web_sales ws5 ON (ws4.ws_order_number = ws5.ws_order_number) WHERE ws4.ws_warehouse_sk <> ws5.ws_warehouse_sk ) ws_wh2 ON (wr.wr_order_number = ws_wh2.ws_order_number)) tmp1 ON (ws1.ws_order_number = tmp1.wr_order_number) WHERE d.d_date between '2002-05-01' and '2002-06-30' and ca.ca_state = 'GA' and s.web_company_name = 'pri'
+PREHOOK: type: QUERY
+POSTHOOK: query: explain SELECT count(distinct ws1.ws_order_number) as order_count, sum(ws1.ws_ext_ship_cost) as total_shipping_cost, sum(ws1.ws_net_profit) as total_net_profit FROM web_sales ws1 JOIN customer_address ca ON (ws1.ws_ship_addr_sk = ca.ca_address_sk) JOIN web_site s ON (ws1.ws_web_site_sk = s.web_site_sk) JOIN date_dim d ON (ws1.ws_ship_date_sk = d.d_date_sk) LEFT SEMI JOIN (SELECT ws2.ws_order_number as ws_order_number FROM web_sales ws2 JOIN web_sales ws3 ON (ws2.ws_order_number = ws3.ws_order_number) WHERE ws2.ws_warehouse_sk <> ws3.ws_warehouse_sk ) ws_wh1 ON (ws1.ws_order_number = ws_wh1.ws_order_number) LEFT SEMI JOIN (SELECT wr_order_number FROM web_returns wr JOIN (SELECT ws4.ws_order_number as ws_order_number FROM web_sales ws4 JOIN web_sales ws5 ON (ws4.ws_order_number = ws5.ws_order_number) WHERE ws4.ws_warehouse_sk <> ws5.ws_warehouse_sk ) ws_wh2 ON (wr.wr_order_number = ws_wh2.ws_order_number)) tmp1 ON (ws1.ws_order_number = tmp1.wr_order_number) WHERE d.d_date between '2002-05-01' and '2002-06-30' and ca.ca_state = 'GA' and s.web_company_name = 'pri'
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 11 <- Map 10 (SIMPLE_EDGE), Reducer 13 (SIMPLE_EDGE)
+Reducer 13 <- Map 12 (SIMPLE_EDGE), Map 14 (SIMPLE_EDGE)
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE)
+Reducer 3 <- Map 15 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 16 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Map 17 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+Reducer 8 <- Map 7 (SIMPLE_EDGE), Map 9 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 6
+ File Output Operator [FS_72]
+ compressed:false
+ Statistics:Num rows: 1 Data size: 344 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Group By Operator [GBY_70]
+ | aggregations:["count(DISTINCT KEY._col0:0._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 344 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_69]
+ key expressions:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 13310000 Data size: 13508052108 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(17,2)), _col3 (type: decimal(17,2))
+ Group By Operator [GBY_68]
+ aggregations:["count(DISTINCT _col3)","sum(_col4)","sum(_col5)"]
+ keys:_col3 (type: int)
+ outputColumnNames:["_col0","_col1","_col2","_col3"]
+ Statistics:Num rows: 13310000 Data size: 13508052108 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_133]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col3","_col4","_col5"]
+ | Statistics:Num rows: 13310000 Data size: 13508052108 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 17 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_65]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_40]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_126]
+ | predicate:(d_date BETWEEN '2002-05-01' AND '2002-06-30' and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_38]
+ | alias:d
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_63]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: int), _col4 (type: decimal(7,2)), _col5 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_132]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col3","_col4","_col5"]
+ | Statistics:Num rows: 12100000 Data size: 12280047105 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 16 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_60]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 21 Data size: 38852 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_37]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 21 Data size: 38852 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_125]
+ | predicate:((web_company_name = 'pri') and web_site_sk is not null) (type: boolean)
+ | Statistics:Num rows: 21 Data size: 38852 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_35]
+ | alias:s
+ | Statistics:Num rows: 84 Data size: 155408 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_58]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)), _col5 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_131]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 11000000 Data size: 11163678945 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 15 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_55]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_34]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_124]
+ | predicate:((ca_state = 'GA') and ca_address_sk is not null) (type: boolean)
+ | Statistics:Num rows: 10000000 Data size: 10148798821 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_32]
+ | alias:ca
+ | Statistics:Num rows: 40000000 Data size: 40595195284 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_53]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 2 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: decimal(7,2)), _col5 (type: decimal(7,2))
+ Merge Join Operator [MERGEJOIN_130]
+ | condition map:[{"":"Left Semi Join 0 to 1"},{"":"Left Semi Join 0 to 2"}]
+ | keys:{"0":"_col3 (type: int)","1":"_col0 (type: int)","2":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 2 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_46]
+ | key expressions:_col3 (type: int)
+ | Map-reduce partition columns:_col3 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col1 (type: int), _col2 (type: int), _col4 (type: decimal(7,2)), _col5 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_116]
+ | predicate:(((ws_order_number is not null and ws_ship_addr_sk is not null) and ws_web_site_sk is not null) and ws_ship_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:ws1
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 11 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_50]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Group By Operator [GBY_44]
+ | keys:_col0 (type: int)
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_129]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 10 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_27]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Select Operator [SEL_14]
+ | | outputColumnNames:["_col0"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_120]
+ | | predicate:wr_order_number is not null (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_13]
+ | | alias:wr
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Reducer 13 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_29]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Select Operator [SEL_25]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_121]
+ | predicate:(_col0 <> _col2) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_128]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col1 (type: int)","1":"_col1 (type: int)"}
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 12 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_20]
+ | | key expressions:_col1 (type: int)
+ | | Map-reduce partition columns:_col1 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col0 (type: int)
+ | | Select Operator [SEL_16]
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_122]
+ | | predicate:ws_order_number is not null (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_15]
+ | | alias:ws1
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 14 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_22]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int)
+ | Select Operator [SEL_18]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_123]
+ | predicate:ws_order_number is not null (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_17]
+ | alias:ws1
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Reducer 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_48]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Group By Operator [GBY_42]
+ keys:_col0 (type: int)
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Select Operator [SEL_12]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_117]
+ predicate:(_col0 <> _col2) (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Merge Join Operator [MERGEJOIN_127]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col1 (type: int)"}
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_7]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int)
+ | Select Operator [SEL_3]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_118]
+ | predicate:ws_order_number is not null (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_2]
+ | alias:ws1
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_9]
+ key expressions:_col1 (type: int)
+ Map-reduce partition columns:_col1 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col0 (type: int)
+ Select Operator [SEL_5]
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_119]
+ predicate:ws_order_number is not null (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_4]
+ alias:ws1
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query96.q.out b/ql/src/test/results/clientpositive/perf/query96.q.out
new file mode 100644
index 0000000..81438b1
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query96.q.out
@@ -0,0 +1,135 @@
+PREHOOK: query: explain select count(*) as c from store_sales ,household_demographics ,time_dim, store where store_sales.ss_sold_time_sk = time_dim.t_time_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_store_sk = store.s_store_sk and time_dim.t_hour = 8 and time_dim.t_minute >= 30 and household_demographics.hd_dep_count = 5 and store.s_store_name = 'ese' order by c limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select count(*) as c from store_sales ,household_demographics ,time_dim, store where store_sales.ss_sold_time_sk = time_dim.t_time_sk and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk and store_sales.ss_store_sk = store.s_store_sk and time_dim.t_hour = 8 and time_dim.t_minute >= 30 and household_demographics.hd_dep_count = 5 and store.s_store_name = 'ese' order by c limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 3 <- Map 8 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Map 9 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 6
+ File Output Operator [FS_34]
+ compressed:false
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_33]
+ Number of rows:100
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_32]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_31]
+ key expressions:_col0 (type: bigint)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_29]
+ | aggregations:["count(VALUE._col0)"]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_28]
+ sort order:
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: bigint)
+ Group By Operator [GBY_27]
+ aggregations:["count()"]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_50]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col2 (type: int)","1":"_col0 (type: int)"}
+ | Statistics:Num rows: 8712 Data size: 4103352 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 9 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_24]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_10]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_47]
+ | predicate:((s_store_name = 'ese') and s_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 426 Data size: 814069 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_8]
+ | alias:store
+ | Statistics:Num rows: 1704 Data size: 3256276 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_22]
+ key expressions:_col2 (type: int)
+ Map-reduce partition columns:_col2 (type: int)
+ sort order:+
+ Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_49]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col2"]
+ | Statistics:Num rows: 7920 Data size: 3730320 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_19]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_46]
+ | predicate:(((t_hour = 8) and (t_minute >= 30)) and t_time_sk is not null) (type: boolean)
+ | Statistics:Num rows: 7200 Data size: 3391200 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:time_dim
+ | Statistics:Num rows: 86400 Data size: 40694400 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_17]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: int)
+ Merge Join Operator [MERGEJOIN_48]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2"]
+ | Statistics:Num rows: 1980 Data size: 211860 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_12]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col2 (type: int)
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_44]
+ | predicate:((ss_hdemo_sk is not null and ss_sold_time_sk is not null) and ss_store_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_14]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0"]
+ Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_45]
+ predicate:((hd_dep_count = 5) and hd_demo_sk is not null) (type: boolean)
+ Statistics:Num rows: 1800 Data size: 192600 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:household_demographics
+ Statistics:Num rows: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query97.q.out b/ql/src/test/results/clientpositive/perf/query97.q.out
new file mode 100644
index 0000000..bea097d
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query97.q.out
@@ -0,0 +1,163 @@
+PREHOOK: query: explain select sum(case when ssci.customer_sk is not null and csci.customer_sk is null then 1 else 0 end) store_only ,sum(case when ssci.customer_sk is null and csci.customer_sk is not null then 1 else 0 end) catalog_only ,sum(case when ssci.customer_sk is not null and csci.customer_sk is not null then 1 else 0 end) store_and_catalog from ( select ss_customer_sk customer_sk ,ss_item_sk item_sk from store_sales JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk where d_month_seq between 1193 and 1193 + 11 group by ss_customer_sk ,ss_item_sk) ssci full outer join ( select cs_bill_customer_sk customer_sk ,cs_item_sk item_sk from catalog_sales JOIN date_dim ON catalog_sales.cs_sold_date_sk = date_dim.d_date_sk where d_month_seq between 1193 and 1193 + 11 group by cs_bill_customer_sk ,cs_item_sk) csci on (ssci.customer_sk=csci.customer_sk and ssci.item_sk = csci.item_sk) limit 100
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select sum(case when ssci.customer_sk is not null and csci.customer_sk is null then 1 else 0 end) store_only ,sum(case when ssci.customer_sk is null and csci.customer_sk is not null then 1 else 0 end) catalog_only ,sum(case when ssci.customer_sk is not null and csci.customer_sk is not null then 1 else 0 end) store_and_catalog from ( select ss_customer_sk customer_sk ,ss_item_sk item_sk from store_sales JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk where d_month_seq between 1193 and 1193 + 11 group by ss_customer_sk ,ss_item_sk) ssci full outer join ( select cs_bill_customer_sk customer_sk ,cs_item_sk item_sk from catalog_sales JOIN date_dim ON catalog_sales.cs_sold_date_sk = date_dim.d_date_sk where d_month_seq between 1193 and 1193 + 11 group by cs_bill_customer_sk ,cs_item_sk) csci on (ssci.customer_sk=csci.customer_sk and ssci.item_sk = csci.item_sk) limit 100
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE)
+Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 8 <- Map 10 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 9 <- Reducer 8 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:100
+ Stage-1
+ Reducer 5
+ File Output Operator [FS_40]
+ compressed:false
+ Statistics:Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Limit [LIM_39]
+ Number of rows:100
+ Statistics:Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_37]
+ | aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_36]
+ sort order:
+ Statistics:Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: bigint), _col1 (type: bigint), _col2 (type: bigint)
+ Group By Operator [GBY_35]
+ aggregations:["sum(_col0)","sum(_col1)","sum(_col2)"]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_33]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_51]
+ | condition map:[{"":"Outer Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int), _col1 (type: int)","1":"_col0 (type: int), _col1 (type: int)"}
+ | outputColumnNames:["_col0","_col2"]
+ | Statistics:Num rows: 11048 Data size: 12363283 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_30]
+ | key expressions:_col0 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_14]
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_13]
+ | | keys:KEY._col0 (type: int), KEY._col1 (type: int)
+ | | outputColumnNames:["_col0","_col1"]
+ | | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ | |<-Reducer 2 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_12]
+ | key expressions:_col0 (type: int), _col1 (type: int)
+ | Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ | sort order:++
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | Group By Operator [GBY_11]
+ | keys:_col1 (type: int), _col2 (type: int)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | Merge Join Operator [MERGEJOIN_49]
+ | | condition map:[{"":"Inner Join 0 to 1"}]
+ | | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | | outputColumnNames:["_col1","_col2"]
+ | | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ | |<-Map 1 [SIMPLE_EDGE]
+ | | Reduce Output Operator [RS_6]
+ | | key expressions:_col0 (type: int)
+ | | Map-reduce partition columns:_col0 (type: int)
+ | | sort order:+
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | value expressions:_col1 (type: int), _col2 (type: int)
+ | | Select Operator [SEL_1]
+ | | outputColumnNames:["_col0","_col1","_col2"]
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | Filter Operator [FIL_45]
+ | | predicate:ss_sold_date_sk is not null (type: boolean)
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | | TableScan [TS_0]
+ | | alias:store_sales
+ | | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | |<-Map 6 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_8]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_4]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_46]
+ | predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_2]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 9 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_31]
+ key expressions:_col0 (type: int), _col1 (type: int)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ sort order:++
+ Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_28]
+ | keys:KEY._col0 (type: int), KEY._col1 (type: int)
+ | outputColumnNames:["_col0","_col1"]
+ | Statistics:Num rows: 10044 Data size: 11239348 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 8 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_27]
+ key expressions:_col0 (type: int), _col1 (type: int)
+ Map-reduce partition columns:_col0 (type: int), _col1 (type: int)
+ sort order:++
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_26]
+ keys:_col1 (type: int), _col2 (type: int)
+ outputColumnNames:["_col0","_col1"]
+ Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_50]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col1","_col2"]
+ | Statistics:Num rows: 20088 Data size: 22478696 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 10 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_23]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_19]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_48]
+ | predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_17]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_21]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ value expressions:_col1 (type: int), _col2 (type: int)
+ Select Operator [SEL_16]
+ outputColumnNames:["_col0","_col1","_col2"]
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ Filter Operator [FIL_47]
+ predicate:cs_sold_date_sk is not null (type: boolean)
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ TableScan [TS_15]
+ alias:catalog_sales
+ Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+
diff --git a/ql/src/test/results/clientpositive/perf/query98.q.out b/ql/src/test/results/clientpositive/perf/query98.q.out
new file mode 100644
index 0000000..70aa979
--- /dev/null
+++ b/ql/src/test/results/clientpositive/perf/query98.q.out
@@ -0,0 +1,135 @@
+PREHOOK: query: explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(ss_ext_sales_price) as itemrevenue ,sum(ss_ext_sales_price)*100/sum(sum(ss_ext_sales_price)) over (partition by i_class) as revenueratio from store_sales ,item ,date_dim where store_sales.ss_item_sk = item.i_item_sk and i_category in ('Jewelry', 'Sports', 'Books') and store_sales.ss_sold_date_sk = date_dim.d_date_sk and d_date between cast('2001-01-12' as date) and (cast('2001-02-11' as date)) group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio
+PREHOOK: type: QUERY
+POSTHOOK: query: explain select i_item_desc ,i_category ,i_class ,i_current_price ,i_item_id ,sum(ss_ext_sales_price) as itemrevenue ,sum(ss_ext_sales_price)*100/sum(sum(ss_ext_sales_price)) over (partition by i_class) as revenueratio from store_sales ,item ,date_dim where store_sales.ss_item_sk = item.i_item_sk and i_category in ('Jewelry', 'Sports', 'Books') and store_sales.ss_sold_date_sk = date_dim.d_date_sk and d_date between cast('2001-01-12' as date) and (cast('2001-02-11' as date)) group by i_item_id ,i_item_desc ,i_category ,i_class ,i_current_price order by i_category ,i_class ,i_item_id ,i_item_desc ,revenueratio
+POSTHOOK: type: QUERY
+Plan optimized by CBO.
+
+Vertex dependency in root stage
+Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE)
+Reducer 3 <- Map 8 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE)
+Reducer 4 <- Reducer 3 (SIMPLE_EDGE)
+Reducer 5 <- Reducer 4 (SIMPLE_EDGE)
+Reducer 6 <- Reducer 5 (SIMPLE_EDGE)
+
+Stage-0
+ Fetch Operator
+ limit:-1
+ Stage-1
+ Reducer 6
+ File Output Operator [FS_30]
+ compressed:false
+ Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ table:{"input format:":"org.apache.hadoop.mapred.TextInputFormat","output format:":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","serde:":"org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"}
+ Select Operator [SEL_29]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ | Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 5 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_28]
+ key expressions:_col1 (type: string), _col2 (type: string), _col4 (type: string), _col0 (type: string), _col6 (type: decimal(38,23))
+ sort order:+++++
+ Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col3 (type: decimal(7,2)), _col5 (type: decimal(17,2))
+ Select Operator [SEL_26]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"]
+ Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ PTF Operator [PTF_25]
+ Function definitions:[{"Input definition":{"type:":"WINDOWING"}},{"name:":"windowingtablefunction","order by:":"_col3","partition by:":"_col3"}]
+ Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_24]
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 4 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_23]
+ key expressions:_col3 (type: string)
+ Map-reduce partition columns:_col3 (type: string)
+ sort order:+
+ Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col0 (type: string), _col1 (type: string), _col2 (type: string), _col4 (type: decimal(7,2)), _col5 (type: decimal(17,2))
+ Select Operator [SEL_22]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ Group By Operator [GBY_21]
+ | aggregations:["sum(VALUE._col0)"]
+ | keys:KEY._col0 (type: string), KEY._col1 (type: string), KEY._col2 (type: decimal(7,2)), KEY._col3 (type: string), KEY._col4 (type: string)
+ | outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ | Statistics:Num rows: 69877 Data size: 100362804 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 3 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_20]
+ key expressions:_col0 (type: string), _col1 (type: string), _col2 (type: decimal(7,2)), _col3 (type: string), _col4 (type: string)
+ Map-reduce partition columns:_col0 (type: string), _col1 (type: string), _col2 (type: decimal(7,2)), _col3 (type: string), _col4 (type: string)
+ sort order:+++++
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col5 (type: decimal(17,2))
+ Group By Operator [GBY_19]
+ aggregations:["sum(_col2)"]
+ keys:_col4 (type: string), _col5 (type: string), _col6 (type: decimal(7,2)), _col7 (type: string), _col8 (type: string)
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ Select Operator [SEL_18]
+ outputColumnNames:["_col4","_col5","_col6","_col7","_col8","_col2"]
+ Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ Merge Join Operator [MERGEJOIN_40]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col0 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col2","_col4","_col5","_col6","_col7","_col8"]
+ | Statistics:Num rows: 139755 Data size: 200727046 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 8 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_16]
+ | key expressions:_col0 (type: int)
+ | Map-reduce partition columns:_col0 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Select Operator [SEL_7]
+ | outputColumnNames:["_col0"]
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | Filter Operator [FIL_38]
+ | predicate:(d_date BETWEEN 2001-01-12 AND 2001-02-11 and d_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 18262 Data size: 20435178 Basic stats: COMPLETE Column stats: NONE
+ | TableScan [TS_5]
+ | alias:date_dim
+ | Statistics:Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE
+ |<-Reducer 2 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_14]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col2 (type: decimal(7,2)), _col4 (type: string), _col5 (type: string), _col6 (type: decimal(7,2)), _col7 (type: string), _col8 (type: string)
+ Merge Join Operator [MERGEJOIN_39]
+ | condition map:[{"":"Inner Join 0 to 1"}]
+ | keys:{"0":"_col1 (type: int)","1":"_col0 (type: int)"}
+ | outputColumnNames:["_col0","_col2","_col4","_col5","_col6","_col7","_col8"]
+ | Statistics:Num rows: 127050 Data size: 182479129 Basic stats: COMPLETE Column stats: NONE
+ |<-Map 1 [SIMPLE_EDGE]
+ | Reduce Output Operator [RS_9]
+ | key expressions:_col1 (type: int)
+ | Map-reduce partition columns:_col1 (type: int)
+ | sort order:+
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | value expressions:_col0 (type: int), _col2 (type: decimal(7,2))
+ | Select Operator [SEL_1]
+ | outputColumnNames:["_col0","_col1","_col2"]
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | Filter Operator [FIL_36]
+ | predicate:(ss_item_sk is not null and ss_sold_date_sk is not null) (type: boolean)
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ | TableScan [TS_0]
+ | alias:store_sales
+ | Statistics:Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
+ |<-Map 7 [SIMPLE_EDGE]
+ Reduce Output Operator [RS_11]
+ key expressions:_col0 (type: int)
+ Map-reduce partition columns:_col0 (type: int)
+ sort order:+
+ Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ value expressions:_col1 (type: string), _col2 (type: string), _col3 (type: decimal(7,2)), _col4 (type: string), _col5 (type: string)
+ Select Operator [SEL_4]
+ outputColumnNames:["_col0","_col1","_col2","_col3","_col4","_col5"]
+ Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ Filter Operator [FIL_37]
+ predicate:((i_category) IN ('Jewelry', 'Sports', 'Books') and i_item_sk is not null) (type: boolean)
+ Statistics:Num rows: 115500 Data size: 165890114 Basic stats: COMPLETE Column stats: NONE
+ TableScan [TS_2]
+ alias:item
+ Statistics:Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE
+
diff --git a/ql/src/test/templates/TestPerfCliDriver.vm b/ql/src/test/templates/TestPerfCliDriver.vm
new file mode 100644
index 0000000..5fc75af
--- /dev/null
+++ b/ql/src/test/templates/TestPerfCliDriver.vm
@@ -0,0 +1,175 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.cli;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import java.io.*;
+import java.util.*;
+import java.nio.*;
+
+import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
+
+import org.apache.hadoop.hive.ql.QTestUtil;
+import org.apache.hadoop.hive.ql.QTestUtil.MiniClusterType;
+import org.apache.hadoop.hive.ql.session.SessionState;
+
+/**
+ This is the TestPerformance Cli Driver for integrating performance regression tests
+ as part of the Hive Unit tests.
+ Currently this includes support for :
+ 1. Running explain plans for TPCDS workload (non-partitioned dataset) on 30TB scaleset.
+ TODO :
+ 1. Support for partitioned data set
+ 2. Use HBase Metastore instead of Derby
+
+This suite differs from TestCliDriver w.r.t the fact that we modify the underlying metastore
+database to reflect the dataset before running the queries.
+*/
+public class $className extends TestCase {
+
+ private static final String HIVE_ROOT = QTestUtil.ensurePathEndsInSlash(System.getProperty("hive.root"));
+ private static QTestUtil qt;
+
+ public static class TestPerfCliDriverAddTestFromQFiles implements QTestUtil.SuiteAddTestFunctor {
+ public void addTestToSuite(TestSuite suite, Object setup, String tName) {
+ suite.addTest(new $className("testPerfCliDriver_"+tName));
+ }
+ }
+
+ static {
+ MiniClusterType miniMR = MiniClusterType.valueForString("$clusterMode");
+ String hiveConfDir = "$hiveConfDir";
+ String initScript = "$initScript";
+ String cleanupScript = "$cleanupScript";
+ try {
+ String hadoopVer = "$hadoopVersion";
+ if (!hiveConfDir.isEmpty()) {
+ hiveConfDir = HIVE_ROOT + hiveConfDir;
+ }
+ qt = new QTestUtil((HIVE_ROOT + "$resultsDir"), (HIVE_ROOT + "$logDir"), miniMR,
+ hiveConfDir, hadoopVer, initScript, cleanupScript);
+
+ // do a one time initialization
+ qt.cleanUp();
+ qt.createSources();
+ // Manually modify the underlying metastore db to reflect statistics corresponding to
+ // the 30TB TPCDS scale set. This way the optimizer will generate plans for a 30 TB set.
+ QTestUtil.setupMetaStoreTableColumnStatsFor30TBTPCDSWorkload(qt.getConf());
+ } catch (Exception e) {
+ System.err.println("Exception: " + e.getMessage());
+ e.printStackTrace();
+ System.err.flush();
+ fail("Unexpected exception in static initialization: "+e.getMessage());
+ }
+ }
+
+ public $className(String name) {
+ super(name);
+ }
+
+ /**
+ * Dummy last test. This is only meant to shutdown qt
+ */
+ public void testPerfCliDriver_shutdown() {
+ System.err.println ("Cleaning up " + "$className");
+ }
+
+ @Override
+ protected void tearDown() {
+ try {
+ qt.clearPostTestEffects();
+ if (getName().equals("testPerfCliDriver_shutdown"))
+ qt.shutdown();
+ }
+ catch (Exception e) {
+ System.err.println("Exception: " + e.getMessage());
+ e.printStackTrace();
+ System.err.flush();
+ fail("Unexpected exception in tearDown");
+ }
+ }
+
+ public static Test suite() {
+ Set qFilesToExecute = new HashSet();
+ String qFiles = System.getProperty("qfile", "").trim();
+ if(!qFiles.isEmpty()) {
+ for(String qFile : qFiles.split(",")) {
+ qFile = qFile.trim();
+ if(!qFile.isEmpty()) {
+ qFilesToExecute.add(qFile);
+ }
+ }
+ }
+
+ TestSuite suite = new TestSuite();
+
+ QTestUtil.addTestsToSuiteFromQfileNames("$qFileNamesFile", qFilesToExecute,
+ suite, null, new TestPerfCliDriverAddTestFromQFiles());
+ suite.addTest(new $className("testPerfCliDriver_shutdown"));
+ return suite;
+ }
+
+ static String debugHint = "\nSee ./ql/target/tmp/log/hive.log or ./itests/qtest/target/tmp/log/hive.log, "
+ + "or check ./ql/target/surefire-reports or ./itests/qtest/target/surefire-reports/ for specific test cases logs.";
+
+#foreach ($qf in $qfiles)
+ #set ($fname = $qf.getName())
+ #set ($eidx = $fname.indexOf('.'))
+ #set ($tname = $fname.substring(0, $eidx))
+ #set ($fpath = $qfilesMap.get($fname))
+ public void testPerfCliDriver_$tname() throws Exception {
+ runTest("$tname", "$fname", (HIVE_ROOT + "$fpath"));
+ }
+
+#end
+
+ private void runTest(String tname, String fname, String fpath) throws Exception {
+ long startTime = System.currentTimeMillis();
+ try {
+ System.err.println("Begin query: " + fname);
+
+ qt.addFile(fpath);
+
+ if (qt.shouldBeSkipped(fname)) {
+ return;
+ }
+
+ qt.cliInit(fname, false);
+
+ int ecode = qt.executeClient(fname);
+ if (ecode != 0) {
+ qt.failed(ecode, fname, debugHint);
+ }
+ ecode = qt.checkCliDriverResults(fname);
+ if (ecode != 0) {
+ qt.failedDiff(ecode, fname, debugHint);
+ }
+ }
+ catch (Throwable e) {
+ qt.failed(e, fname, debugHint);
+ }
+
+ long elapsedTime = System.currentTimeMillis() - startTime;
+ System.err.println("Done query: " + fname + " elapsedTime=" + elapsedTime/1000 + "s");
+ assertTrue("Test passed", true);
+ }
+}