diff --git accumulo-handler/src/test/results/positive/accumulo_predicate_pushdown.q.out accumulo-handler/src/test/results/positive/accumulo_predicate_pushdown.q.out index fb8fca9324..63368c292f 100644 --- accumulo-handler/src/test/results/positive/accumulo_predicate_pushdown.q.out +++ accumulo-handler/src/test/results/positive/accumulo_predicate_pushdown.q.out @@ -414,10 +414,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: accumulo_pushdown - filterExpr: (not COALESCE((key < '90'),false)) (type: boolean) + filterExpr: (key < '90') is not true (type: boolean) Statistics: Num rows: 1 Data size: 368 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (not COALESCE((key < '90'),false)) (type: boolean) + predicate: (key < '90') is not true (type: boolean) Statistics: Num rows: 1 Data size: 368 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git hbase-handler/src/test/results/positive/hbase_ppd_key_range.q.out hbase-handler/src/test/results/positive/hbase_ppd_key_range.q.out index b80738b263..5ab5bb3841 100644 --- hbase-handler/src/test/results/positive/hbase_ppd_key_range.q.out +++ hbase-handler/src/test/results/positive/hbase_ppd_key_range.q.out @@ -416,7 +416,7 @@ STAGE PLANS: alias: hbase_pushdown Statistics: Num rows: 1 Data size: 368 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (not COALESCE((key < '90'),false)) (type: boolean) + predicate: (key < '90') is not true (type: boolean) Statistics: Num rows: 1 Data size: 368 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git hbase-handler/src/test/results/positive/hbase_pushdown.q.out hbase-handler/src/test/results/positive/hbase_pushdown.q.out index f37460c6d3..d3cdd9e4f7 100644 --- hbase-handler/src/test/results/positive/hbase_pushdown.q.out +++ hbase-handler/src/test/results/positive/hbase_pushdown.q.out @@ -305,7 +305,7 @@ STAGE PLANS: alias: hbase_pushdown Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (not COALESCE((key = 90),false)) (type: boolean) + predicate: (key = 90) is not true (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) diff --git pom.xml pom.xml index 9871bae60e..008c3eb4b6 100644 --- pom.xml +++ pom.xml @@ -127,7 +127,7 @@ 1.12.0 1.8.2 0.8.0.RELEASE - 1.17.0 + 1.18.0 4.2.4 4.1.17 4.1.19 @@ -221,6 +221,17 @@ + + + central + central + https://repo.maven.apache.org/maven2 + default + + true + warn + + datanucleus datanucleus maven repository diff --git ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRelBuilder.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRelBuilder.java index e85a99e846..45845bb38c 100644 --- ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRelBuilder.java +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRelBuilder.java @@ -41,9 +41,6 @@ import org.apache.hadoop.hive.ql.optimizer.calcite.functions.HiveSqlSumEmptyIsZeroAggFunction; import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveFloorDate; -import java.util.HashMap; -import java.util.Map; - /** * Builder for relational expressions in Hive. @@ -66,6 +63,7 @@ public static RelBuilder create(FrameworkConfig config) { final RelOptSchema[] relOptSchemas = {null}; Frameworks.withPrepare( new Frameworks.PrepareAction(config) { + @Override public Void apply(RelOptCluster cluster, RelOptSchema relOptSchema, SchemaPlus rootSchema, CalciteServerStatement statement) { clusters[0] = cluster; @@ -80,6 +78,7 @@ public Void apply(RelOptCluster cluster, RelOptSchema relOptSchema, * Just add a {@link RelOptCluster} and a {@link RelOptSchema} */ public static RelBuilderFactory proto(final Context context) { return new RelBuilderFactory() { + @Override public RelBuilder create(RelOptCluster cluster, RelOptSchema schema) { return new HiveRelBuilder(context, cluster, schema); } @@ -153,4 +152,9 @@ public static SqlAggFunction getRollup(SqlAggFunction aggregation) { return null; } + @Override + protected boolean shouldMergeProject() { + return false; + } + } diff --git ql/src/test/queries/clientpositive/druidmini_expressions.q ql/src/test/queries/clientpositive/druidmini_expressions.q index e491986250..c1c0ff30f2 100644 --- ql/src/test/queries/clientpositive/druidmini_expressions.q +++ ql/src/test/queries/clientpositive/druidmini_expressions.q @@ -36,11 +36,31 @@ EXPLAIN SELECT cstring1 || '_'|| cstring2, substring(cstring2, 2, 3) as concat , explain extended select count(*) from (select `__time` from druid_table_alltypesorc limit 1) as src ; + + +explain +SELECT `__time` +FROM druid_table_alltypesorc +WHERE (`__time` BETWEEN '1968-01-01 00:00:00' AND '1970-01-01 00:00:00') + OR (`__time` BETWEEN '1968-02-01 00:00:00' AND '1970-04-01 00:00:00') ORDER BY `__time` ASC LIMIT 10; + SELECT `__time` FROM druid_table_alltypesorc WHERE (`__time` BETWEEN '1968-01-01 00:00:00' AND '1970-01-01 00:00:00') OR (`__time` BETWEEN '1968-02-01 00:00:00' AND '1970-04-01 00:00:00') ORDER BY `__time` ASC LIMIT 10; + +explain +SELECT `__time` +FROM druid_table_alltypesorc +WHERE ('1968-01-01 00:00:00' <= `__time` AND `__time` <= '1970-01-01 00:00:00') + OR ('1968-02-01 00:00:00' <= `__time` AND `__time` <= '1970-04-01 00:00:00') ORDER BY `__time` ASC LIMIT 10; + +SELECT `__time` +FROM druid_table_alltypesorc +WHERE ('1968-01-01 00:00:00' <= `__time` AND `__time` <= '1970-01-01 00:00:00') + OR ('1968-02-01 00:00:00' <= `__time` AND `__time` <= '1970-04-01 00:00:00') ORDER BY `__time` ASC LIMIT 10; + -- COUNT DISTINCT TESTS -- AS PART OF https://issues.apache.org/jira/browse/HIVE-19586 @@ -213,4 +233,4 @@ explain select max(cint * cfloat) from (select `cfloat`, `cstring1`, `cint`, `cd explain select count(distinct `__time`, cint) from (select * from druid_table_alltypesorc) as src; -select count(distinct `__time`, cint) from (select * from druid_table_alltypesorc) as src; \ No newline at end of file +select count(distinct `__time`, cint) from (select * from druid_table_alltypesorc) as src; diff --git ql/src/test/results/clientpositive/alter_partition_coltype.q.out ql/src/test/results/clientpositive/alter_partition_coltype.q.out index 1fbc2131d5..cd7681c50b 100644 --- ql/src/test/results/clientpositive/alter_partition_coltype.q.out +++ ql/src/test/results/clientpositive/alter_partition_coltype.q.out @@ -571,6 +571,9 @@ POSTHOOK: type: QUERY POSTHOOK: Input: pt@alterdynamic_part_table POSTHOOK: Input: pt@alterdynamic_part_table@partcol1=2/partcol2=1 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `intcol` +FROM `pt`.`alterdynamic_part_table` +WHERE ROW(`partcol1`, `partcol2`) IN (ROW(2, '1'), ROW(1, '__HIVE_DEFAULT_PARTITION__')) STAGE DEPENDENCIES: Stage-0 is a root stage diff --git ql/src/test/results/clientpositive/annotate_stats_filter.q.out ql/src/test/results/clientpositive/annotate_stats_filter.q.out index 44f77b8f50..957fd1262d 100644 --- ql/src/test/results/clientpositive/annotate_stats_filter.q.out +++ ql/src/test/results/clientpositive/annotate_stats_filter.q.out @@ -845,18 +845,18 @@ STAGE PLANS: Map Operator Tree: TableScan alias: loc_orc - filterExpr: (((year = 2001) and year is null) or (state = 'CA')) (type: boolean) + filterExpr: (state = 'CA') (type: boolean) Statistics: Num rows: 8 Data size: 816 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (((year = 2001) and year is null) or (state = 'CA')) (type: boolean) - Statistics: Num rows: 2 Data size: 204 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (state = 'CA') (type: boolean) + Statistics: Num rows: 1 Data size: 102 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: state (type: string), locid (type: int), zip (type: bigint), year (type: int) + expressions: 'CA' (type: string), locid (type: int), zip (type: bigint), year (type: int) outputColumnNames: _col0, _col1, _col2, _col3 - Statistics: Num rows: 2 Data size: 204 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 1 Data size: 102 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 2 Data size: 204 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 1 Data size: 102 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git ql/src/test/results/clientpositive/cbo_rp_simple_select.q.out ql/src/test/results/clientpositive/cbo_rp_simple_select.q.out index cb22b61f26..96ac1255d0 100644 --- ql/src/test/results/clientpositive/cbo_rp_simple_select.q.out +++ ql/src/test/results/clientpositive/cbo_rp_simple_select.q.out @@ -761,18 +761,18 @@ STAGE PLANS: Map Operator Tree: TableScan alias: cbo_t2 - filterExpr: (c_int = c_int) (type: boolean) + filterExpr: c_int is not null (type: boolean) Statistics: Num rows: 20 Data size: 7138 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (c_int = c_int) (type: boolean) - Statistics: Num rows: 10 Data size: 3660 Basic stats: COMPLETE Column stats: COMPLETE + predicate: c_int is not null (type: boolean) + Statistics: Num rows: 18 Data size: 6406 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) outputColumnNames: key, value, c_int, c_float, c_boolean, dt - Statistics: Num rows: 10 Data size: 3660 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 18 Data size: 6406 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 10 Data size: 3660 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 18 Data size: 6406 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -853,18 +853,18 @@ STAGE PLANS: Map Operator Tree: TableScan alias: cbo_t2 - filterExpr: (c_int = c_int) (type: boolean) + filterExpr: c_int is not null (type: boolean) Statistics: Num rows: 20 Data size: 7138 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (c_int = c_int) (type: boolean) - Statistics: Num rows: 10 Data size: 3660 Basic stats: COMPLETE Column stats: COMPLETE + predicate: c_int is not null (type: boolean) + Statistics: Num rows: 18 Data size: 6406 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) outputColumnNames: key, value, c_int, c_float, c_boolean, dt - Statistics: Num rows: 10 Data size: 3660 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 18 Data size: 6406 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 10 Data size: 3660 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 18 Data size: 6406 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -881,47 +881,31 @@ PREHOOK: query: -- c_int is not null EXPLAIN select * from cbo_t2 where (cbo_t2.c_int) IN (NULL) PREHOOK: type: QUERY PREHOOK: Input: default@cbo_t2 -PREHOOK: Input: default@cbo_t2@dt=2014 #### A masked pattern was here #### POSTHOOK: query: -- c_int is not null EXPLAIN select * from cbo_t2 where (cbo_t2.c_int) IN (NULL) POSTHOOK: type: QUERY POSTHOOK: Input: default@cbo_t2 -POSTHOOK: Input: default@cbo_t2@dt=2014 #### A masked pattern was here #### STAGE DEPENDENCIES: - Stage-1 is a root stage - Stage-0 depends on stages: Stage-1 + Stage-0 is a root stage STAGE PLANS: - Stage: Stage-1 - Map Reduce - Map Operator Tree: - TableScan - alias: cbo_t2 - filterExpr: (c_int = null) (type: boolean) - Statistics: Num rows: 20 Data size: 7138 Basic stats: COMPLETE Column stats: COMPLETE - Filter Operator - predicate: (c_int = null) (type: boolean) - Statistics: Num rows: 10 Data size: 3660 Basic stats: COMPLETE Column stats: COMPLETE - Select Operator - expressions: key (type: string), value (type: string), null (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) - outputColumnNames: key, value, c_int, c_float, c_boolean, dt - Statistics: Num rows: 10 Data size: 3624 Basic stats: COMPLETE Column stats: COMPLETE - File Output Operator - compressed: false - Statistics: Num rows: 10 Data size: 3624 Basic stats: COMPLETE Column stats: COMPLETE - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - Execution mode: vectorized - Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: - ListSink + TableScan + alias: cbo_t2 + Statistics: Num rows: 1 Data size: 564 Basic stats: COMPLETE Column stats: PARTIAL + Filter Operator + predicate: false (type: boolean) + Statistics: Num rows: 1 Data size: 564 Basic stats: COMPLETE Column stats: PARTIAL + Select Operator + expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) + outputColumnNames: key, value, c_int, c_float, c_boolean, dt + Statistics: Num rows: 1 Data size: 564 Basic stats: COMPLETE Column stats: PARTIAL + ListSink PREHOOK: query: -- rewrite to NULL EXPLAIN select * from cbo_t2 where (cbo_t2.c_int) IN (cbo_t2.c_int, 2*cbo_t2.c_int) @@ -945,10 +929,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: cbo_t2 - filterExpr: ((c_int = c_int) or (c_int = (2 * c_int))) (type: boolean) + filterExpr: (c_int is not null or (c_int = (2 * c_int))) (type: boolean) Statistics: Num rows: 20 Data size: 7138 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((c_int = (2 * c_int)) or (c_int = c_int)) (type: boolean) + predicate: ((c_int = (2 * c_int)) or c_int is not null) (type: boolean) Statistics: Num rows: 20 Data size: 7138 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) @@ -991,10 +975,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: cbo_t2 - filterExpr: ((c_int = c_int) or (c_int = 0)) (type: boolean) + filterExpr: (c_int is not null or (c_int = 0)) (type: boolean) Statistics: Num rows: 20 Data size: 7138 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((c_int = 0) or (c_int = c_int)) (type: boolean) + predicate: ((c_int = 0) or c_int is not null) (type: boolean) Statistics: Num rows: 20 Data size: 7138 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) diff --git ql/src/test/results/clientpositive/cbo_simple_select.q.out ql/src/test/results/clientpositive/cbo_simple_select.q.out index 32e69204f6..8beaecfcb1 100644 --- ql/src/test/results/clientpositive/cbo_simple_select.q.out +++ ql/src/test/results/clientpositive/cbo_simple_select.q.out @@ -761,18 +761,18 @@ STAGE PLANS: Map Operator Tree: TableScan alias: cbo_t2 - filterExpr: (c_int = c_int) (type: boolean) + filterExpr: c_int is not null (type: boolean) Statistics: Num rows: 20 Data size: 7138 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (c_int = c_int) (type: boolean) - Statistics: Num rows: 10 Data size: 3660 Basic stats: COMPLETE Column stats: COMPLETE + predicate: c_int is not null (type: boolean) + Statistics: Num rows: 18 Data size: 6406 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 - Statistics: Num rows: 10 Data size: 3660 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 18 Data size: 6406 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 10 Data size: 3660 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 18 Data size: 6406 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -853,18 +853,18 @@ STAGE PLANS: Map Operator Tree: TableScan alias: cbo_t2 - filterExpr: (c_int = c_int) (type: boolean) + filterExpr: c_int is not null (type: boolean) Statistics: Num rows: 20 Data size: 7138 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (c_int = c_int) (type: boolean) - Statistics: Num rows: 10 Data size: 3660 Basic stats: COMPLETE Column stats: COMPLETE + predicate: c_int is not null (type: boolean) + Statistics: Num rows: 18 Data size: 6406 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 - Statistics: Num rows: 10 Data size: 3660 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 18 Data size: 6406 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 10 Data size: 3660 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 18 Data size: 6406 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -881,47 +881,31 @@ PREHOOK: query: -- c_int is not null EXPLAIN select * from cbo_t2 where (cbo_t2.c_int) IN (NULL) PREHOOK: type: QUERY PREHOOK: Input: default@cbo_t2 -PREHOOK: Input: default@cbo_t2@dt=2014 #### A masked pattern was here #### POSTHOOK: query: -- c_int is not null EXPLAIN select * from cbo_t2 where (cbo_t2.c_int) IN (NULL) POSTHOOK: type: QUERY POSTHOOK: Input: default@cbo_t2 -POSTHOOK: Input: default@cbo_t2@dt=2014 #### A masked pattern was here #### STAGE DEPENDENCIES: - Stage-1 is a root stage - Stage-0 depends on stages: Stage-1 + Stage-0 is a root stage STAGE PLANS: - Stage: Stage-1 - Map Reduce - Map Operator Tree: - TableScan - alias: cbo_t2 - filterExpr: (c_int = null) (type: boolean) - Statistics: Num rows: 20 Data size: 7138 Basic stats: COMPLETE Column stats: COMPLETE - Filter Operator - predicate: (c_int = null) (type: boolean) - Statistics: Num rows: 10 Data size: 3660 Basic stats: COMPLETE Column stats: COMPLETE - Select Operator - expressions: key (type: string), value (type: string), null (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 - Statistics: Num rows: 10 Data size: 3624 Basic stats: COMPLETE Column stats: COMPLETE - File Output Operator - compressed: false - Statistics: Num rows: 10 Data size: 3624 Basic stats: COMPLETE Column stats: COMPLETE - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - Execution mode: vectorized - Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: - ListSink + TableScan + alias: cbo_t2 + Statistics: Num rows: 1 Data size: 564 Basic stats: COMPLETE Column stats: PARTIAL + Filter Operator + predicate: false (type: boolean) + Statistics: Num rows: 1 Data size: 564 Basic stats: COMPLETE Column stats: PARTIAL + Select Operator + expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 1 Data size: 564 Basic stats: COMPLETE Column stats: PARTIAL + ListSink PREHOOK: query: -- rewrite to NULL EXPLAIN select * from cbo_t2 where (cbo_t2.c_int) IN (cbo_t2.c_int, 2*cbo_t2.c_int) @@ -945,10 +929,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: cbo_t2 - filterExpr: ((c_int = c_int) or (c_int = (2 * c_int))) (type: boolean) + filterExpr: (c_int is not null or (c_int = (2 * c_int))) (type: boolean) Statistics: Num rows: 20 Data size: 7138 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((c_int = (2 * c_int)) or (c_int = c_int)) (type: boolean) + predicate: ((c_int = (2 * c_int)) or c_int is not null) (type: boolean) Statistics: Num rows: 20 Data size: 7138 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) @@ -991,10 +975,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: cbo_t2 - filterExpr: ((c_int = c_int) or (c_int = 0)) (type: boolean) + filterExpr: (c_int is not null or (c_int = 0)) (type: boolean) Statistics: Num rows: 20 Data size: 7138 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((c_int = 0) or (c_int = c_int)) (type: boolean) + predicate: ((c_int = 0) or c_int is not null) (type: boolean) Statistics: Num rows: 20 Data size: 7138 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) diff --git ql/src/test/results/clientpositive/complex_alias.q.out ql/src/test/results/clientpositive/complex_alias.q.out index 76dd12ed63..f3b3b831ca 100644 --- ql/src/test/results/clientpositive/complex_alias.q.out +++ ql/src/test/results/clientpositive/complex_alias.q.out @@ -147,10 +147,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: agg1 - filterExpr: (col0 = col0) (type: boolean) + filterExpr: col0 is not null (type: boolean) Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (col0 = col0) (type: boolean) + predicate: col0 is not null (type: boolean) Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: '42' (type: string), col0 (type: int) @@ -170,10 +170,10 @@ STAGE PLANS: Statistics: Num rows: 1 Data size: 90 Basic stats: COMPLETE Column stats: COMPLETE TableScan alias: agg1 - filterExpr: (col0 = col0) (type: boolean) + filterExpr: col0 is not null (type: boolean) Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (col0 = col0) (type: boolean) + predicate: col0 is not null (type: boolean) Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: '41' (type: string), col0 (type: int) diff --git ql/src/test/results/clientpositive/constantPropWhen.q.out ql/src/test/results/clientpositive/constantPropWhen.q.out index 1684cb6010..3c42b68e9f 100644 --- ql/src/test/results/clientpositive/constantPropWhen.q.out +++ ql/src/test/results/clientpositive/constantPropWhen.q.out @@ -40,7 +40,7 @@ STAGE PLANS: alias: test_1_n4 Statistics: Num rows: 4 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: (not COALESCE((id = id2),false)) (type: boolean) + expressions: (id = id2) is not true (type: boolean) outputColumnNames: _col0 Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator @@ -90,7 +90,7 @@ STAGE PLANS: alias: test_1_n4 Statistics: Num rows: 4 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: (not COALESCE((id = id2),false)) (type: boolean) + expressions: (id = id2) is not true (type: boolean) outputColumnNames: _col0 Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator @@ -140,7 +140,7 @@ STAGE PLANS: alias: test_1_n4 Statistics: Num rows: 4 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: COALESCE((id = id2),false) (type: boolean) + expressions: (id = id2) is true (type: boolean) outputColumnNames: _col0 Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator @@ -190,7 +190,7 @@ STAGE PLANS: alias: test_1_n4 Statistics: Num rows: 4 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: COALESCE((id = id2),false) (type: boolean) + expressions: (id = id2) is true (type: boolean) outputColumnNames: _col0 Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator diff --git ql/src/test/results/clientpositive/constantPropagateForSubQuery.q.out ql/src/test/results/clientpositive/constantPropagateForSubQuery.q.out index 34502947c3..631d122519 100644 --- ql/src/test/results/clientpositive/constantPropagateForSubQuery.q.out +++ ql/src/test/results/clientpositive/constantPropagateForSubQuery.q.out @@ -11,7 +11,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Input: default@src1 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('429' AS STRING) AS `ak`, `t0`.`value` AS `av`, `t1`.`key` AS `bk`, `t1`.`value` AS `bv` +OPTIMIZED SQL: SELECT CAST('429' AS VARCHAR(65536)) AS `ak`, `t0`.`value` AS `av`, `t1`.`key` AS `bk`, `t1`.`value` AS `bv` FROM (SELECT `value` FROM `default`.`src` WHERE `key` = '429') AS `t0`, diff --git ql/src/test/results/clientpositive/constant_prop_3.q.out ql/src/test/results/clientpositive/constant_prop_3.q.out index 59c1b7a9af..c70dfc4fba 100644 --- ql/src/test/results/clientpositive/constant_prop_3.q.out +++ ql/src/test/results/clientpositive/constant_prop_3.q.out @@ -283,7 +283,7 @@ STAGE PLANS: outputColumnNames: _col1, _col3, _col4, _col5, _col6, _col7, _col9 Statistics: Num rows: 1 Data size: 196 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col6 = 0L) or (_col9 is null and _col1 is not null and (_col7 >= _col6))) (type: boolean) + predicate: (((_col7 >= _col6) or (_col6 = 0L) or _col9 is not null or _col1 is null) and (_col1 is not null or (_col6 = 0L) or _col9 is not null) and (_col9 is null or (_col6 = 0L))) (type: boolean) Statistics: Num rows: 1 Data size: 196 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col1 (type: int), _col3 (type: string), _col4 (type: string), _col5 (type: int) diff --git ql/src/test/results/clientpositive/constprog_when_case.q.out ql/src/test/results/clientpositive/constprog_when_case.q.out index 958e05e959..da134e67fb 100644 --- ql/src/test/results/clientpositive/constprog_when_case.q.out +++ ql/src/test/results/clientpositive/constprog_when_case.q.out @@ -50,7 +50,7 @@ STAGE PLANS: alias: src_orc Statistics: Num rows: 1000 Data size: 269000 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: if(CASE WHEN (bool0) THEN (true) WHEN ((not bool0)) THEN (false) ELSE (null) END, key0, if(CASE WHEN (bool0) THEN (false) WHEN ((not bool0)) THEN (true) ELSE (null) END, key1, key2)) (type: string) + expressions: if(CASE WHEN (true) THEN (CASE WHEN (bool0) THEN (true) WHEN ((not bool0)) THEN (false) ELSE (null) END) WHEN (false) THEN (CASE WHEN (bool0) THEN (false) WHEN ((not bool0)) THEN (true) ELSE (null) END) ELSE (CASE WHEN (bool0) THEN (null) WHEN ((not bool0)) THEN (null) ELSE (null) END) END, key0, if(CASE WHEN (false) THEN (CASE WHEN (bool0) THEN (true) WHEN ((not bool0)) THEN (false) ELSE (null) END) WHEN (true) THEN (CASE WHEN (bool0) THEN (false) WHEN ((not bool0)) THEN (true) ELSE (null) END) ELSE (CASE WHEN (bool0) THEN (null) WHEN ((not bool0)) THEN (null) ELSE (null) END) END, key1, key2)) (type: string) outputColumnNames: _col0 Statistics: Num rows: 1000 Data size: 184000 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator diff --git ql/src/test/results/clientpositive/decimal_udf.q.out ql/src/test/results/clientpositive/decimal_udf.q.out index 6f0fc29a99..f358be42da 100644 --- ql/src/test/results/clientpositive/decimal_udf.q.out +++ ql/src/test/results/clientpositive/decimal_udf.q.out @@ -991,14 +991,14 @@ STAGE PLANS: Processor Tree: TableScan alias: decimal_udf - Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 3590 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: (UDFToDouble(key) / null) (type: double) + expressions: null (type: double) outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Limit Number of rows: 1 - Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE ListSink PREHOOK: query: SELECT key / NULL FROM DECIMAL_UDF limit 1 diff --git ql/src/test/results/clientpositive/druid/druidmini_expressions.q.out ql/src/test/results/clientpositive/druid/druidmini_expressions.q.out index 56065fffd4..951ab65212 100644 --- ql/src/test/results/clientpositive/druid/druidmini_expressions.q.out +++ ql/src/test/results/clientpositive/druid/druidmini_expressions.q.out @@ -341,6 +341,79 @@ STAGE PLANS: Processor Tree: ListSink +PREHOOK: query: explain +SELECT `__time` +FROM druid_table_alltypesorc +WHERE (`__time` BETWEEN '1968-01-01 00:00:00' AND '1970-01-01 00:00:00') + OR (`__time` BETWEEN '1968-02-01 00:00:00' AND '1970-04-01 00:00:00') ORDER BY `__time` ASC LIMIT 10 +PREHOOK: type: QUERY +PREHOOK: Input: default@druid_table_alltypesorc +PREHOOK: Output: hdfs://### HDFS PATH ### +POSTHOOK: query: explain +SELECT `__time` +FROM druid_table_alltypesorc +WHERE (`__time` BETWEEN '1968-01-01 00:00:00' AND '1970-01-01 00:00:00') + OR (`__time` BETWEEN '1968-02-01 00:00:00' AND '1970-04-01 00:00:00') ORDER BY `__time` ASC LIMIT 10 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@druid_table_alltypesorc +POSTHOOK: Output: hdfs://### HDFS PATH ### +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Tez +#### A masked pattern was here #### + Edges: + Reducer 2 <- Map 1 (SIMPLE_EDGE) +#### A masked pattern was here #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: druid_table_alltypesorc + properties: + druid.fieldNames vc + druid.fieldTypes timestamp with local time zone + druid.query.json {"queryType":"scan","dataSource":"default.druid_table_alltypesorc","intervals":["1968-01-01T08:00:00.000Z/1970-04-01T08:00:00.001Z"],"virtualColumns":[{"type":"expression","name":"vc","expression":"\"__time\"","outputType":"LONG"}],"columns":["vc"],"resultFormat":"compactedList"} + druid.query.type scan + Statistics: Num rows: 9173 Data size: 348640 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: vc (type: timestamp with local time zone) + outputColumnNames: _col0 + Statistics: Num rows: 9173 Data size: 348640 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: timestamp with local time zone) + sort order: + + Statistics: Num rows: 9173 Data size: 348640 Basic stats: COMPLETE Column stats: NONE + TopN Hash Memory Usage: 0.1 + Execution mode: llap + LLAP IO: no inputs + Reducer 2 + Execution mode: llap + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: timestamp with local time zone) + outputColumnNames: _col0 + Statistics: Num rows: 9173 Data size: 348640 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 10 + Statistics: Num rows: 10 Data size: 380 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 10 Data size: 380 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 10 + Processor Tree: + ListSink + PREHOOK: query: SELECT `__time` FROM druid_table_alltypesorc WHERE (`__time` BETWEEN '1968-01-01 00:00:00' AND '1970-01-01 00:00:00') @@ -365,6 +438,103 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### 1969-12-31 15:59:00.0 US/Pacific 1969-12-31 15:59:00.0 US/Pacific 1969-12-31 15:59:00.0 US/Pacific +PREHOOK: query: explain +SELECT `__time` +FROM druid_table_alltypesorc +WHERE ('1968-01-01 00:00:00' <= `__time` AND `__time` <= '1970-01-01 00:00:00') + OR ('1968-02-01 00:00:00' <= `__time` AND `__time` <= '1970-04-01 00:00:00') ORDER BY `__time` ASC LIMIT 10 +PREHOOK: type: QUERY +PREHOOK: Input: default@druid_table_alltypesorc +PREHOOK: Output: hdfs://### HDFS PATH ### +POSTHOOK: query: explain +SELECT `__time` +FROM druid_table_alltypesorc +WHERE ('1968-01-01 00:00:00' <= `__time` AND `__time` <= '1970-01-01 00:00:00') + OR ('1968-02-01 00:00:00' <= `__time` AND `__time` <= '1970-04-01 00:00:00') ORDER BY `__time` ASC LIMIT 10 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@druid_table_alltypesorc +POSTHOOK: Output: hdfs://### HDFS PATH ### +STAGE DEPENDENCIES: + Stage-1 is a root stage + Stage-0 depends on stages: Stage-1 + +STAGE PLANS: + Stage: Stage-1 + Tez +#### A masked pattern was here #### + Edges: + Reducer 2 <- Map 1 (SIMPLE_EDGE) +#### A masked pattern was here #### + Vertices: + Map 1 + Map Operator Tree: + TableScan + alias: druid_table_alltypesorc + properties: + druid.fieldNames vc + druid.fieldTypes timestamp with local time zone + druid.query.json {"queryType":"scan","dataSource":"default.druid_table_alltypesorc","intervals":["1968-01-01T08:00:00.000Z/1970-04-01T08:00:00.001Z"],"virtualColumns":[{"type":"expression","name":"vc","expression":"\"__time\"","outputType":"LONG"}],"columns":["vc"],"resultFormat":"compactedList"} + druid.query.type scan + Statistics: Num rows: 9173 Data size: 348640 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: vc (type: timestamp with local time zone) + outputColumnNames: _col0 + Statistics: Num rows: 9173 Data size: 348640 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: timestamp with local time zone) + sort order: + + Statistics: Num rows: 9173 Data size: 348640 Basic stats: COMPLETE Column stats: NONE + TopN Hash Memory Usage: 0.1 + Execution mode: llap + LLAP IO: no inputs + Reducer 2 + Execution mode: llap + Reduce Operator Tree: + Select Operator + expressions: KEY.reducesinkkey0 (type: timestamp with local time zone) + outputColumnNames: _col0 + Statistics: Num rows: 9173 Data size: 348640 Basic stats: COMPLETE Column stats: NONE + Limit + Number of rows: 10 + Statistics: Num rows: 10 Data size: 380 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 10 Data size: 380 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + Stage: Stage-0 + Fetch Operator + limit: 10 + Processor Tree: + ListSink + +PREHOOK: query: SELECT `__time` +FROM druid_table_alltypesorc +WHERE ('1968-01-01 00:00:00' <= `__time` AND `__time` <= '1970-01-01 00:00:00') + OR ('1968-02-01 00:00:00' <= `__time` AND `__time` <= '1970-04-01 00:00:00') ORDER BY `__time` ASC LIMIT 10 +PREHOOK: type: QUERY +PREHOOK: Input: default@druid_table_alltypesorc +PREHOOK: Output: hdfs://### HDFS PATH ### +POSTHOOK: query: SELECT `__time` +FROM druid_table_alltypesorc +WHERE ('1968-01-01 00:00:00' <= `__time` AND `__time` <= '1970-01-01 00:00:00') + OR ('1968-02-01 00:00:00' <= `__time` AND `__time` <= '1970-04-01 00:00:00') ORDER BY `__time` ASC LIMIT 10 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@druid_table_alltypesorc +POSTHOOK: Output: hdfs://### HDFS PATH ### +1969-12-31 15:59:00.0 US/Pacific +1969-12-31 15:59:00.0 US/Pacific +1969-12-31 15:59:00.0 US/Pacific +1969-12-31 15:59:00.0 US/Pacific +1969-12-31 15:59:00.0 US/Pacific +1969-12-31 15:59:00.0 US/Pacific +1969-12-31 15:59:00.0 US/Pacific +1969-12-31 15:59:00.0 US/Pacific +1969-12-31 15:59:00.0 US/Pacific +1969-12-31 15:59:00.0 US/Pacific PREHOOK: query: EXPLAIN select count(DISTINCT cstring2), sum(cdouble) FROM druid_table_alltypesorc GROUP BY `__time`, `cstring1` PREHOOK: type: QUERY PREHOOK: Input: default@druid_table_alltypesorc diff --git ql/src/test/results/clientpositive/druid/druidmini_extractTime.q.out ql/src/test/results/clientpositive/druid/druidmini_extractTime.q.out index 4ea95f6930..30ed7a28c2 100644 --- ql/src/test/results/clientpositive/druid/druidmini_extractTime.q.out +++ ql/src/test/results/clientpositive/druid/druidmini_extractTime.q.out @@ -589,7 +589,7 @@ STAGE PLANS: properties: druid.fieldNames vc,vc0,vc1 druid.fieldTypes double,int,string - druid.query.json {"queryType":"scan","dataSource":"default.druid_table_alltypesorc","intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"],"filter":{"type":"and","fields":[{"type":"expression","expression":"(((CAST(timestamp_extract(\"__time\",'MONTH','US/Pacific'), 'DOUBLE') / 4) + 1) == 4)"},{"type":"bound","dimension":"__time","lower":"11","lowerStrict":false,"upper":"12","upperStrict":false,"ordering":"numeric","extractionFn":{"type":"timeFormat","format":"M","timeZone":"US/Pacific","locale":"en-US"}}]},"virtualColumns":[{"type":"expression","name":"vc","expression":"((CAST(timestamp_extract(\"__time\",'MONTH','US/Pacific'), 'DOUBLE') / CAST(4, 'DOUBLE')) + CAST(1, 'DOUBLE'))","outputType":"DOUBLE"},{"type":"expression","name":"vc0","expression":"timestamp_extract(\"__time\",'MONTH','US/Pacific')","outputType":"LONG"},{"type":"expression","name":"vc1","expression":"substring(timestamp_format(timestamp_floor(timestamp_parse(timestamp_format(\"__time\",'yyyy-MM-dd\\u0027T\\u0027HH:mm:ss.SSS\\u0027Z\\u0027','US/Pacific'),'','UTC'),'P1D','','UTC'),'yyyy-MM-dd','UTC'), 5, 2)","outputType":"STRING"}],"columns":["vc","vc0","vc1"],"resultFormat":"compactedList","limit":1} + druid.query.json {"queryType":"scan","dataSource":"default.druid_table_alltypesorc","intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"],"filter":{"type":"and","fields":[{"type":"expression","expression":"(((CAST(timestamp_extract(\"__time\",'MONTH','US/Pacific'), 'DOUBLE') / CAST(4, 'DOUBLE')) + CAST(1, 'DOUBLE')) == 4)"},{"type":"bound","dimension":"__time","lower":"11","lowerStrict":false,"upper":"12","upperStrict":false,"ordering":"numeric","extractionFn":{"type":"timeFormat","format":"M","timeZone":"US/Pacific","locale":"en-US"}}]},"virtualColumns":[{"type":"expression","name":"vc","expression":"4","outputType":"DOUBLE"},{"type":"expression","name":"vc0","expression":"timestamp_extract(\"__time\",'MONTH','US/Pacific')","outputType":"LONG"},{"type":"expression","name":"vc1","expression":"substring(timestamp_format(timestamp_floor(timestamp_parse(timestamp_format(\"__time\",'yyyy-MM-dd\\u0027T\\u0027HH:mm:ss.SSS\\u0027Z\\u0027','US/Pacific'),'','UTC'),'P1D','','UTC'),'yyyy-MM-dd','UTC'), 5, 2)","outputType":"STRING"}],"columns":["vc","vc0","vc1"],"resultFormat":"compactedList","limit":1} druid.query.type scan Select Operator expressions: vc (type: double), vc0 (type: int), vc1 (type: string) @@ -630,7 +630,7 @@ STAGE PLANS: properties: druid.fieldNames vc,vc0 druid.fieldTypes int,double - druid.query.json {"queryType":"scan","dataSource":"default.druid_table_alltypesorc","intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"],"filter":{"type":"and","fields":[{"type":"expression","expression":"(timestamp_extract(\"__time\",'QUARTER','US/Pacific') >= 4)"},{"type":"expression","expression":"(((CAST(timestamp_extract(\"__time\",'MONTH','US/Pacific'), 'DOUBLE') / 4) + 1) == 4)"}]},"virtualColumns":[{"type":"expression","name":"vc","expression":"timestamp_extract(\"__time\",'QUARTER','US/Pacific')","outputType":"LONG"},{"type":"expression","name":"vc0","expression":"((CAST(timestamp_extract(\"__time\",'MONTH','US/Pacific'), 'DOUBLE') / CAST(4, 'DOUBLE')) + CAST(1, 'DOUBLE'))","outputType":"DOUBLE"}],"columns":["vc","vc0"],"resultFormat":"compactedList","limit":1} + druid.query.json {"queryType":"scan","dataSource":"default.druid_table_alltypesorc","intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"],"filter":{"type":"and","fields":[{"type":"expression","expression":"(timestamp_extract(\"__time\",'QUARTER','US/Pacific') >= 4)"},{"type":"expression","expression":"(((CAST(timestamp_extract(\"__time\",'MONTH','US/Pacific'), 'DOUBLE') / CAST(4, 'DOUBLE')) + CAST(1, 'DOUBLE')) == 4)"}]},"virtualColumns":[{"type":"expression","name":"vc","expression":"timestamp_extract(\"__time\",'QUARTER','US/Pacific')","outputType":"LONG"},{"type":"expression","name":"vc0","expression":"4","outputType":"DOUBLE"}],"columns":["vc","vc0"],"resultFormat":"compactedList","limit":1} druid.query.type scan Select Operator expressions: vc (type: int), vc0 (type: double) diff --git ql/src/test/results/clientpositive/druid/druidmini_floorTime.q.out ql/src/test/results/clientpositive/druid/druidmini_floorTime.q.out index 8d9382443e..b927d7da75 100644 --- ql/src/test/results/clientpositive/druid/druidmini_floorTime.q.out +++ ql/src/test/results/clientpositive/druid/druidmini_floorTime.q.out @@ -590,7 +590,7 @@ STAGE PLANS: properties: druid.fieldNames vc,vc0,vc1 druid.fieldTypes double,int,string - druid.query.json {"queryType":"scan","dataSource":"default.druid_table_alltypesorc","intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"],"filter":{"type":"and","fields":[{"type":"expression","expression":"(((CAST(timestamp_extract(\"__time\",'MONTH','US/Pacific'), 'DOUBLE') / 4) + 1) == 4)"},{"type":"bound","dimension":"__time","lower":"11","lowerStrict":false,"upper":"12","upperStrict":false,"ordering":"numeric","extractionFn":{"type":"timeFormat","format":"M","timeZone":"US/Pacific","locale":"en-US"}}]},"virtualColumns":[{"type":"expression","name":"vc","expression":"((CAST(timestamp_extract(\"__time\",'MONTH','US/Pacific'), 'DOUBLE') / CAST(4, 'DOUBLE')) + CAST(1, 'DOUBLE'))","outputType":"DOUBLE"},{"type":"expression","name":"vc0","expression":"timestamp_extract(\"__time\",'MONTH','US/Pacific')","outputType":"LONG"},{"type":"expression","name":"vc1","expression":"substring(timestamp_format(timestamp_floor(timestamp_parse(timestamp_format(\"__time\",'yyyy-MM-dd\\u0027T\\u0027HH:mm:ss.SSS\\u0027Z\\u0027','US/Pacific'),'','UTC'),'P1D','','UTC'),'yyyy-MM-dd','UTC'), 5, 2)","outputType":"STRING"}],"columns":["vc","vc0","vc1"],"resultFormat":"compactedList","limit":1} + druid.query.json {"queryType":"scan","dataSource":"default.druid_table_alltypesorc","intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"],"filter":{"type":"and","fields":[{"type":"expression","expression":"(((CAST(timestamp_extract(\"__time\",'MONTH','US/Pacific'), 'DOUBLE') / CAST(4, 'DOUBLE')) + CAST(1, 'DOUBLE')) == 4)"},{"type":"bound","dimension":"__time","lower":"11","lowerStrict":false,"upper":"12","upperStrict":false,"ordering":"numeric","extractionFn":{"type":"timeFormat","format":"M","timeZone":"US/Pacific","locale":"en-US"}}]},"virtualColumns":[{"type":"expression","name":"vc","expression":"4","outputType":"DOUBLE"},{"type":"expression","name":"vc0","expression":"timestamp_extract(\"__time\",'MONTH','US/Pacific')","outputType":"LONG"},{"type":"expression","name":"vc1","expression":"substring(timestamp_format(timestamp_floor(timestamp_parse(timestamp_format(\"__time\",'yyyy-MM-dd\\u0027T\\u0027HH:mm:ss.SSS\\u0027Z\\u0027','US/Pacific'),'','UTC'),'P1D','','UTC'),'yyyy-MM-dd','UTC'), 5, 2)","outputType":"STRING"}],"columns":["vc","vc0","vc1"],"resultFormat":"compactedList","limit":1} druid.query.type scan Select Operator expressions: vc (type: double), vc0 (type: int), vc1 (type: string) @@ -631,7 +631,7 @@ STAGE PLANS: properties: druid.fieldNames vc,vc0 druid.fieldTypes int,double - druid.query.json {"queryType":"scan","dataSource":"default.druid_table_alltypesorc","intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"],"filter":{"type":"and","fields":[{"type":"expression","expression":"(timestamp_extract(\"__time\",'QUARTER','US/Pacific') >= 4)"},{"type":"expression","expression":"(((CAST(timestamp_extract(\"__time\",'MONTH','US/Pacific'), 'DOUBLE') / 4) + 1) == 4)"}]},"virtualColumns":[{"type":"expression","name":"vc","expression":"timestamp_extract(\"__time\",'QUARTER','US/Pacific')","outputType":"LONG"},{"type":"expression","name":"vc0","expression":"((CAST(timestamp_extract(\"__time\",'MONTH','US/Pacific'), 'DOUBLE') / CAST(4, 'DOUBLE')) + CAST(1, 'DOUBLE'))","outputType":"DOUBLE"}],"columns":["vc","vc0"],"resultFormat":"compactedList","limit":1} + druid.query.json {"queryType":"scan","dataSource":"default.druid_table_alltypesorc","intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"],"filter":{"type":"and","fields":[{"type":"expression","expression":"(timestamp_extract(\"__time\",'QUARTER','US/Pacific') >= 4)"},{"type":"expression","expression":"(((CAST(timestamp_extract(\"__time\",'MONTH','US/Pacific'), 'DOUBLE') / CAST(4, 'DOUBLE')) + CAST(1, 'DOUBLE')) == 4)"}]},"virtualColumns":[{"type":"expression","name":"vc","expression":"timestamp_extract(\"__time\",'QUARTER','US/Pacific')","outputType":"LONG"},{"type":"expression","name":"vc0","expression":"4","outputType":"DOUBLE"}],"columns":["vc","vc0"],"resultFormat":"compactedList","limit":1} druid.query.type scan Select Operator expressions: vc (type: int), vc0 (type: double) diff --git ql/src/test/results/clientpositive/druid/druidmini_test_ts.q.out ql/src/test/results/clientpositive/druid/druidmini_test_ts.q.out index d2b3acc243..9c412d97dd 100644 --- ql/src/test/results/clientpositive/druid/druidmini_test_ts.q.out +++ ql/src/test/results/clientpositive/druid/druidmini_test_ts.q.out @@ -406,18 +406,15 @@ STAGE PLANS: Processor Tree: TableScan alias: druid_table_alltypesorc - filterExpr: (vc BETWEEN TIMESTAMPLOCALTZ'2010-01-01 00:00:00.0 US/Pacific' AND TIMESTAMPLOCALTZ'2011-01-01 00:00:00.0 US/Pacific' or vc BETWEEN TIMESTAMPLOCALTZ'2012-01-01 00:00:00.0 US/Pacific' AND TIMESTAMPLOCALTZ'2013-01-01 00:00:00.0 US/Pacific') (type: boolean) properties: druid.fieldNames vc druid.fieldTypes timestamp with local time zone - druid.query.json {"queryType":"scan","dataSource":"default.druid_table_alltypesorc","intervals":["1900-01-01T00:00:00.000Z/2013-01-01T08:00:00.001Z"],"virtualColumns":[{"type":"expression","name":"vc","expression":"\"__time\"","outputType":"LONG"}],"columns":["vc"],"resultFormat":"compactedList"} + druid.query.json {"queryType":"scan","dataSource":"default.druid_table_alltypesorc","intervals":["2010-01-01T08:00:00.000Z/2011-01-01T08:00:00.001Z","2012-01-01T08:00:00.000Z/2013-01-01T08:00:00.001Z"],"virtualColumns":[{"type":"expression","name":"vc","expression":"\"__time\"","outputType":"LONG"}],"columns":["vc"],"resultFormat":"compactedList"} druid.query.type scan - Filter Operator - predicate: (vc BETWEEN TIMESTAMPLOCALTZ'2010-01-01 00:00:00.0 US/Pacific' AND TIMESTAMPLOCALTZ'2011-01-01 00:00:00.0 US/Pacific' or vc BETWEEN TIMESTAMPLOCALTZ'2012-01-01 00:00:00.0 US/Pacific' AND TIMESTAMPLOCALTZ'2013-01-01 00:00:00.0 US/Pacific') (type: boolean) - Select Operator - expressions: vc (type: timestamp with local time zone) - outputColumnNames: _col0 - ListSink + Select Operator + expressions: vc (type: timestamp with local time zone) + outputColumnNames: _col0 + ListSink PREHOOK: query: EXPLAIN SELECT `__time` diff --git ql/src/test/results/clientpositive/dynamic_partition_skip_default.q.out ql/src/test/results/clientpositive/dynamic_partition_skip_default.q.out index 9ec9dca856..59f6c35498 100644 --- ql/src/test/results/clientpositive/dynamic_partition_skip_default.q.out +++ ql/src/test/results/clientpositive/dynamic_partition_skip_default.q.out @@ -214,6 +214,9 @@ POSTHOOK: Input: default@dynamic_part_table POSTHOOK: Input: default@dynamic_part_table@partcol1=1/partcol2=1 POSTHOOK: Input: default@dynamic_part_table@partcol1=1/partcol2=__HIVE_DEFAULT_PARTITION__ #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `intcol` +FROM `default`.`dynamic_part_table` +WHERE `partcol2` IN ('1', '__HIVE_DEFAULT_PARTITION__') AND `partcol1` = '1' STAGE DEPENDENCIES: Stage-0 is a root stage diff --git ql/src/test/results/clientpositive/fold_case.q.out ql/src/test/results/clientpositive/fold_case.q.out index 3a74337f86..5bc5795bca 100644 --- ql/src/test/results/clientpositive/fold_case.q.out +++ ql/src/test/results/clientpositive/fold_case.q.out @@ -18,13 +18,13 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: (key = '238') (type: boolean) + filterExpr: (key = '238') is true (type: boolean) Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (key = '238') (type: boolean) - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (key = '238') is true (type: boolean) + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: count() mode: hash @@ -75,10 +75,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: (not COALESCE((key = '238'),false)) (type: boolean) + filterExpr: (key = '238') is not true (type: boolean) Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (not COALESCE((key = '238'),false)) (type: boolean) + predicate: (key = '238') is not true (type: boolean) Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Select Operator Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE @@ -208,13 +208,13 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: (key = '238') (type: boolean) + filterExpr: (key = '238') is true (type: boolean) Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (key = '238') (type: boolean) - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (key = '238') is true (type: boolean) + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: count() mode: hash @@ -321,13 +321,13 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: (key = '238') (type: boolean) + filterExpr: (key = '238') is true (type: boolean) Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (key = '238') (type: boolean) - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (key = '238') is true (type: boolean) + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: count() mode: hash @@ -378,13 +378,13 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: (not COALESCE((key = '238'),false)) (type: boolean) + filterExpr: (key = '238') is not true (type: boolean) Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (not COALESCE((key = '238'),false)) (type: boolean) + predicate: (key = '238') is not true (type: boolean) Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: CASE WHEN ((key = '238')) THEN (null) ELSE (false) END (type: boolean) + expressions: ((key = '238') is true and null) (type: boolean) outputColumnNames: _col0 Statistics: Num rows: 250 Data size: 1000 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator @@ -467,10 +467,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: CASE WHEN ((key = '238')) THEN (null) ELSE (true) END (type: boolean) + filterExpr: (key = '238') is not true (type: boolean) Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((key = '238')) THEN (null) ELSE (true) END (type: boolean) + predicate: (key = '238') is not true (type: boolean) Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Select Operator Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE diff --git ql/src/test/results/clientpositive/fold_eq_with_case_when.q.out ql/src/test/results/clientpositive/fold_eq_with_case_when.q.out index aa2da82836..95f4a4e7dc 100644 --- ql/src/test/results/clientpositive/fold_eq_with_case_when.q.out +++ ql/src/test/results/clientpositive/fold_eq_with_case_when.q.out @@ -44,26 +44,26 @@ STAGE PLANS: Map Operator Tree: TableScan alias: lineitem - filterExpr: ((DATE'1996-03-30' = to_date(CAST( l_shipdate AS TIMESTAMP))) and (l_shipmode = 'RAIL')) (type: boolean) + filterExpr: (CASE WHEN ((DATE'1996-03-30' = to_date(CAST( l_shipdate AS TIMESTAMP)))) THEN (true) ELSE (null) END and ((l_shipmode = 'RAIL') is true or (null and (l_shipmode = 'RAIL') is not true))) (type: boolean) Statistics: Num rows: 100 Data size: 19000 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((DATE'1996-03-30' = to_date(CAST( l_shipdate AS TIMESTAMP))) and (l_shipmode = 'RAIL')) (type: boolean) - Statistics: Num rows: 7 Data size: 1330 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((l_shipmode = 'RAIL') is true or (null and (l_shipmode = 'RAIL') is not true)) and CASE WHEN ((DATE'1996-03-30' = to_date(CAST( l_shipdate AS TIMESTAMP)))) THEN (true) ELSE (null) END) (type: boolean) + Statistics: Num rows: 50 Data size: 9500 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: l_orderkey (type: int), (UDFToDouble(l_partkey) / 1000000.0D) (type: double) outputColumnNames: _col0, _col1 - Statistics: Num rows: 7 Data size: 1330 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 50 Data size: 9500 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: sum(_col1), sum(1) keys: _col0 (type: int) mode: hash outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 3 Data size: 60 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 500 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: int) sort order: + Map-reduce partition columns: _col0 (type: int) - Statistics: Num rows: 3 Data size: 60 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 500 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col1 (type: double), _col2 (type: bigint) Execution mode: vectorized Reduce Operator Tree: @@ -72,14 +72,14 @@ STAGE PLANS: keys: KEY._col0 (type: int) mode: mergepartial outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 3 Data size: 60 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 500 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col1 (type: double), _col2 (type: bigint) outputColumnNames: _col0, _col1 - Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 400 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 400 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -109,18 +109,18 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: (key = '238') (type: boolean) + filterExpr: (key = '238') is true (type: boolean) Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (key = '238') (type: boolean) - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (key = '238') is true (type: boolean) + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: '238' (type: string) + expressions: key (type: string) outputColumnNames: _col0 - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -151,18 +151,18 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: (key) IN ('238', '94') (type: boolean) + filterExpr: (key) IN ('238', '94') is true (type: boolean) Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (key) IN ('238', '94') (type: boolean) - Statistics: Num rows: 3 Data size: 261 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (key) IN ('238', '94') is true (type: boolean) + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: key (type: string) outputColumnNames: _col0 - Statistics: Num rows: 3 Data size: 261 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 3 Data size: 261 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -193,18 +193,18 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: (key = '238') (type: boolean) + filterExpr: (key = '238') is true (type: boolean) Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (key = '238') (type: boolean) - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (key = '238') is true (type: boolean) + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: '238' (type: string) + expressions: key (type: string) outputColumnNames: _col0 - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -235,18 +235,18 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: CASE WHEN ((key <> '238')) THEN ((key = '238')) WHEN ((key = '23')) THEN ((key = '238')) ELSE (null) END (type: boolean) + filterExpr: (((key <> '238') or (key = '23')) is true and (key = '238') is true) (type: boolean) Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((key <> '238')) THEN ((key = '238')) WHEN ((key = '23')) THEN ((key = '238')) ELSE (null) END (type: boolean) - Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((key <> '238') or (key = '23')) is true and (key = '238') is true) (type: boolean) + Statistics: Num rows: 125 Data size: 10875 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: key (type: string) outputColumnNames: _col0 - Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 125 Data size: 10875 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 125 Data size: 10875 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git ql/src/test/results/clientpositive/fold_when.q.out ql/src/test/results/clientpositive/fold_when.q.out index 2cf30b5b4d..2cdebe6662 100644 --- ql/src/test/results/clientpositive/fold_when.q.out +++ ql/src/test/results/clientpositive/fold_when.q.out @@ -174,18 +174,18 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: (key = '238') (type: boolean) + filterExpr: (key = '238') is true (type: boolean) Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (key = '238') (type: boolean) - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (key = '238') is true (type: boolean) + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: '238' (type: string) + expressions: key (type: string) outputColumnNames: _col0 - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -218,18 +218,18 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: (key = '238') (type: boolean) + filterExpr: (key = '238') is true (type: boolean) Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (key = '238') (type: boolean) - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (key = '238') is true (type: boolean) + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: '238' (type: string) + expressions: key (type: string) outputColumnNames: _col0 - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -332,18 +332,18 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: (key = '238') (type: boolean) + filterExpr: (key = '238') is true (type: boolean) Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (key = '238') (type: boolean) - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (key = '238') is true (type: boolean) + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: '238' (type: string) + expressions: key (type: string) outputColumnNames: _col0 - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 2 Data size: 174 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -376,10 +376,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: (not COALESCE((key = '238'),false)) (type: boolean) + filterExpr: (key = '238') is not true (type: boolean) Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (not COALESCE((key = '238'),false)) (type: boolean) + predicate: (key = '238') is not true (type: boolean) Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: key (type: string) @@ -501,10 +501,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: (not COALESCE((key = '11'),false)) (type: boolean) + filterExpr: (key = '11') is not true (type: boolean) Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (not COALESCE((key = '11'),false)) (type: boolean) + predicate: (key = '11') is not true (type: boolean) Statistics: Num rows: 250 Data size: 21750 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: key (type: string) diff --git ql/src/test/results/clientpositive/groupby_sort_1_23.q.out ql/src/test/results/clientpositive/groupby_sort_1_23.q.out index 3bf1d593d6..132ac69678 100644 --- ql/src/test/results/clientpositive/groupby_sort_1_23.q.out +++ ql/src/test/results/clientpositive/groupby_sort_1_23.q.out @@ -3665,7 +3665,7 @@ OPTIMIZED SQL: SELECT `key`, COUNT(*) AS `$f1` FROM `default`.`t1_n80` GROUP BY `key` UNION ALL -SELECT CAST(CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) AS STRING) AS `key`, COUNT(*) AS `_o__c1` +SELECT CAST(CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) AS VARCHAR(65536)) AS `key`, COUNT(*) AS `_o__c1` FROM `default`.`t1_n80` GROUP BY CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/groupby_sort_skew_1_23.q.out ql/src/test/results/clientpositive/groupby_sort_skew_1_23.q.out index 620edd8ef5..8c70cad7d1 100644 --- ql/src/test/results/clientpositive/groupby_sort_skew_1_23.q.out +++ ql/src/test/results/clientpositive/groupby_sort_skew_1_23.q.out @@ -2998,7 +2998,7 @@ group by key + key POSTHOOK: type: QUERY POSTHOOK: Input: default@t1_n56 POSTHOOK: Output: default@outputtbl1_n13 -OPTIMIZED SQL: SELECT CAST(CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) AS STRING) AS `_o__c0`, SUM(COUNT(*)) AS `_o__c1` +OPTIMIZED SQL: SELECT CAST(CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) AS VARCHAR(65536)) AS `_o__c0`, SUM(COUNT(*)) AS `_o__c1` FROM `default`.`t1_n56` GROUP BY CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) STAGE DEPENDENCIES: @@ -3945,7 +3945,7 @@ OPTIMIZED SQL: SELECT `key`, COUNT(*) AS `$f1` FROM `default`.`t1_n56` GROUP BY `key` UNION ALL -SELECT CAST(CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) AS STRING) AS `key`, COUNT(*) AS `_o__c1` +SELECT CAST(CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) AS VARCHAR(65536)) AS `key`, COUNT(*) AS `_o__c1` FROM `default`.`t1_n56` GROUP BY CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/in_typecheck_char.q.out ql/src/test/results/clientpositive/in_typecheck_char.q.out index 45dafaf4de..082bf8f877 100644 --- ql/src/test/results/clientpositive/in_typecheck_char.q.out +++ ql/src/test/results/clientpositive/in_typecheck_char.q.out @@ -209,10 +209,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: ax - filterExpr: (((s = 'a') and (t = 'a ')) or ((s = null) and (t = 'bb '))) is null (type: boolean) + filterExpr: (((s = 'a') and (t = 'a ')) or (null and (t = 'bb '))) is null (type: boolean) Statistics: Num rows: 3 Data size: 510 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (((s = 'a') and (t = 'a ')) or ((s = null) and (t = 'bb '))) is null (type: boolean) + predicate: (((s = 'a') and (t = 'a ')) or (null and (t = 'bb '))) is null (type: boolean) Statistics: Num rows: 1 Data size: 170 Basic stats: COMPLETE Column stats: COMPLETE Select Operator Statistics: Num rows: 1 Data size: 170 Basic stats: COMPLETE Column stats: COMPLETE diff --git ql/src/test/results/clientpositive/infer_const_type.q.out ql/src/test/results/clientpositive/infer_const_type.q.out index b736f4b159..71520366fc 100644 --- ql/src/test/results/clientpositive/infer_const_type.q.out +++ ql/src/test/results/clientpositive/infer_const_type.q.out @@ -139,10 +139,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: infertypes - filterExpr: ((UDFToDouble(ti) = 128.0D) or (UDFToInteger(si) = 32768) or (UDFToDouble(i) = 2.147483648E9D) or (UDFToDouble(bi) = 9.223372036854776E18D) or null) (type: boolean) + filterExpr: ((UDFToDouble(ti) = 128.0D) or (UDFToInteger(si) = 32768) or (UDFToDouble(i) = 2.147483648E9D) or (UDFToDouble(bi) = 9.223372036854776E18D)) (type: boolean) Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((UDFToDouble(bi) = 9.223372036854776E18D) or (UDFToDouble(i) = 2.147483648E9D) or (UDFToDouble(ti) = 128.0D) or (UDFToInteger(si) = 32768) or null) (type: boolean) + predicate: ((UDFToDouble(bi) = 9.223372036854776E18D) or (UDFToDouble(i) = 2.147483648E9D) or (UDFToDouble(ti) = 128.0D) or (UDFToInteger(si) = 32768)) (type: boolean) Statistics: Num rows: 1 Data size: 216 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ti (type: tinyint), si (type: smallint), i (type: int), bi (type: bigint), fl (type: float), db (type: double), str (type: string) diff --git ql/src/test/results/clientpositive/infer_join_preds.q.out ql/src/test/results/clientpositive/infer_join_preds.q.out index 0afdd029be..185d0f89de 100644 --- ql/src/test/results/clientpositive/infer_join_preds.q.out +++ ql/src/test/results/clientpositive/infer_join_preds.q.out @@ -1179,7 +1179,7 @@ STAGE PLANS: predicate: prid is not null (type: boolean) Statistics: Num rows: 1 Data size: 668 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: idp_warehouse_id (type: bigint), prid (type: bigint), concat(CAST( prid AS STRING), ',', CASE WHEN (prtimesheetid is null) THEN (1) ELSE (prtimesheetid) END, ',', CASE WHEN (prassignmentid is null) THEN (1) ELSE (prassignmentid) END, ',', CASE WHEN (prchargecodeid is null) THEN (1) ELSE (prchargecodeid) END, ',', CASE WHEN (prtypecodeid is null) THEN ('') ELSE (CAST( prtypecodeid AS STRING)) END, ',', CASE WHEN (practsum is null) THEN (1) ELSE (practsum) END, ',', CASE WHEN (prsequence is null) THEN (1) ELSE (prsequence) END, ',', CASE WHEN (length(prmodby) is null) THEN ('') ELSE (prmodby) END, ',', CASE WHEN (prmodtime is null) THEN (TIMESTAMP'2017-12-08 00:00:00') ELSE (prmodtime) END, ',', CASE WHEN (prrmexported is null) THEN (1) ELSE (prrmexported) END, ',', CASE WHEN (prrmckdel is null) THEN (1) ELSE (prrmckdel) END, ',', CASE WHEN (slice_status is null) THEN (1) ELSE (slice_status) END, ',', CASE WHEN (role_id is null) THEN (1) ELSE (role_id) END, ',', CASE WHEN (length(user_lov1) is null) THEN ('') ELSE (user_lov1) END, ',', CASE WHEN (length(user_lov2) is null) THEN ('') ELSE (user_lov2) END, ',', CASE WHEN (incident_id is null) THEN (1) ELSE (incident_id) END, ',', CASE WHEN (incident_investment_id is null) THEN (1) ELSE (incident_investment_id) END, ',', CASE WHEN (odf_ss_actuals is null) THEN (1) ELSE (odf_ss_actuals) END) (type: string) + expressions: idp_warehouse_id (type: bigint), prid (type: bigint), concat(CAST( CASE WHEN (prid is null) THEN (1) ELSE (prid) END AS STRING), ',', CASE WHEN (prtimesheetid is null) THEN (1) ELSE (prtimesheetid) END, ',', CASE WHEN (prassignmentid is null) THEN (1) ELSE (prassignmentid) END, ',', CASE WHEN (prchargecodeid is null) THEN (1) ELSE (prchargecodeid) END, ',', CASE WHEN (prtypecodeid is null) THEN ('') ELSE (CAST( prtypecodeid AS STRING)) END, ',', CASE WHEN (practsum is null) THEN (1) ELSE (practsum) END, ',', CASE WHEN (prsequence is null) THEN (1) ELSE (prsequence) END, ',', CASE WHEN (length(prmodby) is null) THEN ('') ELSE (prmodby) END, ',', CASE WHEN (prmodtime is null) THEN (TIMESTAMP'2017-12-08 00:00:00') ELSE (prmodtime) END, ',', CASE WHEN (prrmexported is null) THEN (1) ELSE (prrmexported) END, ',', CASE WHEN (prrmckdel is null) THEN (1) ELSE (prrmckdel) END, ',', CASE WHEN (slice_status is null) THEN (1) ELSE (slice_status) END, ',', CASE WHEN (role_id is null) THEN (1) ELSE (role_id) END, ',', CASE WHEN (length(user_lov1) is null) THEN ('') ELSE (user_lov1) END, ',', CASE WHEN (length(user_lov2) is null) THEN ('') ELSE (user_lov2) END, ',', CASE WHEN (incident_id is null) THEN (1) ELSE (incident_id) END, ',', CASE WHEN (incident_investment_id is null) THEN (1) ELSE (incident_investment_id) END, ',', CASE WHEN (odf_ss_actuals is null) THEN (1) ELSE (odf_ss_actuals) END) (type: string) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 1 Data size: 668 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -1238,7 +1238,7 @@ STAGE PLANS: predicate: prid is not null (type: boolean) Statistics: Num rows: 1 Data size: 776 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: prid (type: bigint), concat(CASE WHEN (length(pruid) is null) THEN ('') ELSE (pruid) END, ',', prid, ',', CASE WHEN (prtimesheetid is null) THEN (1) ELSE (prtimesheetid) END, ',', CASE WHEN (prassignmentid is null) THEN (1) ELSE (prassignmentid) END, ',', CASE WHEN (prchargecodeid is null) THEN (1) ELSE (prchargecodeid) END, ',', CASE WHEN (prtypecodeid is null) THEN ('') ELSE (CAST( prtypecodeid AS STRING)) END, ',', CASE WHEN (practsum is null) THEN (1) ELSE (practsum) END, ',', CASE WHEN (prsequence is null) THEN (1) ELSE (prsequence) END, ',', CASE WHEN (length(prmodby) is null) THEN ('') ELSE (prmodby) END, ',', CASE WHEN (prmodtime is null) THEN (TIMESTAMP'2017-12-08 00:00:00') ELSE (prmodtime) END, ',', CASE WHEN (prrmexported is null) THEN (1) ELSE (prrmexported) END, ',', CASE WHEN (prrmckdel is null) THEN (1) ELSE (prrmckdel) END, ',', CASE WHEN (slice_status is null) THEN (1) ELSE (slice_status) END, ',', CASE WHEN (role_id is null) THEN (1) ELSE (role_id) END, ',', CASE WHEN (length(user_lov1) is null) THEN ('') ELSE (user_lov1) END, ',', CASE WHEN (length(user_lov2) is null) THEN ('') ELSE (user_lov2) END, ',', CASE WHEN (incident_id is null) THEN (1) ELSE (incident_id) END, ',', CASE WHEN (incident_investment_id is null) THEN (1) ELSE (incident_investment_id) END, ',', CASE WHEN (odf_ss_actuals is null) THEN (1) ELSE (odf_ss_actuals) END) (type: string) + expressions: prid (type: bigint), concat(CASE WHEN (length(pruid) is null) THEN ('') ELSE (pruid) END, ',', CASE WHEN (prid is null) THEN (1) ELSE (prid) END, ',', CASE WHEN (prtimesheetid is null) THEN (1) ELSE (prtimesheetid) END, ',', CASE WHEN (prassignmentid is null) THEN (1) ELSE (prassignmentid) END, ',', CASE WHEN (prchargecodeid is null) THEN (1) ELSE (prchargecodeid) END, ',', CASE WHEN (prtypecodeid is null) THEN ('') ELSE (CAST( prtypecodeid AS STRING)) END, ',', CASE WHEN (practsum is null) THEN (1) ELSE (practsum) END, ',', CASE WHEN (prsequence is null) THEN (1) ELSE (prsequence) END, ',', CASE WHEN (length(prmodby) is null) THEN ('') ELSE (prmodby) END, ',', CASE WHEN (prmodtime is null) THEN (TIMESTAMP'2017-12-08 00:00:00') ELSE (prmodtime) END, ',', CASE WHEN (prrmexported is null) THEN (1) ELSE (prrmexported) END, ',', CASE WHEN (prrmckdel is null) THEN (1) ELSE (prrmckdel) END, ',', CASE WHEN (slice_status is null) THEN (1) ELSE (slice_status) END, ',', CASE WHEN (role_id is null) THEN (1) ELSE (role_id) END, ',', CASE WHEN (length(user_lov1) is null) THEN ('') ELSE (user_lov1) END, ',', CASE WHEN (length(user_lov2) is null) THEN ('') ELSE (user_lov2) END, ',', CASE WHEN (incident_id is null) THEN (1) ELSE (incident_id) END, ',', CASE WHEN (incident_investment_id is null) THEN (1) ELSE (incident_investment_id) END, ',', CASE WHEN (odf_ss_actuals is null) THEN (1) ELSE (odf_ss_actuals) END) (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 776 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator diff --git ql/src/test/results/clientpositive/innerjoin1.q.out ql/src/test/results/clientpositive/innerjoin1.q.out index cfc2c06bbc..7a1f105628 100644 --- ql/src/test/results/clientpositive/innerjoin1.q.out +++ ql/src/test/results/clientpositive/innerjoin1.q.out @@ -82,37 +82,37 @@ STAGE PLANS: Map Operator Tree: TableScan alias: c1 - filterExpr: CASE WHEN (a1 is not null) THEN (a1 is not null) ELSE (a2 is not null) END (type: boolean) + filterExpr: (a1 is not null or a2 is not null) (type: boolean) Statistics: Num rows: 2 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN (a1 is not null) THEN (a1 is not null) ELSE (a2 is not null) END (type: boolean) - Statistics: Num rows: 1 Data size: 170 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (a1 is not null or a2 is not null) (type: boolean) + Statistics: Num rows: 2 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: a1 (type: string), a2 (type: string), CASE WHEN (a1 is not null) THEN (a1) ELSE (a2) END (type: string) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 1 Data size: 354 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 708 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col2 (type: string) sort order: + Map-reduce partition columns: _col2 (type: string) - Statistics: Num rows: 1 Data size: 354 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 708 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col0 (type: string), _col1 (type: string) TableScan alias: c2 - filterExpr: CASE WHEN (b1 is not null) THEN (b1 is not null) ELSE (b2 is not null) END (type: boolean) + filterExpr: (b1 is not null or b2 is not null) (type: boolean) Statistics: Num rows: 2 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN (b1 is not null) THEN (b1 is not null) ELSE (b2 is not null) END (type: boolean) - Statistics: Num rows: 1 Data size: 170 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (b1 is not null or b2 is not null) (type: boolean) + Statistics: Num rows: 2 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: b1 (type: string), b2 (type: string), CASE WHEN (b1 is not null) THEN (b1) ELSE (b2) END (type: string) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 1 Data size: 354 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 708 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col2 (type: string) sort order: + Map-reduce partition columns: _col2 (type: string) - Statistics: Num rows: 1 Data size: 354 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 708 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col0 (type: string), _col1 (type: string) Reduce Operator Tree: Join Operator @@ -122,14 +122,14 @@ STAGE PLANS: 0 _col2 (type: string) 1 _col2 (type: string) outputColumnNames: _col0, _col1, _col3, _col4 - Statistics: Num rows: 1 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 680 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: string), _col3 (type: string), _col4 (type: string) outputColumnNames: _col0, _col1, _col2, _col3 - Statistics: Num rows: 1 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 680 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 680 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -173,37 +173,37 @@ STAGE PLANS: Map Operator Tree: TableScan alias: c1 - filterExpr: CASE WHEN (a1 is not null) THEN (a1 is not null) ELSE (a2 is not null) END (type: boolean) + filterExpr: (a1 is not null or a2 is not null) (type: boolean) Statistics: Num rows: 2 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN (a1 is not null) THEN (a1 is not null) ELSE (a2 is not null) END (type: boolean) - Statistics: Num rows: 1 Data size: 170 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (a1 is not null or a2 is not null) (type: boolean) + Statistics: Num rows: 2 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: a1 (type: string), a2 (type: string), CASE WHEN (a1 is not null) THEN (a1) ELSE (a2) END (type: string) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 1 Data size: 354 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 708 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col2 (type: string) sort order: + Map-reduce partition columns: _col2 (type: string) - Statistics: Num rows: 1 Data size: 354 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 708 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col0 (type: string), _col1 (type: string) TableScan alias: c2 - filterExpr: CASE WHEN (b1 is not null) THEN (b1 is not null) ELSE (b2 is not null) END (type: boolean) + filterExpr: (b1 is not null or b2 is not null) (type: boolean) Statistics: Num rows: 2 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN (b1 is not null) THEN (b1 is not null) ELSE (b2 is not null) END (type: boolean) - Statistics: Num rows: 1 Data size: 170 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (b1 is not null or b2 is not null) (type: boolean) + Statistics: Num rows: 2 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: b1 (type: string), b2 (type: string), CASE WHEN (b1 is not null) THEN (b1) ELSE (b2) END (type: string) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 1 Data size: 354 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 708 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col2 (type: string) sort order: + Map-reduce partition columns: _col2 (type: string) - Statistics: Num rows: 1 Data size: 354 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 708 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col0 (type: string), _col1 (type: string) Reduce Operator Tree: Join Operator @@ -213,14 +213,14 @@ STAGE PLANS: 0 _col2 (type: string) 1 _col2 (type: string) outputColumnNames: _col0, _col1, _col3, _col4 - Statistics: Num rows: 1 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 680 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: string), _col3 (type: string), _col4 (type: string) outputColumnNames: _col0, _col1, _col2, _col3 - Statistics: Num rows: 1 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 680 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 680 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git ql/src/test/results/clientpositive/input23.q.out ql/src/test/results/clientpositive/input23.q.out index e9e65dc96d..fed5868c84 100644 --- ql/src/test/results/clientpositive/input23.q.out +++ ql/src/test/results/clientpositive/input23.q.out @@ -11,7 +11,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`value`, CAST('2008-04-08' AS STRING) AS `ds`, CAST('11' AS STRING) AS `hr`, `t2`.`key` AS `key1`, `t2`.`value` AS `value1`, CAST('2008-04-08' AS STRING) AS `ds1`, CAST('14' AS STRING) AS `hr1` +OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds`, CAST('11' AS VARCHAR(65536)) AS `hr`, `t2`.`key` AS `key1`, `t2`.`value` AS `value1`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds1`, CAST('14' AS VARCHAR(65536)) AS `hr1` FROM (SELECT `key`, `value` FROM `default`.`srcpart` WHERE `ds` = '2008-04-08' AND `hr` = '11') AS `t0`, diff --git ql/src/test/results/clientpositive/input42.q.out ql/src/test/results/clientpositive/input42.q.out index 27917f77f8..b1dc7b5bb1 100644 --- ql/src/test/results/clientpositive/input42.q.out +++ ql/src/test/results/clientpositive/input42.q.out @@ -12,7 +12,7 @@ POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `key`, `value`, CAST('2008-04-08' AS STRING) AS `ds`, `hr` +OPTIMIZED SQL: SELECT `key`, `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds`, `hr` FROM `default`.`srcpart` WHERE `ds` = '2008-04-08' STAGE DEPENDENCIES: @@ -1155,7 +1155,7 @@ POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `key`, `value`, CAST('2008-04-08' AS STRING) AS `ds`, `hr` +OPTIMIZED SQL: SELECT `key`, `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds`, `hr` FROM `default`.`srcpart` WHERE `ds` = '2008-04-08' AND `key` < 200 STAGE DEPENDENCIES: @@ -1717,7 +1717,7 @@ POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `key`, `value`, CAST('2008-04-08' AS STRING) AS `ds`, `hr` +OPTIMIZED SQL: SELECT `key`, `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds`, `hr` FROM `default`.`srcpart` WHERE `ds` = '2008-04-08' AND RAND(100) < 0.1 STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/input8.q.out ql/src/test/results/clientpositive/input8.q.out index 7795dcdf2a..baf73bbf66 100644 --- ql/src/test/results/clientpositive/input8.q.out +++ ql/src/test/results/clientpositive/input8.q.out @@ -34,14 +34,14 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src1 - Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: null (type: string), UDFToInteger((UDFToDouble(key) - null)) (type: int), null (type: double) + expressions: null (type: string), null (type: int), null (type: double) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 25 Data size: 192 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 96 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 25 Data size: 192 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 96 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat @@ -50,7 +50,7 @@ STAGE PLANS: Select Operator expressions: _col0 (type: string), _col1 (type: int), _col2 (type: double) outputColumnNames: c1, c2, c3 - Statistics: Num rows: 25 Data size: 192 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 96 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: compute_stats(c1, 'hll'), compute_stats(c2, 'hll'), compute_stats(c3, 'hll') mode: hash @@ -142,7 +142,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@src1 POSTHOOK: Output: default@dest1_n28 POSTHOOK: Lineage: dest1_n28.c1 EXPRESSION [] -POSTHOOK: Lineage: dest1_n28.c2 EXPRESSION [(src1)src1.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: dest1_n28.c2 EXPRESSION [] POSTHOOK: Lineage: dest1_n28.c3 EXPRESSION [] PREHOOK: query: SELECT dest1_n28.* FROM dest1_n28 PREHOOK: type: QUERY diff --git ql/src/test/results/clientpositive/input_part1.q.out ql/src/test/results/clientpositive/input_part1.q.out index 63ce3a994f..fb4935a829 100644 --- ql/src/test/results/clientpositive/input_part1.q.out +++ ql/src/test/results/clientpositive/input_part1.q.out @@ -20,7 +20,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 POSTHOOK: Output: default@dest1_n45 -OPTIMIZED SQL: SELECT `key`, `value`, CAST('12' AS STRING) AS `hr`, CAST('2008-04-08' AS STRING) AS `ds` +OPTIMIZED SQL: SELECT `key`, `value`, CAST('12' AS VARCHAR(65536)) AS `hr`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds` FROM `default`.`srcpart` WHERE `key` < 100 AND `ds` = '2008-04-08' AND `hr` = '12' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/input_part9.q.out ql/src/test/results/clientpositive/input_part9.q.out index a15a77b3bf..d202dba75d 100644 --- ql/src/test/results/clientpositive/input_part9.q.out +++ ql/src/test/results/clientpositive/input_part9.q.out @@ -12,7 +12,7 @@ POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `key`, `value`, CAST('2008-04-08' AS STRING) AS `ds`, `hr` +OPTIMIZED SQL: SELECT `key`, `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds`, `hr` FROM `default`.`srcpart` WHERE `ds` = '2008-04-08' AND `key` IS NOT NULL STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/join_filters_overlap.q.out ql/src/test/results/clientpositive/join_filters_overlap.q.out index 6cd17d1ddb..41ebfccbbc 100644 --- ql/src/test/results/clientpositive/join_filters_overlap.q.out +++ ql/src/test/results/clientpositive/join_filters_overlap.q.out @@ -18,6 +18,15 @@ POSTHOOK: query: explain extended select * from a_n4 left outer join a_n4 b on ( POSTHOOK: type: QUERY POSTHOOK: Input: default@a_n4 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `t`.`key`, `t`.`value`, `t1`.`key` AS `key1`, `t1`.`value` AS `value1`, `t3`.`key` AS `key2`, `t3`.`value` AS `value2` +FROM (SELECT `key`, `value`, `value` = 60 AS `=`, `value` = 50 AS `=3` +FROM `default`.`a_n4`) AS `t` +LEFT JOIN (SELECT `key`, CAST(50 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 50) AS `t1` ON `t`.`key` = `t1`.`key` AND `t`.`=3` +LEFT JOIN (SELECT `key`, CAST(60 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 60) AS `t3` ON `t`.`key` = `t3`.`key` AND `t`.`=` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-2 depends on stages: Stage-1 @@ -343,6 +352,15 @@ POSTHOOK: query: explain extended select * from a_n4 right outer join a_n4 b on POSTHOOK: type: QUERY POSTHOOK: Input: default@a_n4 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`value`, `t1`.`key` AS `key1`, `t1`.`value` AS `value1`, `t3`.`key` AS `key2`, `t3`.`value` AS `value2` +FROM (SELECT `key`, CAST(50 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 50) AS `t0` +RIGHT JOIN (SELECT `key`, `value`, `value` = 60 AS `=`, `value` = 50 AS `=3` +FROM `default`.`a_n4`) AS `t1` ON `t0`.`key` = `t1`.`key` AND `t1`.`=3` +LEFT JOIN (SELECT `key`, CAST(60 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 60) AS `t3` ON `t1`.`key` = `t3`.`key` AND `t1`.`=` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-2 depends on stages: Stage-1 @@ -668,6 +686,15 @@ POSTHOOK: query: explain extended select * from a_n4 right outer join a_n4 b on POSTHOOK: type: QUERY POSTHOOK: Input: default@a_n4 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`value`, `t1`.`key` AS `key1`, `t1`.`value` AS `value1`, `t3`.`key` AS `key2`, `t3`.`value` AS `value2` +FROM (SELECT `key`, CAST(50 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 50) AS `t0` +RIGHT JOIN (SELECT `key`, `value`, `value` = 60 AS `=`, `value` = 50 AS `=3` +FROM `default`.`a_n4`) AS `t1` ON `t0`.`key` = `t1`.`key` AND `t1`.`=3` +LEFT JOIN (SELECT `key`, CAST(60 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 60) AS `t3` ON `t1`.`key` = `t3`.`key` AND `t1`.`=` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-2 depends on stages: Stage-1 @@ -993,6 +1020,17 @@ POSTHOOK: query: explain extended select * from a_n4 full outer join a_n4 b on ( POSTHOOK: type: QUERY POSTHOOK: Input: default@a_n4 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `t`.`key`, `t`.`value`, `t0`.`key` AS `key1`, `t0`.`value` AS `value1`, `t2`.`key` AS `key2`, `t2`.`value` AS `value2`, `t4`.`key` AS `key3`, `t4`.`value` AS `value3` +FROM (SELECT `key`, `value`, `value` = 40 AS `=`, `value` = 50 AS `=3` +FROM `default`.`a_n4`) AS `t` +FULL JOIN (SELECT `key`, `value`, `value` = 60 AS `=`, `value` = 50 AS `=3` +FROM `default`.`a_n4`) AS `t0` ON `t`.`key` = `t0`.`key` AND `t`.`=3` AND `t0`.`=3` +LEFT JOIN (SELECT `key`, CAST(60 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 60) AS `t2` ON `t0`.`key` = `t2`.`key` AND `t0`.`=` +LEFT JOIN (SELECT `key`, CAST(40 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 40) AS `t4` ON `t`.`key` = `t4`.`key` AND `t`.`=` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-2 depends on stages: Stage-1 @@ -1452,6 +1490,18 @@ POSTHOOK: query: explain extended select * from a_n4 left outer join a_n4 b on ( POSTHOOK: type: QUERY POSTHOOK: Input: default@a_n4 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `t`.`key`, `t`.`value`, `t1`.`key` AS `key1`, `t1`.`value` AS `value1`, `t3`.`key` AS `key2`, `t3`.`value` AS `value2`, `t5`.`key` AS `key3`, `t5`.`value` AS `value3` +FROM (SELECT `key`, `value`, `value` = 40 AS `=`, `value` = 60 AS `=3`, `value` = 50 AS `=4` +FROM `default`.`a_n4`) AS `t` +LEFT JOIN (SELECT `key`, CAST(50 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 50) AS `t1` ON `t`.`key` = `t1`.`key` AND `t`.`=4` +LEFT JOIN (SELECT `key`, CAST(60 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 60) AS `t3` ON `t`.`key` = `t3`.`key` AND `t`.`=3` +LEFT JOIN (SELECT `key`, CAST(40 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 40) AS `t5` ON `t`.`key` = `t5`.`key` AND `t`.`=` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-2 depends on stages: Stage-1 diff --git ql/src/test/results/clientpositive/list_bucket_dml_1.q.out ql/src/test/results/clientpositive/list_bucket_dml_1.q.out index e155cf08c2..ec2e6fb200 100644 --- ql/src/test/results/clientpositive/list_bucket_dml_1.q.out +++ ql/src/test/results/clientpositive/list_bucket_dml_1.q.out @@ -418,7 +418,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@list_bucketing_dynamic_part_n0 POSTHOOK: Input: default@list_bucketing_dynamic_part_n0@ds=2008-04-08/hr=11 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('484' AS STRING) AS `key`, `value` +OPTIMIZED SQL: SELECT CAST('484' AS VARCHAR(65536)) AS `key`, `value` FROM `default`.`list_bucketing_dynamic_part_n0` WHERE `ds` = '2008-04-08' AND `hr` = '11' AND `key` = '484' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/list_bucket_dml_11.q.out ql/src/test/results/clientpositive/list_bucket_dml_11.q.out index 109678680c..52f3bfbd1f 100644 --- ql/src/test/results/clientpositive/list_bucket_dml_11.q.out +++ ql/src/test/results/clientpositive/list_bucket_dml_11.q.out @@ -296,7 +296,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@list_bucketing_static_part_n3 POSTHOOK: Input: default@list_bucketing_static_part_n3@ds=2008-04-08/hr=11 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `key`, CAST('val_466' AS STRING) AS `value` +OPTIMIZED SQL: SELECT `key`, CAST('val_466' AS VARCHAR(65536)) AS `value` FROM `default`.`list_bucketing_static_part_n3` WHERE `ds` = '2008-04-08' AND `hr` = '11' AND `value` = 'val_466' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/list_bucket_dml_12.q.out ql/src/test/results/clientpositive/list_bucket_dml_12.q.out index 33c5d06d17..f73c8d1b06 100644 --- ql/src/test/results/clientpositive/list_bucket_dml_12.q.out +++ ql/src/test/results/clientpositive/list_bucket_dml_12.q.out @@ -304,7 +304,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@list_bucketing_mul_col_n0 POSTHOOK: Input: default@list_bucketing_mul_col_n0@ds=2008-04-08/hr=11 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `col1`, CAST('466' AS STRING) AS `col2`, `col3`, CAST('val_466' AS STRING) AS `col4`, `col5`, CAST('2008-04-08' AS STRING) AS `ds`, CAST('11' AS STRING) AS `hr` +OPTIMIZED SQL: SELECT `col1`, CAST('466' AS VARCHAR(65536)) AS `col2`, `col3`, CAST('val_466' AS VARCHAR(65536)) AS `col4`, `col5`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds`, CAST('11' AS VARCHAR(65536)) AS `hr` FROM `default`.`list_bucketing_mul_col_n0` WHERE `ds` = '2008-04-08' AND `hr` = '11' AND `col2` = '466' AND `col4` = 'val_466' STAGE DEPENDENCIES: @@ -441,7 +441,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@list_bucketing_mul_col_n0 POSTHOOK: Input: default@list_bucketing_mul_col_n0@ds=2008-04-08/hr=11 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `col1`, CAST('382' AS STRING) AS `col2`, `col3`, CAST('val_382' AS STRING) AS `col4`, `col5`, CAST('2008-04-08' AS STRING) AS `ds`, CAST('11' AS STRING) AS `hr` +OPTIMIZED SQL: SELECT `col1`, CAST('382' AS VARCHAR(65536)) AS `col2`, `col3`, CAST('val_382' AS VARCHAR(65536)) AS `col4`, `col5`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds`, CAST('11' AS VARCHAR(65536)) AS `hr` FROM `default`.`list_bucketing_mul_col_n0` WHERE `ds` = '2008-04-08' AND `hr` = '11' AND `col2` = '382' AND `col4` = 'val_382' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/list_bucket_dml_13.q.out ql/src/test/results/clientpositive/list_bucket_dml_13.q.out index 9535155801..ff449f908a 100644 --- ql/src/test/results/clientpositive/list_bucket_dml_13.q.out +++ ql/src/test/results/clientpositive/list_bucket_dml_13.q.out @@ -304,7 +304,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@list_bucketing_mul_col POSTHOOK: Input: default@list_bucketing_mul_col@ds=2008-04-08/hr=2013-01-23+18%3A00%3A99 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `col1`, CAST('466' AS STRING) AS `col2`, `col3`, CAST('val_466' AS STRING) AS `col4`, `col5`, CAST('2008-04-08' AS STRING) AS `ds`, CAST('2013-01-23+18:00:99' AS STRING) AS `hr` +OPTIMIZED SQL: SELECT `col1`, CAST('466' AS VARCHAR(65536)) AS `col2`, `col3`, CAST('val_466' AS VARCHAR(65536)) AS `col4`, `col5`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds`, CAST('2013-01-23+18:00:99' AS VARCHAR(65536)) AS `hr` FROM `default`.`list_bucketing_mul_col` WHERE `ds` = '2008-04-08' AND `hr` = '2013-01-23+18:00:99' AND `col2` = '466' AND `col4` = 'val_466' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/list_bucket_dml_14.q.out ql/src/test/results/clientpositive/list_bucket_dml_14.q.out index 82441e79b0..d968fec3e0 100644 --- ql/src/test/results/clientpositive/list_bucket_dml_14.q.out +++ ql/src/test/results/clientpositive/list_bucket_dml_14.q.out @@ -297,7 +297,7 @@ select key, value from list_bucketing where key = "484" POSTHOOK: type: QUERY POSTHOOK: Input: default@list_bucketing #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('484' AS STRING) AS `key`, `value` +OPTIMIZED SQL: SELECT CAST('484' AS VARCHAR(65536)) AS `key`, `value` FROM `default`.`list_bucketing` WHERE `key` = '484' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/list_bucket_dml_2.q.out ql/src/test/results/clientpositive/list_bucket_dml_2.q.out index 9828a5514f..44d452681a 100644 --- ql/src/test/results/clientpositive/list_bucket_dml_2.q.out +++ ql/src/test/results/clientpositive/list_bucket_dml_2.q.out @@ -375,7 +375,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@list_bucketing_static_part_n4 POSTHOOK: Input: default@list_bucketing_static_part_n4@ds=2008-04-08/hr=11 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('484' AS STRING) AS `$f0`, CAST('val_484' AS STRING) AS `$f1`, CAST('2008-04-08' AS STRING) AS `$f2`, CAST('11' AS STRING) AS `$f3` +OPTIMIZED SQL: SELECT CAST('484' AS VARCHAR(65536)) AS `$f0`, CAST('val_484' AS VARCHAR(65536)) AS `$f1`, CAST('2008-04-08' AS VARCHAR(65536)) AS `$f2`, CAST('11' AS VARCHAR(65536)) AS `$f3` FROM `default`.`list_bucketing_static_part_n4` WHERE `ds` = '2008-04-08' AND `hr` = '11' AND `key` = '484' AND `value` = 'val_484' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/list_bucket_dml_3.q.out ql/src/test/results/clientpositive/list_bucket_dml_3.q.out index f4ad803d72..685cc8f546 100644 --- ql/src/test/results/clientpositive/list_bucket_dml_3.q.out +++ ql/src/test/results/clientpositive/list_bucket_dml_3.q.out @@ -367,7 +367,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@list_bucketing_static_part_n1 POSTHOOK: Input: default@list_bucketing_static_part_n1@ds=2008-04-08/hr=11 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('484' AS STRING) AS `key`, `value` +OPTIMIZED SQL: SELECT CAST('484' AS VARCHAR(65536)) AS `key`, `value` FROM `default`.`list_bucketing_static_part_n1` WHERE `ds` = '2008-04-08' AND `hr` = '11' AND `key` = '484' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/list_bucket_dml_4.q.out ql/src/test/results/clientpositive/list_bucket_dml_4.q.out index b94a49baec..e83f63d511 100644 --- ql/src/test/results/clientpositive/list_bucket_dml_4.q.out +++ ql/src/test/results/clientpositive/list_bucket_dml_4.q.out @@ -826,7 +826,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@list_bucketing_static_part_n2 POSTHOOK: Input: default@list_bucketing_static_part_n2@ds=2008-04-08/hr=11 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('484' AS STRING) AS `$f0`, CAST('val_484' AS STRING) AS `$f1`, CAST('2008-04-08' AS STRING) AS `$f2`, CAST('11' AS STRING) AS `$f3` +OPTIMIZED SQL: SELECT CAST('484' AS VARCHAR(65536)) AS `$f0`, CAST('val_484' AS VARCHAR(65536)) AS `$f1`, CAST('2008-04-08' AS VARCHAR(65536)) AS `$f2`, CAST('11' AS VARCHAR(65536)) AS `$f3` FROM `default`.`list_bucketing_static_part_n2` WHERE `ds` = '2008-04-08' AND `hr` = '11' AND `key` = '484' AND `value` = 'val_484' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/list_bucket_dml_5.q.out ql/src/test/results/clientpositive/list_bucket_dml_5.q.out index e4ddd139d9..76781a83d6 100644 --- ql/src/test/results/clientpositive/list_bucket_dml_5.q.out +++ ql/src/test/results/clientpositive/list_bucket_dml_5.q.out @@ -425,7 +425,7 @@ POSTHOOK: Input: default@list_bucketing_dynamic_part_n1 POSTHOOK: Input: default@list_bucketing_dynamic_part_n1@ds=2008-04-08/hr=11 POSTHOOK: Input: default@list_bucketing_dynamic_part_n1@ds=2008-04-08/hr=12 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('103' AS STRING) AS `key`, CAST('val_103' AS STRING) AS `value`, CAST('2008-04-08' AS STRING) AS `ds`, `hr` +OPTIMIZED SQL: SELECT CAST('103' AS VARCHAR(65536)) AS `key`, CAST('val_103' AS VARCHAR(65536)) AS `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds`, `hr` FROM `default`.`list_bucketing_dynamic_part_n1` WHERE `ds` = '2008-04-08' AND `key` = '103' AND `value` = 'val_103' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/list_bucket_dml_6.q.out ql/src/test/results/clientpositive/list_bucket_dml_6.q.out index b6f2d7a629..7658b65b69 100644 --- ql/src/test/results/clientpositive/list_bucket_dml_6.q.out +++ ql/src/test/results/clientpositive/list_bucket_dml_6.q.out @@ -29,7 +29,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 -OPTIMIZED SQL: SELECT `key`, `value`, IF(MOD(CAST(`key` AS DOUBLE), CAST(100 AS DOUBLE)) = 0, 'a1', 'b1') AS `_o__c2` +OPTIMIZED SQL: SELECT `key`, `value`, IF(MOD(CAST(`key` AS DOUBLE), CAST(100 AS DOUBLE)) = CAST(0 AS DOUBLE), 'a1', 'b1') AS `_o__c2` FROM `default`.`srcpart` WHERE `ds` = '2008-04-08' STAGE DEPENDENCIES: @@ -404,7 +404,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 -OPTIMIZED SQL: SELECT `key`, `value`, IF(MOD(CAST(`key` AS DOUBLE), CAST(100 AS DOUBLE)) = 0, 'a1', 'b1') AS `_o__c2` +OPTIMIZED SQL: SELECT `key`, `value`, IF(MOD(CAST(`key` AS DOUBLE), CAST(100 AS DOUBLE)) = CAST(0 AS DOUBLE), 'a1', 'b1') AS `_o__c2` FROM `default`.`srcpart` WHERE `ds` = '2008-04-08' STAGE DEPENDENCIES: @@ -922,7 +922,7 @@ POSTHOOK: Input: default@list_bucketing_dynamic_part_n3 POSTHOOK: Input: default@list_bucketing_dynamic_part_n3@ds=2008-04-08/hr=a1 POSTHOOK: Input: default@list_bucketing_dynamic_part_n3@ds=2008-04-08/hr=b1 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('484' AS STRING) AS `key`, CAST('val_484' AS STRING) AS `value`, `ds`, `hr` +OPTIMIZED SQL: SELECT CAST('484' AS VARCHAR(65536)) AS `key`, CAST('val_484' AS VARCHAR(65536)) AS `value`, `ds`, `hr` FROM `default`.`list_bucketing_dynamic_part_n3` WHERE `key` = '484' AND `value` = 'val_484' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/list_bucket_dml_7.q.out ql/src/test/results/clientpositive/list_bucket_dml_7.q.out index 6ccd7044c9..d02f2aba06 100644 --- ql/src/test/results/clientpositive/list_bucket_dml_7.q.out +++ ql/src/test/results/clientpositive/list_bucket_dml_7.q.out @@ -29,7 +29,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 -OPTIMIZED SQL: SELECT `key`, `value`, IF(MOD(CAST(`key` AS DOUBLE), CAST(100 AS DOUBLE)) = 0, 'a1', 'b1') AS `_o__c2` +OPTIMIZED SQL: SELECT `key`, `value`, IF(MOD(CAST(`key` AS DOUBLE), CAST(100 AS DOUBLE)) = CAST(0 AS DOUBLE), 'a1', 'b1') AS `_o__c2` FROM `default`.`srcpart` WHERE `ds` = '2008-04-08' STAGE DEPENDENCIES: @@ -404,7 +404,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 -OPTIMIZED SQL: SELECT `key`, `value`, IF(MOD(CAST(`key` AS DOUBLE), CAST(100 AS DOUBLE)) = 0, 'a1', 'b1') AS `_o__c2` +OPTIMIZED SQL: SELECT `key`, `value`, IF(MOD(CAST(`key` AS DOUBLE), CAST(100 AS DOUBLE)) = CAST(0 AS DOUBLE), 'a1', 'b1') AS `_o__c2` FROM `default`.`srcpart` WHERE `ds` = '2008-04-08' STAGE DEPENDENCIES: @@ -922,7 +922,7 @@ POSTHOOK: Input: default@list_bucketing_dynamic_part POSTHOOK: Input: default@list_bucketing_dynamic_part@ds=2008-04-08/hr=a1 POSTHOOK: Input: default@list_bucketing_dynamic_part@ds=2008-04-08/hr=b1 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('484' AS STRING) AS `key`, CAST('val_484' AS STRING) AS `value`, `ds`, `hr` +OPTIMIZED SQL: SELECT CAST('484' AS VARCHAR(65536)) AS `key`, CAST('val_484' AS VARCHAR(65536)) AS `value`, `ds`, `hr` FROM `default`.`list_bucketing_dynamic_part` WHERE `key` = '484' AND `value` = 'val_484' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/list_bucket_dml_8.q.out ql/src/test/results/clientpositive/list_bucket_dml_8.q.out index 6e90e35f95..5562258ed6 100644 --- ql/src/test/results/clientpositive/list_bucket_dml_8.q.out +++ ql/src/test/results/clientpositive/list_bucket_dml_8.q.out @@ -29,7 +29,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 -OPTIMIZED SQL: SELECT `key`, `value`, IF(MOD(CAST(`key` AS DOUBLE), CAST(100 AS DOUBLE)) = 0, 'a1', 'b1') AS `_o__c2` +OPTIMIZED SQL: SELECT `key`, `value`, IF(MOD(CAST(`key` AS DOUBLE), CAST(100 AS DOUBLE)) = CAST(0 AS DOUBLE), 'a1', 'b1') AS `_o__c2` FROM `default`.`srcpart` WHERE `ds` = '2008-04-08' STAGE DEPENDENCIES: @@ -475,7 +475,7 @@ POSTHOOK: Input: default@list_bucketing_dynamic_part_n2 POSTHOOK: Input: default@list_bucketing_dynamic_part_n2@ds=2008-04-08/hr=a1 POSTHOOK: Input: default@list_bucketing_dynamic_part_n2@ds=2008-04-08/hr=b1 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('484' AS STRING) AS `key`, CAST('val_484' AS STRING) AS `value`, `ds`, `hr` +OPTIMIZED SQL: SELECT CAST('484' AS VARCHAR(65536)) AS `key`, CAST('val_484' AS VARCHAR(65536)) AS `value`, `ds`, `hr` FROM `default`.`list_bucketing_dynamic_part_n2` WHERE `key` = '484' AND `value` = 'val_484' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/list_bucket_dml_9.q.out ql/src/test/results/clientpositive/list_bucket_dml_9.q.out index 9854283b52..00a5090401 100644 --- ql/src/test/results/clientpositive/list_bucket_dml_9.q.out +++ ql/src/test/results/clientpositive/list_bucket_dml_9.q.out @@ -826,7 +826,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@list_bucketing_static_part_n0 POSTHOOK: Input: default@list_bucketing_static_part_n0@ds=2008-04-08/hr=11 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('484' AS STRING) AS `$f0`, CAST('val_484' AS STRING) AS `$f1`, CAST('2008-04-08' AS STRING) AS `$f2`, CAST('11' AS STRING) AS `$f3` +OPTIMIZED SQL: SELECT CAST('484' AS VARCHAR(65536)) AS `$f0`, CAST('val_484' AS VARCHAR(65536)) AS `$f1`, CAST('2008-04-08' AS VARCHAR(65536)) AS `$f2`, CAST('11' AS VARCHAR(65536)) AS `$f3` FROM `default`.`list_bucketing_static_part_n0` WHERE `ds` = '2008-04-08' AND `hr` = '11' AND `key` = '484' AND `value` = 'val_484' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/list_bucket_query_multiskew_1.q.out ql/src/test/results/clientpositive/list_bucket_query_multiskew_1.q.out index 32e4201ab0..b6c10f6a09 100644 --- ql/src/test/results/clientpositive/list_bucket_query_multiskew_1.q.out +++ ql/src/test/results/clientpositive/list_bucket_query_multiskew_1.q.out @@ -86,7 +86,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@fact_daily POSTHOOK: Input: default@fact_daily@ds=1/hr=4 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('484' AS STRING) AS `$f0` +OPTIMIZED SQL: SELECT CAST('484' AS VARCHAR(65536)) AS `$f0` FROM `default`.`fact_daily` WHERE `ds` = '1' AND `hr` = '4' AND `key` = '484' AND `value` = 'val_484' STAGE DEPENDENCIES: @@ -215,7 +215,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@fact_daily POSTHOOK: Input: default@fact_daily@ds=1/hr=4 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('238' AS STRING) AS `$f0`, CAST('val_238' AS STRING) AS `$f1` +OPTIMIZED SQL: SELECT CAST('238' AS VARCHAR(65536)) AS `$f0`, CAST('val_238' AS VARCHAR(65536)) AS `$f1` FROM `default`.`fact_daily` WHERE `ds` = '1' AND `hr` = '4' AND `key` = '238' AND `value` = 'val_238' STAGE DEPENDENCIES: @@ -473,7 +473,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@fact_daily POSTHOOK: Input: default@fact_daily@ds=1/hr=4 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('495' AS STRING) AS `key`, `value` +OPTIMIZED SQL: SELECT CAST('495' AS VARCHAR(65536)) AS `key`, `value` FROM `default`.`fact_daily` WHERE `ds` = '1' AND `hr` = '4' AND `key` = '495' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/list_bucket_query_multiskew_2.q.out ql/src/test/results/clientpositive/list_bucket_query_multiskew_2.q.out index c6a3c1fb8f..67108b7718 100644 --- ql/src/test/results/clientpositive/list_bucket_query_multiskew_2.q.out +++ ql/src/test/results/clientpositive/list_bucket_query_multiskew_2.q.out @@ -86,7 +86,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@fact_daily_n2 POSTHOOK: Input: default@fact_daily_n2@ds=1/hr=4 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `key`, CAST('val_484' AS STRING) AS `value` +OPTIMIZED SQL: SELECT `key`, CAST('val_484' AS VARCHAR(65536)) AS `value` FROM `default`.`fact_daily_n2` WHERE `ds` = '1' AND `hr` = '4' AND `value` = 'val_484' STAGE DEPENDENCIES: @@ -265,7 +265,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@fact_daily_n2 POSTHOOK: Input: default@fact_daily_n2@ds=1/hr=4 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('406' AS STRING) AS `$f0` +OPTIMIZED SQL: SELECT CAST('406' AS VARCHAR(65536)) AS `$f0` FROM `default`.`fact_daily_n2` WHERE `ds` = '1' AND `hr` = '4' AND `key` = '406' STAGE DEPENDENCIES: @@ -397,6 +397,9 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@fact_daily_n2 POSTHOOK: Input: default@fact_daily_n2@ds=1/hr=4 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value` +FROM `default`.`fact_daily_n2` +WHERE ROW(`key`, `value`) IN (ROW('484', 'val_484'), ROW('238', 'val_238')) AND `ds` = '1' AND `hr` = '4' STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 diff --git ql/src/test/results/clientpositive/list_bucket_query_multiskew_3.q.out ql/src/test/results/clientpositive/list_bucket_query_multiskew_3.q.out index a533726387..978e5d822f 100644 --- ql/src/test/results/clientpositive/list_bucket_query_multiskew_3.q.out +++ ql/src/test/results/clientpositive/list_bucket_query_multiskew_3.q.out @@ -196,7 +196,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@fact_daily_n3 POSTHOOK: Input: default@fact_daily_n3@ds=1/hr=1 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('145' AS STRING) AS `key`, `value`, CAST('1' AS STRING) AS `ds`, CAST('1' AS STRING) AS `hr` +OPTIMIZED SQL: SELECT CAST('145' AS VARCHAR(65536)) AS `key`, `value`, CAST('1' AS VARCHAR(65536)) AS `ds`, CAST('1' AS VARCHAR(65536)) AS `hr` FROM `default`.`fact_daily_n3` WHERE `ds` = '1' AND `hr` = '1' AND `key` = '145' STAGE DEPENDENCIES: @@ -359,7 +359,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@fact_daily_n3 POSTHOOK: Input: default@fact_daily_n3@ds=1/hr=2 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('484' AS STRING) AS `$f0`, CAST('val_484' AS STRING) AS `$f1`, CAST('1' AS STRING) AS `$f2`, CAST('2' AS STRING) AS `$f3` +OPTIMIZED SQL: SELECT CAST('484' AS VARCHAR(65536)) AS `$f0`, CAST('val_484' AS VARCHAR(65536)) AS `$f1`, CAST('1' AS VARCHAR(65536)) AS `$f2`, CAST('2' AS VARCHAR(65536)) AS `$f3` FROM `default`.`fact_daily_n3` WHERE `ds` = '1' AND `hr` = '2' AND `key` = '484' AND `value` = 'val_484' STAGE DEPENDENCIES: @@ -490,7 +490,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@fact_daily_n3 POSTHOOK: Input: default@fact_daily_n3@ds=1/hr=3 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('327' AS STRING) AS `$f0`, CAST('val_327' AS STRING) AS `$f1`, CAST('1' AS STRING) AS `$f2`, CAST('3' AS STRING) AS `$f3` +OPTIMIZED SQL: SELECT CAST('327' AS VARCHAR(65536)) AS `$f0`, CAST('val_327' AS VARCHAR(65536)) AS `$f1`, CAST('1' AS VARCHAR(65536)) AS `$f2`, CAST('3' AS VARCHAR(65536)) AS `$f3` FROM `default`.`fact_daily_n3` WHERE `ds` = '1' AND `hr` = '3' AND `key` = '327' AND `value` = 'val_327' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/llap/auto_sortmerge_join_12.q.out ql/src/test/results/clientpositive/llap/auto_sortmerge_join_12.q.out index 183e31edff..e2d71159b9 100644 --- ql/src/test/results/clientpositive/llap/auto_sortmerge_join_12.q.out +++ ql/src/test/results/clientpositive/llap/auto_sortmerge_join_12.q.out @@ -134,7 +134,7 @@ POSTHOOK: query: load data local inpath '../../data/files/auto_sortmerge_join/sm POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@bucket_medium@ds=2008-04-08 -Warning: Shuffle Join MERGEJOIN[60][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3]] in Stage 'Reducer 3' is a cross product +Warning: Shuffle Join MERGEJOIN[63][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product PREHOOK: query: explain extended select count(*) FROM bucket_small_n15 a JOIN bucket_medium b ON a.key = b.key JOIN bucket_big_n15 c ON c.key = b.key JOIN bucket_medium d ON c.key = b.key PREHOOK: type: QUERY PREHOOK: Input: default@bucket_big_n15 @@ -156,17 +156,20 @@ POSTHOOK: Input: default@bucket_small_n15 POSTHOOK: Input: default@bucket_small_n15@ds=2008-04-08 #### A masked pattern was here #### OPTIMIZED SQL: SELECT COUNT(*) AS `$f0` +FROM (SELECT 0 AS `DUMMY` +FROM `default`.`bucket_medium`) AS `t`, +(SELECT 0 AS `DUMMY` +FROM (SELECT `t5`.`key`, `t3`.`key` AS `key0`, `t1`.`key` AS `key1` FROM (SELECT `key` FROM `default`.`bucket_big_n15` -WHERE `key` IS NOT NULL) AS `t0` +WHERE `key` IS NOT NULL) AS `t1` INNER JOIN (SELECT `key` FROM `default`.`bucket_medium` -WHERE `key` IS NOT NULL) AS `t2` ON `t0`.`key` = `t2`.`key` +WHERE `key` IS NOT NULL) AS `t3` ON `t1`.`key` = `t3`.`key` INNER JOIN (SELECT `key` FROM `default`.`bucket_small_n15` -WHERE `key` IS NOT NULL) AS `t4` ON `t2`.`key` = `t4`.`key`, -(SELECT 0 AS `DUMMY` -FROM `default`.`bucket_medium`) AS `t5` +WHERE `key` IS NOT NULL) AS `t5` ON `t3`.`key` = `t5`.`key`) AS `t6` +WHERE `t6`.`key1` = `t6`.`key0`) AS `t8` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -176,14 +179,85 @@ STAGE PLANS: Tez #### A masked pattern was here #### Edges: - Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE) - Reducer 3 <- Map 7 (XPROD_EDGE), Reducer 2 (XPROD_EDGE) - Reducer 4 <- Reducer 3 (CUSTOM_SIMPLE_EDGE) + Reducer 2 <- Map 1 (XPROD_EDGE), Reducer 5 (XPROD_EDGE) + Reducer 3 <- Reducer 2 (CUSTOM_SIMPLE_EDGE) + Reducer 5 <- Map 4 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE) #### A masked pattern was here #### Vertices: Map 1 Map Operator Tree: TableScan + alias: d + Statistics: Num rows: 3 Data size: 1724 Basic stats: PARTIAL Column stats: COMPLETE + GatherStats: false + Select Operator + Statistics: Num rows: 3 Data size: 1724 Basic stats: PARTIAL Column stats: COMPLETE + Reduce Output Operator + null sort order: + sort order: + Statistics: Num rows: 3 Data size: 1724 Basic stats: PARTIAL Column stats: COMPLETE + tag: 0 + auto parallelism: false + Execution mode: vectorized, llap + LLAP IO: no inputs + Path -> Alias: +#### A masked pattern was here #### + Path -> Partition: +#### A masked pattern was here #### + Partition + base file name: ds=2008-04-08 + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + partition values: + ds 2008-04-08 + properties: + bucket_count 3 + bucket_field_name key + column.name.delimiter , + columns key,value + columns.comments + columns.types string:string +#### A masked pattern was here #### + name default.bucket_medium + numFiles 3 + numRows 0 + partition_columns ds + partition_columns.types string + rawDataSize 0 + serialization.ddl struct bucket_medium { string key, string value} + serialization.format 1 + serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + totalSize 170 +#### A masked pattern was here #### + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + properties: + SORTBUCKETCOLSPREFIX TRUE + bucket_count 3 + bucket_field_name key + bucketing_version 2 + column.name.delimiter , + columns key,value + columns.comments + columns.types string:string +#### A masked pattern was here #### + name default.bucket_medium + partition_columns ds + partition_columns.types string + serialization.ddl struct bucket_medium { string key, string value} + serialization.format 1 + serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe +#### A masked pattern was here #### + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.bucket_medium + name: default.bucket_medium + Truncated Path -> Alias: + /bucket_medium/ds=2008-04-08 [d] + Map 4 + Map Operator Tree: + TableScan alias: b filterExpr: key is not null (type: boolean) Statistics: Num rows: 3 Data size: 552 Basic stats: PARTIAL Column stats: NONE @@ -270,7 +344,7 @@ STAGE PLANS: keys: 0 _col0 (type: string) 1 _col0 (type: string) - outputColumnNames: _col1 + outputColumnNames: _col0, _col1 Position of Big Table: 0 Statistics: Num rows: 232 Data size: 37723 Basic stats: PARTIAL Column stats: NONE Reduce Output Operator @@ -280,6 +354,7 @@ STAGE PLANS: Map-reduce partition columns: _col1 (type: string) Statistics: Num rows: 232 Data size: 37723 Basic stats: PARTIAL Column stats: NONE tag: 0 + value expressions: _col0 (type: string) auto parallelism: true Execution mode: llap Path -> Alias: @@ -386,7 +461,7 @@ STAGE PLANS: Truncated Path -> Alias: /bucket_big_n15/ds=2008-04-08 [c] /bucket_big_n15/ds=2008-04-09 [c] - Map 6 + Map 7 Map Operator Tree: TableScan alias: a @@ -466,77 +541,6 @@ STAGE PLANS: name: default.bucket_small_n15 Truncated Path -> Alias: /bucket_small_n15/ds=2008-04-08 [a] - Map 7 - Map Operator Tree: - TableScan - alias: d - Statistics: Num rows: 3 Data size: 1724 Basic stats: PARTIAL Column stats: COMPLETE - GatherStats: false - Select Operator - Statistics: Num rows: 3 Data size: 1724 Basic stats: PARTIAL Column stats: COMPLETE - Reduce Output Operator - null sort order: - sort order: - Statistics: Num rows: 3 Data size: 1724 Basic stats: PARTIAL Column stats: COMPLETE - tag: 1 - auto parallelism: false - Execution mode: vectorized, llap - LLAP IO: no inputs - Path -> Alias: -#### A masked pattern was here #### - Path -> Partition: -#### A masked pattern was here #### - Partition - base file name: ds=2008-04-08 - input format: org.apache.hadoop.mapred.TextInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - partition values: - ds 2008-04-08 - properties: - bucket_count 3 - bucket_field_name key - column.name.delimiter , - columns key,value - columns.comments - columns.types string:string -#### A masked pattern was here #### - name default.bucket_medium - numFiles 3 - numRows 0 - partition_columns ds - partition_columns.types string - rawDataSize 0 - serialization.ddl struct bucket_medium { string key, string value} - serialization.format 1 - serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - totalSize 170 -#### A masked pattern was here #### - serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - - input format: org.apache.hadoop.mapred.TextInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - properties: - SORTBUCKETCOLSPREFIX TRUE - bucket_count 3 - bucket_field_name key - bucketing_version 2 - column.name.delimiter , - columns key,value - columns.comments - columns.types string:string -#### A masked pattern was here #### - name default.bucket_medium - partition_columns ds - partition_columns.types string - serialization.ddl struct bucket_medium { string key, string value} - serialization.format 1 - serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe -#### A masked pattern was here #### - serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - name: default.bucket_medium - name: default.bucket_medium - Truncated Path -> Alias: - /bucket_medium/ds=2008-04-08 [d] Reducer 2 Execution mode: llap Needs Tagging: false @@ -545,28 +549,10 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 _col1 (type: string) - 1 _col0 (type: string) - Position of Big Table: 0 - Statistics: Num rows: 255 Data size: 41495 Basic stats: PARTIAL Column stats: NONE - Reduce Output Operator - null sort order: - sort order: - Statistics: Num rows: 255 Data size: 41495 Basic stats: PARTIAL Column stats: NONE - tag: 0 - auto parallelism: false - Reducer 3 - Execution mode: llap - Needs Tagging: false - Reduce Operator Tree: - Merge Join Operator - condition map: - Inner Join 0 to 1 - keys: 0 1 Position of Big Table: 0 - Statistics: Num rows: 765 Data size: 564870 Basic stats: PARTIAL Column stats: NONE + Statistics: Num rows: 381 Data size: 281327 Basic stats: PARTIAL Column stats: NONE Group By Operator aggregations: count() mode: hash @@ -579,7 +565,7 @@ STAGE PLANS: tag: -1 value expressions: _col0 (type: bigint) auto parallelism: false - Reducer 4 + Reducer 3 Execution mode: vectorized, llap Needs Tagging: false Reduce Operator Tree: @@ -610,6 +596,35 @@ STAGE PLANS: TotalFiles: 1 GatherStats: false MultiFileSpray: false + Reducer 5 + Execution mode: llap + Needs Tagging: false + Reduce Operator Tree: + Merge Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col0, _col1 + Position of Big Table: 0 + Statistics: Num rows: 255 Data size: 41495 Basic stats: PARTIAL Column stats: NONE + Select Operator + expressions: _col1 (type: string), _col0 (type: string) + outputColumnNames: _col1, _col2 + Statistics: Num rows: 255 Data size: 41495 Basic stats: PARTIAL Column stats: NONE + Filter Operator + isSamplingPred: false + predicate: (_col2 = _col1) (type: boolean) + Statistics: Num rows: 127 Data size: 20666 Basic stats: PARTIAL Column stats: NONE + Select Operator + Statistics: Num rows: 127 Data size: 20666 Basic stats: PARTIAL Column stats: NONE + Reduce Output Operator + null sort order: + sort order: + Statistics: Num rows: 127 Data size: 20666 Basic stats: PARTIAL Column stats: NONE + tag: 1 + auto parallelism: false Stage: Stage-0 Fetch Operator @@ -617,7 +632,7 @@ STAGE PLANS: Processor Tree: ListSink -Warning: Shuffle Join MERGEJOIN[60][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3]] in Stage 'Reducer 3' is a cross product +Warning: Shuffle Join MERGEJOIN[63][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product PREHOOK: query: select count(*) FROM bucket_small_n15 a JOIN bucket_medium b ON a.key = b.key JOIN bucket_big_n15 c ON c.key = b.key JOIN bucket_medium d ON c.key = b.key PREHOOK: type: QUERY PREHOOK: Input: default@bucket_big_n15 diff --git ql/src/test/results/clientpositive/llap/bucket_map_join_tez2.q.out ql/src/test/results/clientpositive/llap/bucket_map_join_tez2.q.out index 5de5a69f87..bf015e1171 100644 --- ql/src/test/results/clientpositive/llap/bucket_map_join_tez2.q.out +++ ql/src/test/results/clientpositive/llap/bucket_map_join_tez2.q.out @@ -2358,6 +2358,13 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@my_dim POSTHOOK: Input: default@my_fact #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `t0`.`bucket_col`, `t2`.`join_col` AS `account1`, `t0`.`accounting_period` +FROM (SELECT `bucket_col`, `join_col`, `accounting_period` +FROM `default`.`my_fact` +WHERE `fiscal_year` = '2015' AND `accounting_period` = 10 AND `join_col` IS NOT NULL) AS `t0` +INNER JOIN (SELECT `join_col` +FROM `default`.`my_dim` +WHERE `filter_col` IN ('VAL1', 'VAL2') AND `join_col` IS NOT NULL) AS `t2` ON `t0`.`join_col` = `t2`.`join_col` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 diff --git ql/src/test/results/clientpositive/llap/bucketpruning1.q.out ql/src/test/results/clientpositive/llap/bucketpruning1.q.out index 934b383af5..1548267a38 100644 --- ql/src/test/results/clientpositive/llap/bucketpruning1.q.out +++ ql/src/test/results/clientpositive/llap/bucketpruning1.q.out @@ -369,7 +369,7 @@ select * from srcbucket_pruned where key = 1 and ds='2008-04-08' POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST(1 AS INTEGER) AS `key`, `value`, CAST('2008-04-08' AS STRING) AS `ds` +OPTIMIZED SQL: SELECT CAST(1 AS INTEGER) AS `key`, `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds` FROM `default`.`srcbucket_pruned` WHERE `key` = 1 AND `ds` = '2008-04-08' STAGE DEPENDENCIES: @@ -438,7 +438,7 @@ select * from srcbucket_pruned where key = 1 and ds='2008-04-08' and value='One' POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST(1 AS INTEGER) AS `$f0`, CAST('One' AS STRING) AS `$f1`, CAST('2008-04-08' AS STRING) AS `$f2` +OPTIMIZED SQL: SELECT CAST(1 AS INTEGER) AS `$f0`, CAST('One' AS VARCHAR(65536)) AS `$f1`, CAST('2008-04-08' AS VARCHAR(65536)) AS `$f2` FROM `default`.`srcbucket_pruned` WHERE `key` = 1 AND `ds` = '2008-04-08' AND `value` = 'One' STAGE DEPENDENCIES: @@ -507,7 +507,7 @@ select * from srcbucket_pruned where value='One' and key = 1 and ds='2008-04-08' POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST(1 AS INTEGER) AS `$f0`, CAST('One' AS STRING) AS `$f1`, CAST('2008-04-08' AS STRING) AS `$f2` +OPTIMIZED SQL: SELECT CAST(1 AS INTEGER) AS `$f0`, CAST('One' AS VARCHAR(65536)) AS `$f1`, CAST('2008-04-08' AS VARCHAR(65536)) AS `$f2` FROM `default`.`srcbucket_pruned` WHERE `value` = 'One' AND `key` = 1 AND `ds` = '2008-04-08' STAGE DEPENDENCIES: @@ -576,6 +576,9 @@ select * from srcbucket_pruned where key in (2,3) POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, `ds` +FROM `default`.`srcbucket_pruned` +WHERE `key` IN (2, 3) STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -642,6 +645,9 @@ select * from srcbucket_pruned where key in (2,3) and ds='2008-04-08' POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds` +FROM `default`.`srcbucket_pruned` +WHERE `key` IN (2, 3) AND `ds` = '2008-04-08' STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -708,6 +714,9 @@ select * from srcbucket_pruned where key in (2,3) and ds='2008-04-08' and value= POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, CAST('One' AS VARCHAR(65536)) AS `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds` +FROM `default`.`srcbucket_pruned` +WHERE `key` IN (2, 3) AND `ds` = '2008-04-08' AND `value` = 'One' STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -774,6 +783,9 @@ select * from srcbucket_pruned where value='One' and key in (2,3) and ds='2008-0 POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, CAST('One' AS VARCHAR(65536)) AS `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds` +FROM `default`.`srcbucket_pruned` +WHERE `key` IN (2, 3) AND `value` = 'One' AND `ds` = '2008-04-08' STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -840,6 +852,9 @@ select * from srcbucket_pruned where (key=1 or key=2) and ds='2008-04-08' POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds` +FROM `default`.`srcbucket_pruned` +WHERE `key` IN (1, 2) AND `ds` = '2008-04-08' STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -906,6 +921,9 @@ select * from srcbucket_pruned where (key=1 or key=2) and value = 'One' and ds=' POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, CAST('One' AS VARCHAR(65536)) AS `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds` +FROM `default`.`srcbucket_pruned` +WHERE `key` IN (1, 2) AND `value` = 'One' AND `ds` = '2008-04-08' STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1041,6 +1059,9 @@ select * from srcbucket_pruned where key in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, `ds` +FROM `default`.`srcbucket_pruned` +WHERE `key` IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17) STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1107,6 +1128,9 @@ select * from srcbucket_pruned where key in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds` +FROM `default`.`srcbucket_pruned` +WHERE `key` IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17) AND `ds` = '2008-04-08' STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1173,6 +1197,9 @@ select * from srcbucket_pruned where key in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, CAST('One' AS VARCHAR(65536)) AS `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds` +FROM `default`.`srcbucket_pruned` +WHERE `key` IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17) AND `ds` = '2008-04-08' AND `value` = 'One' STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1239,6 +1266,9 @@ select * from srcbucket_pruned where value='One' and key in (1,2,3,4,5,6,7,8,9,1 POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, CAST('One' AS VARCHAR(65536)) AS `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds` +FROM `default`.`srcbucket_pruned` +WHERE `key` IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17) AND `value` = 'One' AND `ds` = '2008-04-08' STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1373,6 +1403,9 @@ select * from srcbucket_pruned where key = 1 and ds='2008-04-08' and (value='One POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### +OPTIMIZED SQL: SELECT CAST(1 AS INTEGER) AS `key`, `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds` +FROM `default`.`srcbucket_pruned` +WHERE `value` IN ('One', 'Two') AND `key` = 1 AND `ds` = '2008-04-08' STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1509,7 +1542,7 @@ POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### OPTIMIZED SQL: SELECT `key`, `value`, `ds` FROM `default`.`srcbucket_pruned` -WHERE NULL +WHERE FALSE STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1642,6 +1675,9 @@ select * from srcbucket_pruned where key = 1 or value = "One" or key = 2 POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_pruned #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, `ds` +FROM `default`.`srcbucket_pruned` +WHERE `key` IN (1, 2) OR `value` = 'One' STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1707,6 +1743,9 @@ select * from srcbucket_unpruned where key in (3, 5) POSTHOOK: type: QUERY POSTHOOK: Input: default@srcbucket_unpruned #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, `ds` +FROM `default`.`srcbucket_unpruned` +WHERE `key` IN (3, 5) STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 diff --git ql/src/test/results/clientpositive/llap/cbo_simple_select.q.out ql/src/test/results/clientpositive/llap/cbo_simple_select.q.out index acf91bf178..3aa929d13c 100644 --- ql/src/test/results/clientpositive/llap/cbo_simple_select.q.out +++ ql/src/test/results/clientpositive/llap/cbo_simple_select.q.out @@ -761,9 +761,9 @@ STAGE PLANS: Processor Tree: TableScan alias: cbo_t2 - filterExpr: (c_int = c_int) (type: boolean) + filterExpr: c_int is not null (type: boolean) Filter Operator - predicate: (c_int = c_int) (type: boolean) + predicate: c_int is not null (type: boolean) Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 @@ -821,9 +821,9 @@ STAGE PLANS: Processor Tree: TableScan alias: cbo_t2 - filterExpr: (c_int = c_int) (type: boolean) + filterExpr: c_int is not null (type: boolean) Filter Operator - predicate: (c_int = c_int) (type: boolean) + predicate: c_int is not null (type: boolean) Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 @@ -833,13 +833,11 @@ PREHOOK: query: -- c_int is not null EXPLAIN select * from cbo_t2 where (cbo_t2.c_int) IN (NULL) PREHOOK: type: QUERY PREHOOK: Input: default@cbo_t2 -PREHOOK: Input: default@cbo_t2@dt=2014 #### A masked pattern was here #### POSTHOOK: query: -- c_int is not null EXPLAIN select * from cbo_t2 where (cbo_t2.c_int) IN (NULL) POSTHOOK: type: QUERY POSTHOOK: Input: default@cbo_t2 -POSTHOOK: Input: default@cbo_t2@dt=2014 #### A masked pattern was here #### STAGE DEPENDENCIES: Stage-0 is a root stage @@ -851,11 +849,10 @@ STAGE PLANS: Processor Tree: TableScan alias: cbo_t2 - filterExpr: (c_int = null) (type: boolean) Filter Operator - predicate: (c_int = null) (type: boolean) + predicate: false (type: boolean) Select Operator - expressions: key (type: string), value (type: string), null (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) + expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 ListSink @@ -881,9 +878,9 @@ STAGE PLANS: Processor Tree: TableScan alias: cbo_t2 - filterExpr: ((c_int = c_int) or (c_int = (2 * c_int))) (type: boolean) + filterExpr: (c_int is not null or (c_int = (2 * c_int))) (type: boolean) Filter Operator - predicate: ((c_int = (2 * c_int)) or (c_int = c_int)) (type: boolean) + predicate: ((c_int = (2 * c_int)) or c_int is not null) (type: boolean) Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 @@ -911,9 +908,9 @@ STAGE PLANS: Processor Tree: TableScan alias: cbo_t2 - filterExpr: ((c_int = c_int) or (c_int = 0)) (type: boolean) + filterExpr: (c_int is not null or (c_int = 0)) (type: boolean) Filter Operator - predicate: ((c_int = 0) or (c_int = c_int)) (type: boolean) + predicate: ((c_int = 0) or c_int is not null) (type: boolean) Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 diff --git ql/src/test/results/clientpositive/llap/explainuser_1.q.out ql/src/test/results/clientpositive/llap/explainuser_1.q.out index 1ee459b5d6..c3b754192c 100644 --- ql/src/test/results/clientpositive/llap/explainuser_1.q.out +++ ql/src/test/results/clientpositive/llap/explainuser_1.q.out @@ -1931,7 +1931,7 @@ Stage-0 Group By Operator [GBY_3] (rows=1 width=101) Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float Filter Operator [FIL_42] (rows=1 width=93) - predicate:((((c_int + 1) + 1) >= 0) and (((c_int + 1) > 0) or (UDFToDouble(key) >= 0.0D)) and ((UDFToFloat(c_int) + c_float) >= 0) and ((c_int + 1) >= 0) and ((c_int > 0) or c_float is not null) and ((c_int >= 1) or (c_float >= 1.0)) and (UDFToDouble(key) > 0.0D) and (c_float > 0.0)) + predicate:((((c_int + 1) + 1) >= 0) and ((UDFToFloat(c_int) + c_float) >= 0) and ((c_int + 1) >= 0) and ((c_int > 0) or c_float is not null) and ((c_int >= 1) or (c_float >= 1.0)) and (UDFToDouble(key) > 0.0D) and (c_float > 0.0)) TableScan [TS_0] (rows=20 width=88) default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] <-Reducer 8 [SIMPLE_EDGE] llap @@ -2625,7 +2625,7 @@ Stage-0 Select Operator [SEL_24] (rows=631 width=178) Output:["_col0","_col1"] Filter Operator [FIL_23] (rows=631 width=194) - predicate:((_col2 = 0L) or (_col5 is null and _col0 is not null and (_col3 >= _col2))) + predicate:(((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col0 is null) and (_col0 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) Select Operator [SEL_22] (rows=631 width=194) Output:["_col0","_col1","_col2","_col3","_col5"] Merge Join Operator [MERGEJOIN_37] (rows=631 width=194) @@ -2703,10 +2703,10 @@ Stage-0 Stage-1 Reducer 3 llap File Output Operator [FS_24] - Select Operator [SEL_23] (rows=19 width=223) + Select Operator [SEL_23] (rows=38 width=223) Output:["_col0","_col1","_col2"] - Filter Operator [FIL_22] (rows=19 width=234) - predicate:CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END + Filter Operator [FIL_22] (rows=38 width=234) + predicate:(((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col0 is null) and (_col0 is not null or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) Merge Join Operator [MERGEJOIN_45] (rows=38 width=234) Conds:RS_19._col0, _col1=RS_20._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col8"] <-Reducer 2 [SIMPLE_EDGE] llap @@ -2795,7 +2795,7 @@ Stage-0 Select Operator [SEL_29] (rows=27 width=125) Output:["_col0","_col1"] Filter Operator [FIL_28] (rows=27 width=141) - predicate:((_col2 = 0L) or (_col5 is null and _col1 is not null and (_col3 >= _col2))) + predicate:(((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col1 is null) and (_col1 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) Select Operator [SEL_27] (rows=27 width=141) Output:["_col0","_col1","_col2","_col3","_col5"] Merge Join Operator [MERGEJOIN_38] (rows=27 width=141) @@ -2875,14 +2875,14 @@ Stage-0 Stage-1 Reducer 5 llap File Output Operator [FS_36] - Select Operator [SEL_35] (rows=3 width=106) + Select Operator [SEL_35] (rows=7 width=106) Output:["_col0","_col1"] <-Reducer 4 [SIMPLE_EDGE] llap SHUFFLE [RS_34] - Select Operator [SEL_33] (rows=3 width=106) + Select Operator [SEL_33] (rows=7 width=106) Output:["_col0","_col1"] - Filter Operator [FIL_32] (rows=3 width=118) - predicate:CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END + Filter Operator [FIL_32] (rows=7 width=114) + predicate:(((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col0 is null) and (_col0 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) Merge Join Operator [MERGEJOIN_48] (rows=7 width=114) Conds:RS_29._col0, _col1=RS_30._col0, _col1(Left Outer),Output:["_col0","_col1","_col3","_col4","_col7"] <-Reducer 3 [SIMPLE_EDGE] llap diff --git ql/src/test/results/clientpositive/llap/join_constraints_optimization.q.out ql/src/test/results/clientpositive/llap/join_constraints_optimization.q.out index 1098bb41f3..087db3c842 100644 --- ql/src/test/results/clientpositive/llap/join_constraints_optimization.q.out +++ ql/src/test/results/clientpositive/llap/join_constraints_optimization.q.out @@ -694,28 +694,27 @@ STAGE PLANS: Tez #### A masked pattern was here #### Edges: - Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 4 (SIMPLE_EDGE) - Reducer 3 <- Map 5 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE) + Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) #### A masked pattern was here #### Vertices: Map 1 Map Operator Tree: TableScan alias: lineorder_removal_n0 - Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: lo_linenumber (type: int), lo_custkey (type: bigint), lo_orderdate (type: bigint) - outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE + expressions: lo_linenumber (type: int), lo_orderdate (type: bigint) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: _col2 (type: bigint) + key expressions: _col1 (type: bigint) sort order: + - Map-reduce partition columns: _col2 (type: bigint) - Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: int), _col1 (type: bigint) + Map-reduce partition columns: _col1 (type: bigint) + Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int) Execution mode: vectorized, llap LLAP IO: no inputs - Map 4 + Map 3 Map Operator Tree: TableScan alias: dates_removal_n0 @@ -731,22 +730,6 @@ STAGE PLANS: Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE Execution mode: vectorized, llap LLAP IO: no inputs - Map 5 - Map Operator Tree: - TableScan - alias: customer_removal_n0 - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: c_custkey (type: bigint) - outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: bigint) - sort order: + - Map-reduce partition columns: _col0 (type: bigint) - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE - Execution mode: vectorized, llap - LLAP IO: no inputs Reducer 2 Execution mode: llap Reduce Operator Tree: @@ -754,30 +737,13 @@ STAGE PLANS: condition map: Left Outer Join 0 to 1 keys: - 0 _col2 (type: bigint) - 1 _col0 (type: bigint) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col1 (type: bigint) - sort order: + - Map-reduce partition columns: _col1 (type: bigint) - Statistics: Num rows: 1 Data size: 22 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: int) - Reducer 3 - Execution mode: llap - Reduce Operator Tree: - Merge Join Operator - condition map: - Left Outer Join 0 to 1 - keys: 0 _col1 (type: bigint) 1 _col0 (type: bigint) outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 13 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git ql/src/test/results/clientpositive/llap/kryo.q.out ql/src/test/results/clientpositive/llap/kryo.q.out index 5d556f46c0..fbefbfdd22 100644 --- ql/src/test/results/clientpositive/llap/kryo.q.out +++ ql/src/test/results/clientpositive/llap/kryo.q.out @@ -49,24 +49,24 @@ STAGE PLANS: TableScan alias: datetime_ filterExpr: (id) IN (1, 2, 3, 4, 5, 6) (type: boolean) - Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (id) IN (1, 2, 3, 4, 5, 6) (type: boolean) - Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: if((id) IN (1, 2), if((id = 1), date_, date_), if((id = 3), CASE WHEN ((date_ is null or to_date(CAST( datetime AS TIMESTAMP)) is null)) THEN (null) WHEN ((CAST( date_ AS DATE) > to_date(CAST( datetime AS TIMESTAMP)))) THEN (date_) ELSE (CAST( to_date(CAST( datetime AS TIMESTAMP)) AS STRING)) END, null)) (type: string), id (type: int), CASE WHEN ((id = 6)) THEN (CASE WHEN ((concat(date_, ' 00:00:00') is null or datetime is null)) THEN (null) WHEN ((concat(date_, ' 00:00:00') > datetime)) THEN (concat(date_, ' 00:00:00')) ELSE (datetime) END) WHEN ((id = 5)) THEN (CASE WHEN ((date_ is null or datetime is null)) THEN (null) WHEN ((date_ > datetime)) THEN (date_) ELSE (datetime) END) WHEN ((id = 3)) THEN (concat(date_, ' 00:00:00')) WHEN ((id = 4)) THEN (concat(date_, ' 00:00:00')) WHEN ((id = 1)) THEN (date_) WHEN ((id = 2)) THEN (date_) ELSE (null) END (type: string) + expressions: if((id) IN (1, 2), if((id = 1), CASE WHEN (true) THEN (date_) WHEN (false) THEN (CAST( to_date(CAST( datetime AS TIMESTAMP)) AS STRING)) ELSE (null) END, CASE WHEN (true) THEN (date_) WHEN (false) THEN (CAST( to_date(CAST( datetime AS TIMESTAMP)) AS STRING)) ELSE (CAST( to_date(CAST( time AS TIMESTAMP)) AS STRING)) END), if((id = 3), CASE WHEN ((date_ is null or to_date(CAST( datetime AS TIMESTAMP)) is null)) THEN (null) WHEN ((CAST( date_ AS DATE) > to_date(CAST( datetime AS TIMESTAMP)))) THEN (date_) ELSE (CAST( to_date(CAST( datetime AS TIMESTAMP)) AS STRING)) END, null)) (type: string), id (type: int), CASE WHEN ((id = 6)) THEN (CASE WHEN ((concat(date_, ' 00:00:00') is null or datetime is null)) THEN (null) WHEN ((concat(date_, ' 00:00:00') > datetime)) THEN (concat(date_, ' 00:00:00')) ELSE (datetime) END) WHEN ((id = 5)) THEN (CASE WHEN ((date_ is null or datetime is null)) THEN (null) WHEN ((date_ > datetime)) THEN (date_) ELSE (datetime) END) WHEN ((id) IN (3, 4)) THEN (concat(date_, ' 00:00:00')) WHEN ((id) IN (1, 2)) THEN (date_) ELSE (null) END (type: string) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE Group By Operator keys: _col0 (type: string), _col1 (type: int), _col2 (type: string) mode: hash outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: int), _col2 (type: string) sort order: +++ Map-reduce partition columns: _col0 (type: string), _col1 (type: int), _col2 (type: string) - Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE Execution mode: vectorized, llap LLAP IO: all inputs Reducer 2 @@ -76,10 +76,10 @@ STAGE PLANS: keys: KEY._col0 (type: string), KEY._col1 (type: int), KEY._col2 (type: string) mode: mergepartial outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 372 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 556 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git ql/src/test/results/clientpositive/llap/lineage3.q.out ql/src/test/results/clientpositive/llap/lineage3.q.out index 11e6904a12..121f1e7fc3 100644 --- ql/src/test/results/clientpositive/llap/lineage3.q.out +++ ql/src/test/results/clientpositive/llap/lineage3.q.out @@ -135,7 +135,7 @@ and x.ctinyint + length(c.cstring2) < 1000 PREHOOK: type: QUERY PREHOOK: Input: default@alltypesorc #### A masked pattern was here #### -{"version":"1.0","engine":"tez","database":"default","hash":"15e00f9e88c1ad6b2f53a33a0c147f0e","queryText":"select x.ctinyint, x.cint, c.cbigint-100, c.cstring1\nfrom alltypesorc c\njoin (\n select a.ctinyint ctinyint, b.cint cint\n from (select * from alltypesorc a where cboolean1=false) a\n join alltypesorc b on (a.cint = b.cbigint - 224870380)\n ) x on (x.cint = c.cint)\nwhere x.ctinyint > 10\nand x.cint < 4.5\nand x.ctinyint + length(c.cstring2) < 1000","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"expression":"(c.cbigint - 100L)","edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[5],"targets":[0,1,2,3],"expression":"(CAST( c.cint AS decimal(11,1)) < 4.5)","edgeType":"PREDICATE"},{"sources":[5],"targets":[0,1,2,3],"expression":"(c.cint = b.cint)","edgeType":"PREDICATE"},{"sources":[5,6],"targets":[0,1,2,3],"expression":"((CAST( b.cint AS decimal(11,1)) < 4.5) and b.cbigint is not null)","edgeType":"PREDICATE"},{"sources":[6,5],"targets":[0,1,2,3],"expression":"((b.cbigint - 224870380) = UDFToLong(a.cint))","edgeType":"PREDICATE"},{"sources":[8,4,5],"targets":[0,1,2,3],"expression":"((a.cboolean1 = false) and (a.ctinyint > 10Y) and a.cint is not null)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"x.ctinyint"},{"id":1,"vertexType":"COLUMN","vertexId":"x.cint"},{"id":2,"vertexType":"COLUMN","vertexId":"_c2"},{"id":3,"vertexType":"COLUMN","vertexId":"c.cstring1"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"},{"id":6,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cbigint"},{"id":7,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring1"},{"id":8,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cboolean1"}]} +{"version":"1.0","engine":"tez","database":"default","hash":"15e00f9e88c1ad6b2f53a33a0c147f0e","queryText":"select x.ctinyint, x.cint, c.cbigint-100, c.cstring1\nfrom alltypesorc c\njoin (\n select a.ctinyint ctinyint, b.cint cint\n from (select * from alltypesorc a where cboolean1=false) a\n join alltypesorc b on (a.cint = b.cbigint - 224870380)\n ) x on (x.cint = c.cint)\nwhere x.ctinyint > 10\nand x.cint < 4.5\nand x.ctinyint + length(c.cstring2) < 1000","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"expression":"(c.cbigint - 100L)","edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[5],"targets":[0,1,2,3],"expression":"(CAST( c.cint AS decimal(11,1)) < 4.5)","edgeType":"PREDICATE"},{"sources":[5],"targets":[0,1,2,3],"expression":"(c.cint = b.cint)","edgeType":"PREDICATE"},{"sources":[5,6],"targets":[0,1,2,3],"expression":"((CAST( b.cint AS decimal(11,1)) < 4.5) and b.cbigint is not null)","edgeType":"PREDICATE"},{"sources":[6,5],"targets":[0,1,2,3],"expression":"((b.cbigint - 224870380L) = UDFToLong(a.cint))","edgeType":"PREDICATE"},{"sources":[8,4,5],"targets":[0,1,2,3],"expression":"((a.cboolean1 = false) and (a.ctinyint > 10Y) and a.cint is not null)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"x.ctinyint"},{"id":1,"vertexType":"COLUMN","vertexId":"x.cint"},{"id":2,"vertexType":"COLUMN","vertexId":"_c2"},{"id":3,"vertexType":"COLUMN","vertexId":"c.cstring1"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"},{"id":6,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cbigint"},{"id":7,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring1"},{"id":8,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cboolean1"}]} 11 -654374827 857266369 OEfPnHnIYueoup PREHOOK: query: select c1, x2, x3 from ( @@ -186,7 +186,7 @@ where key not in (select key+18 from src1) order by key PREHOOK: type: QUERY PREHOOK: Input: default@src1 #### A masked pattern was here #### -{"version":"1.0","engine":"tez","database":"default","hash":"cbc4367150807328dda0f1cf4c74b811","queryText":"select key, value from src1\nwhere key not in (select key+18 from src1) order by key","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[2],"targets":[0,1],"expression":"(UDFToDouble(src1.key) = (UDFToDouble(src1.key) + 18.0D))","edgeType":"PREDICATE"},{"sources":[4,2],"targets":[0,1],"expression":"((count(*) = 0L) or (true is null and src1.key is not null and (count((UDFToDouble(src1.key) + 18.0D)) >= count(*))))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"key"},{"id":1,"vertexType":"COLUMN","vertexId":"value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":3,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":4,"vertexType":"TABLE","vertexId":"default.src1"}]} +{"version":"1.0","engine":"tez","database":"default","hash":"cbc4367150807328dda0f1cf4c74b811","queryText":"select key, value from src1\nwhere key not in (select key+18 from src1) order by key","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[2],"targets":[0,1],"expression":"(UDFToDouble(src1.key) = (UDFToDouble(src1.key) + 18.0D))","edgeType":"PREDICATE"},{"sources":[4,2],"targets":[0,1],"expression":"((true is null or (count(*) = 0L)) and (src1.key is not null or (count(*) = 0L) or true is not null) and ((count((UDFToDouble(src1.key) + 18.0D)) >= count(*)) or (count(*) = 0L) or true is not null or src1.key is null))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"key"},{"id":1,"vertexType":"COLUMN","vertexId":"value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":3,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":4,"vertexType":"TABLE","vertexId":"default.src1"}]} PREHOOK: query: select * from src1 a where not exists (select cint from alltypesorc b diff --git ql/src/test/results/clientpositive/llap/mapjoin_hint.q.out ql/src/test/results/clientpositive/llap/mapjoin_hint.q.out index 90e1bf7fa1..1f1cb9bb98 100644 --- ql/src/test/results/clientpositive/llap/mapjoin_hint.q.out +++ ql/src/test/results/clientpositive/llap/mapjoin_hint.q.out @@ -446,8 +446,8 @@ POSTHOOK: Lineage: part_null_n1.p_partkey SCRIPT [] POSTHOOK: Lineage: part_null_n1.p_retailprice SCRIPT [] POSTHOOK: Lineage: part_null_n1.p_size SCRIPT [] POSTHOOK: Lineage: part_null_n1.p_type SCRIPT [] -Warning: Shuffle Join MERGEJOIN[26][tables = [$hdt$_1, $hdt$_2]] in Stage 'Reducer 3' is a cross product -Warning: Shuffle Join MERGEJOIN[27][tables = [$hdt$_1, $hdt$_2, $hdt$_0]] in Stage 'Reducer 4' is a cross product +Warning: Shuffle Join MERGEJOIN[25][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product +Warning: Shuffle Join MERGEJOIN[26][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Reducer 3' is a cross product PREHOOK: query: explain select /*+ mapjoin(None)*/ * from part where p_name = (select p_name from part_null_n1 where p_name is null) PREHOOK: type: QUERY PREHOOK: Input: default@part @@ -467,72 +467,54 @@ STAGE PLANS: Tez #### A masked pattern was here #### Edges: - Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE) - Reducer 3 <- Map 1 (XPROD_EDGE), Reducer 2 (XPROD_EDGE) - Reducer 4 <- Map 5 (XPROD_EDGE), Reducer 3 (XPROD_EDGE) + Reducer 2 <- Map 1 (XPROD_EDGE), Reducer 5 (XPROD_EDGE) + Reducer 3 <- Map 4 (XPROD_EDGE), Reducer 2 (XPROD_EDGE) + Reducer 5 <- Map 4 (CUSTOM_SIMPLE_EDGE) #### A masked pattern was here #### Vertices: Map 1 Map Operator Tree: TableScan - alias: part_null_n1 - filterExpr: p_name is null (type: boolean) - Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: NONE + alias: part + Statistics: Num rows: 26 Data size: 16094 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: p_name is null (type: boolean) - Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: NONE + predicate: false (type: boolean) + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: NONE - Group By Operator - aggregations: count() - mode: hash - outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - sort order: - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: bigint) + expressions: p_partkey (type: int), p_name (type: string), p_mfgr (type: string), p_brand (type: string), p_type (type: string), p_size (type: int), p_container (type: string), p_retailprice (type: double), p_comment (type: string) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator sort order: - Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) Execution mode: vectorized, llap LLAP IO: no inputs - Map 5 + Map 4 Map Operator Tree: TableScan - alias: part - filterExpr: (p_name = null) (type: boolean) - Statistics: Num rows: 26 Data size: 16094 Basic stats: COMPLETE Column stats: COMPLETE - Filter Operator - predicate: (p_name = null) (type: boolean) - Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE - Select Operator - expressions: p_partkey (type: int), p_mfgr (type: string), p_brand (type: string), p_type (type: string), p_size (type: int), p_container (type: string), p_retailprice (type: double), p_comment (type: string) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 - Statistics: Num rows: 1 Data size: 498 Basic stats: COMPLETE Column stats: COMPLETE + alias: part_null_n1 + Statistics: Num rows: 1 Data size: 32560 Basic stats: COMPLETE Column stats: COMPLETE + Select Operator + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE + Filter Operator + predicate: false (type: boolean) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE + Group By Operator + aggregations: count(0) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col0 (type: bigint) Reduce Output Operator sort order: - Statistics: Num rows: 1 Data size: 498 Basic stats: COMPLETE Column stats: COMPLETE - value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), _col5 (type: string), _col6 (type: double), _col7 (type: string) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE Execution mode: vectorized, llap LLAP IO: no inputs Reducer 2 - Execution mode: vectorized, llap - Reduce Operator Tree: - Group By Operator - aggregations: count(VALUE._col0) - mode: mergepartial - outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: (sq_count_check(_col0) <= 1) (type: boolean) - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - Select Operator - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - sort order: - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - Reducer 3 Execution mode: llap Reduce Operator Tree: Merge Join Operator @@ -541,11 +523,13 @@ STAGE PLANS: keys: 0 1 - Statistics: Num rows: 1 Data size: 377 Basic stats: COMPLETE Column stats: NONE + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator sort order: - Statistics: Num rows: 1 Data size: 377 Basic stats: COMPLETE Column stats: NONE - Reducer 4 + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) + Reducer 3 Execution mode: llap Reduce Operator Tree: Merge Join Operator @@ -554,19 +538,28 @@ STAGE PLANS: keys: 0 1 - outputColumnNames: _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9 - Statistics: Num rows: 1 Data size: 876 Basic stats: COMPLETE Column stats: NONE + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + Reducer 5 + Execution mode: vectorized, llap + Reduce Operator Tree: + Group By Operator + aggregations: count(VALUE._col0) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: _col2 (type: int), null (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: int), _col7 (type: string), _col8 (type: double), _col9 (type: string) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 1 Data size: 876 Basic stats: COMPLETE Column stats: NONE - File Output Operator - compressed: false - Statistics: Num rows: 1 Data size: 876 Basic stats: COMPLETE Column stats: NONE - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Stage: Stage-0 Fetch Operator @@ -574,8 +567,8 @@ STAGE PLANS: Processor Tree: ListSink -Warning: Map Join MAPJOIN[26][bigTable=?] in task 'Reducer 2' is a cross product -Warning: Map Join MAPJOIN[27][bigTable=?] in task 'Map 4' is a cross product +Warning: Map Join MAPJOIN[26][bigTable=?] in task 'Map 1' is a cross product +Warning: Map Join MAPJOIN[25][bigTable=?] in task 'Map 1' is a cross product PREHOOK: query: explain select * from part where p_name = (select p_name from part_null_n1 where p_name is null) PREHOOK: type: QUERY PREHOOK: Input: default@part @@ -595,109 +588,88 @@ STAGE PLANS: Tez #### A masked pattern was here #### Edges: - Map 4 <- Reducer 2 (BROADCAST_EDGE) - Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE), Map 3 (BROADCAST_EDGE) + Map 1 <- Map 2 (BROADCAST_EDGE), Reducer 3 (BROADCAST_EDGE) + Reducer 3 <- Map 2 (CUSTOM_SIMPLE_EDGE) #### A masked pattern was here #### Vertices: Map 1 Map Operator Tree: TableScan - alias: part_null_n1 - filterExpr: p_name is null (type: boolean) - Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: p_name is null (type: boolean) - Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: NONE - Select Operator - Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: NONE - Group By Operator - aggregations: count() - mode: hash - outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - sort order: - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: bigint) - Execution mode: vectorized, llap - LLAP IO: no inputs - Map 3 - Map Operator Tree: - TableScan - alias: part_null_n1 - filterExpr: p_name is null (type: boolean) - Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: p_name is null (type: boolean) - Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: NONE - Select Operator - Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - sort order: - Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: NONE - Execution mode: vectorized, llap - LLAP IO: no inputs - Map 4 - Map Operator Tree: - TableScan alias: part - filterExpr: (p_name = null) (type: boolean) Statistics: Num rows: 26 Data size: 16094 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (p_name = null) (type: boolean) + predicate: false (type: boolean) Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: p_partkey (type: int), p_mfgr (type: string), p_brand (type: string), p_type (type: string), p_size (type: int), p_container (type: string), p_retailprice (type: double), p_comment (type: string) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 - Statistics: Num rows: 1 Data size: 498 Basic stats: COMPLETE Column stats: COMPLETE + expressions: p_partkey (type: int), p_name (type: string), p_mfgr (type: string), p_brand (type: string), p_type (type: string), p_size (type: int), p_container (type: string), p_retailprice (type: double), p_comment (type: string) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE Map Join Operator condition map: Inner Join 0 to 1 keys: 0 1 - outputColumnNames: _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9 + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 input vertices: - 0 Reducer 2 - Statistics: Num rows: 1 Data size: 876 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: _col2 (type: int), null (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: int), _col7 (type: string), _col8 (type: double), _col9 (type: string) + 1 Reducer 3 + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 + 1 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 1 Data size: 876 Basic stats: COMPLETE Column stats: NONE + input vertices: + 1 Map 2 + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 876 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe Execution mode: vectorized, llap LLAP IO: no inputs - Reducer 2 + Map 2 + Map Operator Tree: + TableScan + alias: part_null_n1 + Statistics: Num rows: 1 Data size: 32560 Basic stats: COMPLETE Column stats: COMPLETE + Select Operator + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE + Filter Operator + predicate: false (type: boolean) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE + Group By Operator + aggregations: count(0) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col0 (type: bigint) + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE + Execution mode: vectorized, llap + LLAP IO: no inputs + Reducer 3 Execution mode: vectorized, llap Reduce Operator Tree: Group By Operator aggregations: count(VALUE._col0) mode: mergepartial outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: (sq_count_check(_col0) <= 1) (type: boolean) - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - Select Operator - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - Map Join Operator - condition map: - Inner Join 0 to 1 - keys: - 0 - 1 - input vertices: - 1 Map 3 - Statistics: Num rows: 1 Data size: 377 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - sort order: - Statistics: Num rows: 1 Data size: 377 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + Select Operator + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Stage: Stage-0 Fetch Operator diff --git ql/src/test/results/clientpositive/llap/mergejoin.q.out ql/src/test/results/clientpositive/llap/mergejoin.q.out index 072679d32e..e6d4432242 100644 --- ql/src/test/results/clientpositive/llap/mergejoin.q.out +++ ql/src/test/results/clientpositive/llap/mergejoin.q.out @@ -4037,8 +4037,7 @@ POSTHOOK: Input: default@tab_part_n10@ds=2008-04-08 #### A masked pattern was here #### NULL NULL NULL 98 val_98 2008-04-08 NULL NULL NULL 98 val_98 2008-04-08 -Warning: Shuffle Join MERGEJOIN[20][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product -Warning: Shuffle Join MERGEJOIN[21][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Reducer 3' is a cross product +Warning: Shuffle Join MERGEJOIN[23][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product PREHOOK: query: select * from (select * from tab_n9 where tab_n9.key = 0)a full outer join @@ -4607,8 +4606,7 @@ NULL NULL NULL NULL NULL NULL 97 val_97 2008-04-08 NULL NULL NULL NULL NULL NULL 97 val_97 2008-04-08 NULL NULL NULL NULL NULL NULL 98 val_98 2008-04-08 NULL NULL NULL NULL NULL NULL 98 val_98 2008-04-08 -Warning: Shuffle Join MERGEJOIN[19][tables = [$hdt$_1, $hdt$_2]] in Stage 'Reducer 4' is a cross product -Warning: Shuffle Join MERGEJOIN[20][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product +Warning: Shuffle Join MERGEJOIN[18][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product PREHOOK: query: select * from (select * from tab_n9 where tab_n9.key = 0)a join diff --git ql/src/test/results/clientpositive/llap/ppd_union_view.q.out ql/src/test/results/clientpositive/llap/ppd_union_view.q.out index cba24342f8..c294e83a31 100644 --- ql/src/test/results/clientpositive/llap/ppd_union_view.q.out +++ ql/src/test/results/clientpositive/llap/ppd_union_view.q.out @@ -150,7 +150,7 @@ POSTHOOK: Input: default@t1_new_n0 POSTHOOK: Input: default@t1_old POSTHOOK: Input: default@t1_old@ds=2011-10-13 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `key`, `value`, CAST('2011-10-13' AS STRING) AS `ds` +OPTIMIZED SQL: SELECT `key`, `value`, CAST('2011-10-13' AS VARCHAR(65536)) AS `ds` FROM (SELECT `key`, `value` FROM `default`.`t1_new_n0` WHERE `ds` = '2011-10-13' @@ -492,7 +492,7 @@ POSTHOOK: Input: default@t1_new_n0 POSTHOOK: Input: default@t1_new_n0@ds=2011-10-15 POSTHOOK: Input: default@t1_old #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `key`, `value`, CAST('2011-10-15' AS STRING) AS `ds` +OPTIMIZED SQL: SELECT `key`, `value`, CAST('2011-10-15' AS VARCHAR(65536)) AS `ds` FROM (SELECT `key`, `value` FROM `default`.`t1_new_n0` WHERE `ds` = '2011-10-15' diff --git ql/src/test/results/clientpositive/llap/results_cache_2.q.out ql/src/test/results/clientpositive/llap/results_cache_2.q.out index a042a68e74..442a43ae37 100644 --- ql/src/test/results/clientpositive/llap/results_cache_2.q.out +++ ql/src/test/results/clientpositive/llap/results_cache_2.q.out @@ -156,15 +156,15 @@ STAGE PLANS: Statistics: Num rows: 166 Data size: 14442 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: count() - keys: true (type: boolean) + keys: TIMESTAMP'2012-01-01 01:02:03' (type: timestamp) mode: hash outputColumnNames: _col0, _col1 - Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 1 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator - key expressions: _col0 (type: boolean) + key expressions: _col0 (type: timestamp) sort order: + - Map-reduce partition columns: _col0 (type: boolean) - Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + Map-reduce partition columns: _col0 (type: timestamp) + Statistics: Num rows: 1 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col1 (type: bigint) Execution mode: vectorized, llap LLAP IO: no inputs @@ -173,21 +173,17 @@ STAGE PLANS: Reduce Operator Tree: Group By Operator aggregations: count(VALUE._col0) - keys: KEY._col0 (type: boolean) + keys: KEY._col0 (type: timestamp) mode: mergepartial outputColumnNames: _col0, _col1 - Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE - Select Operator - expressions: TIMESTAMP'2012-01-01 01:02:03' (type: timestamp), _col1 (type: bigint) - outputColumnNames: _col0, _col1 + Statistics: Num rows: 1 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE + File Output Operator + compressed: false Statistics: Num rows: 1 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE - File Output Operator - compressed: false - Statistics: Num rows: 1 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe Stage: Stage-0 Fetch Operator diff --git ql/src/test/results/clientpositive/llap/semijoin6.q.out ql/src/test/results/clientpositive/llap/semijoin6.q.out index 139471970a..6f7262c4cc 100644 --- ql/src/test/results/clientpositive/llap/semijoin6.q.out +++ ql/src/test/results/clientpositive/llap/semijoin6.q.out @@ -759,7 +759,7 @@ STAGE PLANS: 0 _col0 (type: int) 1 _col0 (type: int) outputColumnNames: _col0, _col1, _col3 - residual filter predicates: {((_col0 + _col3) > 400)} {(CASE WHEN ((_col0 > 3)) THEN (true) WHEN ((_col3 > 1900)) THEN (true) ELSE (false) END or ((COALESCE(_col0) + COALESCE(_col3)) > 1900))} + residual filter predicates: {((_col0 + _col3) > 400)} {(((_col0 > 3) or (_col3 > 1900)) is true or ((COALESCE(_col0) + COALESCE(_col3)) > 1900))} Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int), _col1 (type: int) diff --git ql/src/test/results/clientpositive/llap/subquery_in.q.out ql/src/test/results/clientpositive/llap/subquery_in.q.out index b9b489f24b..33bbb15765 100644 --- ql/src/test/results/clientpositive/llap/subquery_in.q.out +++ ql/src/test/results/clientpositive/llap/subquery_in.q.out @@ -2128,9 +2128,7 @@ STAGE PLANS: Tez #### A masked pattern was here #### Edges: - Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE) - Reducer 4 <- Map 3 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE) - Reducer 6 <- Map 5 (SIMPLE_EDGE) + Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 3 (SIMPLE_EDGE) #### A masked pattern was here #### Vertices: Map 1 @@ -2158,42 +2156,25 @@ STAGE PLANS: Map Operator Tree: TableScan alias: p - filterExpr: (p_size is not null and p_partkey is not null and p_name is not null) (type: boolean) + filterExpr: (((p_size + 121150) = p_partkey) and p_size is not null and p_name is not null) (type: boolean) Statistics: Num rows: 26 Data size: 3354 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (p_name is not null and p_partkey is not null and p_size is not null) (type: boolean) - Statistics: Num rows: 26 Data size: 3354 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((p_size + 121150) = p_partkey) and p_name is not null and p_size is not null) (type: boolean) + Statistics: Num rows: 13 Data size: 1677 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: p_partkey (type: int), p_name (type: string), p_size (type: int) - outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 26 Data size: 3354 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - key expressions: _col2 (type: int), _col0 (type: int) - sort order: ++ - Map-reduce partition columns: _col2 (type: int), _col0 (type: int) - Statistics: Num rows: 26 Data size: 3354 Basic stats: COMPLETE Column stats: COMPLETE - value expressions: _col1 (type: string) - Execution mode: vectorized, llap - LLAP IO: no inputs - Map 5 - Map Operator Tree: - TableScan - alias: part - filterExpr: p_size is not null (type: boolean) - Statistics: Num rows: 26 Data size: 104 Basic stats: COMPLETE Column stats: COMPLETE - Filter Operator - predicate: p_size is not null (type: boolean) - Statistics: Num rows: 26 Data size: 104 Basic stats: COMPLETE Column stats: COMPLETE - Group By Operator - keys: p_size (type: int) - mode: hash - outputColumnNames: _col0 - Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - key expressions: _col0 (type: int) - sort order: + - Map-reduce partition columns: _col0 (type: int) - Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: COMPLETE + expressions: p_name (type: string), p_size (type: int) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 13 Data size: 1625 Basic stats: COMPLETE Column stats: COMPLETE + Group By Operator + keys: _col0 (type: string), _col1 (type: int) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 6 Data size: 750 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int) + Statistics: Num rows: 6 Data size: 750 Basic stats: COMPLETE Column stats: COMPLETE Execution mode: vectorized, llap LLAP IO: no inputs Reducer 2 @@ -2214,48 +2195,6 @@ STAGE PLANS: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - Reducer 4 - Execution mode: llap - Reduce Operator Tree: - Merge Join Operator - condition map: - Inner Join 0 to 1 - keys: - 0 _col2 (type: int), _col0 (type: int) - 1 _col0 (type: int), _col1 (type: int) - outputColumnNames: _col1, _col3 - Statistics: Num rows: 13 Data size: 1625 Basic stats: COMPLETE Column stats: COMPLETE - Select Operator - expressions: _col1 (type: string), _col3 (type: int) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 13 Data size: 1625 Basic stats: COMPLETE Column stats: COMPLETE - Group By Operator - keys: _col0 (type: string), _col1 (type: int) - mode: hash - outputColumnNames: _col0, _col1 - Statistics: Num rows: 6 Data size: 750 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: int) - sort order: ++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: int) - Statistics: Num rows: 6 Data size: 750 Basic stats: COMPLETE Column stats: COMPLETE - Reducer 6 - Execution mode: vectorized, llap - Reduce Operator Tree: - Group By Operator - keys: KEY._col0 (type: int) - mode: mergepartial - outputColumnNames: _col0 - Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: COMPLETE - Select Operator - expressions: _col0 (type: int), (_col0 + 121150) (type: int) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 13 Data size: 104 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - key expressions: _col0 (type: int), _col1 (type: int) - sort order: ++ - Map-reduce partition columns: _col0 (type: int), _col1 (type: int) - Statistics: Num rows: 13 Data size: 104 Basic stats: COMPLETE Column stats: COMPLETE Stage: Stage-0 Fetch Operator @@ -5023,7 +4962,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col14 Statistics: Num rows: 13 Data size: 8307 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col10 = 0L)) THEN (true) WHEN (_col10 is null) THEN (true) WHEN (_col14 is not null) THEN (false) WHEN (_col5 is null) THEN (null) WHEN ((_col11 < _col10)) THEN (false) ELSE (true) END (type: boolean) + predicate: (((_col11 < _col10) is not true or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null or _col5 is null) and (_col14 is null or ((_col10 = 0L) or _col10 is null) is true) and (_col5 is not null or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null)) (type: boolean) Statistics: Num rows: 6 Data size: 3834 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) @@ -5275,7 +5214,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col14 Statistics: Num rows: 13 Data size: 8307 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col10 = 0L)) THEN (true) WHEN (_col10 is null) THEN (true) WHEN (_col14 is not null) THEN (false) WHEN (_col5 is null) THEN (null) WHEN ((_col11 < _col10)) THEN (false) ELSE (true) END (type: boolean) + predicate: (((_col11 < _col10) is not true or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null or _col5 is null) and (_col14 is null or ((_col10 = 0L) or _col10 is null) is true) and (_col5 is not null or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null)) (type: boolean) Statistics: Num rows: 6 Data size: 3834 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) diff --git ql/src/test/results/clientpositive/llap/subquery_in_having.q.out ql/src/test/results/clientpositive/llap/subquery_in_having.q.out index 3839696882..bc5abf3237 100644 --- ql/src/test/results/clientpositive/llap/subquery_in_having.q.out +++ ql/src/test/results/clientpositive/llap/subquery_in_having.q.out @@ -1803,7 +1803,7 @@ STAGE PLANS: 1 Reducer 9 Statistics: Num rows: 1 Data size: 668 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN (_col2 is null) THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean) + predicate: (((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col2 is null) and (_col2 is not null or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) (type: boolean) Statistics: Num rows: 1 Data size: 668 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string), _col1 (type: string), _col2 (type: bigint) diff --git ql/src/test/results/clientpositive/llap/subquery_multi.q.out ql/src/test/results/clientpositive/llap/subquery_multi.q.out index b8d6230680..aad840fce5 100644 --- ql/src/test/results/clientpositive/llap/subquery_multi.q.out +++ ql/src/test/results/clientpositive/llap/subquery_multi.q.out @@ -381,7 +381,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col13 Statistics: Num rows: 1 Data size: 1355 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col10 = 0L) or (_col13 is null and _col3 is not null and (_col11 >= _col10))) (type: boolean) + predicate: (((_col11 >= _col10) or (_col10 = 0L) or _col13 is not null or _col3 is null) and (_col13 is null or (_col10 = 0L)) and (_col3 is not null or (_col10 = 0L) or _col13 is not null)) (type: boolean) Statistics: Num rows: 1 Data size: 1355 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) @@ -600,7 +600,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col13 Statistics: Num rows: 1 Data size: 1355 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col10 = 0L) or (_col13 is null and _col3 is not null and (_col11 >= _col10))) (type: boolean) + predicate: (((_col11 >= _col10) or (_col10 = 0L) or _col13 is not null or _col3 is null) and (_col13 is null or (_col10 = 0L)) and (_col3 is not null or (_col10 = 0L) or _col13 is not null)) (type: boolean) Statistics: Num rows: 1 Data size: 1355 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) @@ -848,7 +848,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col13 Statistics: Num rows: 1 Data size: 1355 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col10 = 0L) or (_col13 is null and (_col11 >= _col10))) (type: boolean) + predicate: (((_col11 >= _col10) or (_col10 = 0L) or _col13 is not null or _col3 is null) and (_col13 is null or (_col10 = 0L))) (type: boolean) Statistics: Num rows: 1 Data size: 1355 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) @@ -1070,7 +1070,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 1 Data size: 1335 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col12 is null and _col1 is not null and (_col10 >= _col9)) or (_col9 = 0L)) (type: boolean) + predicate: (((_col10 >= _col9) or (_col9 = 0L) or _col12 is not null or _col1 is null) and (_col1 is not null or (_col9 = 0L) or _col12 is not null) and (_col12 is null or (_col9 = 0L))) (type: boolean) Statistics: Num rows: 1 Data size: 1335 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) @@ -1749,12 +1749,14 @@ STAGE PLANS: #### A masked pattern was here #### Edges: Reducer 10 <- Reducer 9 (SIMPLE_EDGE) + Reducer 12 <- Map 11 (SIMPLE_EDGE), Reducer 14 (ONE_TO_ONE_EDGE) + Reducer 14 <- Map 13 (SIMPLE_EDGE) Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE) Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 8 (ONE_TO_ONE_EDGE) Reducer 4 <- Reducer 10 (ONE_TO_ONE_EDGE), Reducer 3 (SIMPLE_EDGE) - Reducer 7 <- Map 11 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE) + Reducer 7 <- Map 6 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE) Reducer 8 <- Reducer 7 (SIMPLE_EDGE) - Reducer 9 <- Map 11 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE) + Reducer 9 <- Map 6 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE) #### A masked pattern was here #### Vertices: Map 1 @@ -1788,24 +1790,36 @@ STAGE PLANS: predicate: (p_brand is not null and p_type is not null) (type: boolean) Statistics: Num rows: 26 Data size: 5096 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: p_type (type: string), p_brand (type: string) + expressions: p_brand (type: string), p_type (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 26 Data size: 5096 Basic stats: COMPLETE Column stats: COMPLETE - Group By Operator - keys: _col0 (type: string), _col1 (type: string) - mode: hash - outputColumnNames: _col0, _col1 - Statistics: Num rows: 13 Data size: 2548 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string) - sort order: ++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 13 Data size: 2548 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string) - sort order: ++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 13 Data size: 2548 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 26 Data size: 5096 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col0 (type: string) + Execution mode: vectorized, llap + LLAP IO: no inputs + Map 13 + Map Operator Tree: + TableScan + alias: part + filterExpr: p_type is not null (type: boolean) + Statistics: Num rows: 26 Data size: 2704 Basic stats: COMPLETE Column stats: COMPLETE + Filter Operator + predicate: p_type is not null (type: boolean) + Statistics: Num rows: 26 Data size: 2704 Basic stats: COMPLETE Column stats: COMPLETE + Group By Operator + keys: p_type (type: string) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 13 Data size: 1352 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 13 Data size: 1352 Basic stats: COMPLETE Column stats: COMPLETE Execution mode: vectorized, llap LLAP IO: no inputs Map 5 @@ -1874,17 +1888,60 @@ STAGE PLANS: keys: KEY._col0 (type: string), KEY._col1 (type: string) mode: mergepartial outputColumnNames: _col0, _col1 - Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 3 Data size: 588 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: string), true (type: boolean) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 7 Data size: 1400 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 3 Data size: 600 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: string) sort order: ++ Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 7 Data size: 1400 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 3 Data size: 600 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col2 (type: boolean) + Reducer 12 + Execution mode: llap + Reduce Operator Tree: + Merge Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col0, _col2 + Statistics: Num rows: 14 Data size: 2744 Basic stats: COMPLETE Column stats: COMPLETE + Select Operator + expressions: _col2 (type: string), _col0 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 14 Data size: 2744 Basic stats: COMPLETE Column stats: COMPLETE + Group By Operator + keys: _col0 (type: string), _col1 (type: string) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string) + Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string) + Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE + Reducer 14 + Execution mode: vectorized, llap + Reduce Operator Tree: + Group By Operator + keys: KEY._col0 (type: string) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 13 Data size: 1352 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 13 Data size: 1352 Basic stats: COMPLETE Column stats: COMPLETE Reducer 2 Execution mode: llap Reduce Operator Tree: @@ -1931,15 +1988,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col14 Statistics: Num rows: 16 Data size: 3891 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col10 = 0L)) THEN (true) WHEN (_col10 is null) THEN (true) WHEN (_col14 is not null) THEN (false) WHEN (_col3 is null) THEN (null) WHEN ((_col11 < _col10)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 8 Data size: 1945 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col11 < _col10) is not true or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null or _col3 is null) and (_col14 is null or ((_col10 = 0L) or _col10 is null) is true) and (_col3 is not null or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null)) (type: boolean) + Statistics: Num rows: 16 Data size: 3891 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 8 Data size: 1945 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 16 Data size: 3891 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 8 Data size: 1945 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 16 Data size: 3891 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -1954,18 +2011,18 @@ STAGE PLANS: 0 _col1 (type: string), _col0 (type: string) 1 _col0 (type: string), _col1 (type: string) outputColumnNames: _col1, _col2 - Statistics: Num rows: 14 Data size: 2744 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: count(), count(_col2) keys: _col1 (type: string) mode: hash outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 240 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 240 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col1 (type: bigint), _col2 (type: bigint) Reducer 8 Execution mode: vectorized, llap @@ -1975,12 +2032,12 @@ STAGE PLANS: keys: KEY._col0 (type: string) mode: mergepartial outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 240 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 240 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col1 (type: bigint), _col2 (type: bigint) Reducer 9 Execution mode: llap @@ -1992,17 +2049,17 @@ STAGE PLANS: 0 _col1 (type: string), _col0 (type: string) 1 _col0 (type: string), _col1 (type: string) outputColumnNames: _col1, _col2 - Statistics: Num rows: 14 Data size: 2744 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator keys: _col2 (type: string), _col1 (type: string) mode: hash outputColumnNames: _col0, _col1 - Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 3 Data size: 588 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: string) sort order: ++ Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 3 Data size: 588 Basic stats: COMPLETE Column stats: COMPLETE Stage: Stage-0 Fetch Operator @@ -2252,12 +2309,14 @@ STAGE PLANS: #### A masked pattern was here #### Edges: Reducer 10 <- Reducer 9 (SIMPLE_EDGE) + Reducer 12 <- Map 11 (SIMPLE_EDGE), Reducer 14 (ONE_TO_ONE_EDGE) + Reducer 14 <- Map 13 (SIMPLE_EDGE) Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE) Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 8 (ONE_TO_ONE_EDGE) Reducer 4 <- Reducer 10 (ONE_TO_ONE_EDGE), Reducer 3 (SIMPLE_EDGE) - Reducer 7 <- Map 11 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE) + Reducer 7 <- Map 6 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE) Reducer 8 <- Reducer 7 (SIMPLE_EDGE) - Reducer 9 <- Map 11 (SIMPLE_EDGE), Map 6 (SIMPLE_EDGE) + Reducer 9 <- Map 6 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE) #### A masked pattern was here #### Vertices: Map 1 @@ -2291,24 +2350,36 @@ STAGE PLANS: predicate: (p_brand is not null and p_type is not null) (type: boolean) Statistics: Num rows: 26 Data size: 5096 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: p_type (type: string), p_brand (type: string) + expressions: p_brand (type: string), p_type (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 26 Data size: 5096 Basic stats: COMPLETE Column stats: COMPLETE - Group By Operator - keys: _col0 (type: string), _col1 (type: string) - mode: hash - outputColumnNames: _col0, _col1 - Statistics: Num rows: 13 Data size: 2548 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string) - sort order: ++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 13 Data size: 2548 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string) - sort order: ++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 13 Data size: 2548 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 26 Data size: 5096 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col0 (type: string) + Execution mode: vectorized, llap + LLAP IO: no inputs + Map 13 + Map Operator Tree: + TableScan + alias: part + filterExpr: p_type is not null (type: boolean) + Statistics: Num rows: 26 Data size: 2704 Basic stats: COMPLETE Column stats: COMPLETE + Filter Operator + predicate: p_type is not null (type: boolean) + Statistics: Num rows: 26 Data size: 2704 Basic stats: COMPLETE Column stats: COMPLETE + Group By Operator + keys: p_type (type: string) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 13 Data size: 1352 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 13 Data size: 1352 Basic stats: COMPLETE Column stats: COMPLETE Execution mode: vectorized, llap LLAP IO: no inputs Map 5 @@ -2377,17 +2448,60 @@ STAGE PLANS: keys: KEY._col0 (type: string), KEY._col1 (type: string) mode: mergepartial outputColumnNames: _col0, _col1 - Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 3 Data size: 588 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: string), true (type: boolean) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 7 Data size: 1400 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 3 Data size: 600 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: string) sort order: ++ Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 7 Data size: 1400 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 3 Data size: 600 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col2 (type: boolean) + Reducer 12 + Execution mode: llap + Reduce Operator Tree: + Merge Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col0, _col2 + Statistics: Num rows: 14 Data size: 2744 Basic stats: COMPLETE Column stats: COMPLETE + Select Operator + expressions: _col2 (type: string), _col0 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 14 Data size: 2744 Basic stats: COMPLETE Column stats: COMPLETE + Group By Operator + keys: _col0 (type: string), _col1 (type: string) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string) + Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string) + Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE + Reducer 14 + Execution mode: vectorized, llap + Reduce Operator Tree: + Group By Operator + keys: KEY._col0 (type: string) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 13 Data size: 1352 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 13 Data size: 1352 Basic stats: COMPLETE Column stats: COMPLETE Reducer 2 Execution mode: llap Reduce Operator Tree: @@ -2434,15 +2548,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col14 Statistics: Num rows: 16 Data size: 5484 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col10 = 0L)) THEN (true) WHEN (_col10 is null) THEN (true) WHEN (_col14 is not null) THEN (false) WHEN (_col3 is null) THEN (null) WHEN ((_col11 < _col10)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 8 Data size: 2742 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col11 < _col10) is not true or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null or _col3 is null) and (_col14 is null or ((_col10 = 0L) or _col10 is null) is true) and (_col3 is not null or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null)) (type: boolean) + Statistics: Num rows: 16 Data size: 5484 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 8 Data size: 2742 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 16 Data size: 5484 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 8 Data size: 2742 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 16 Data size: 5484 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -2457,18 +2571,18 @@ STAGE PLANS: 0 _col1 (type: string), _col0 (type: string) 1 _col0 (type: string), _col1 (type: string) outputColumnNames: _col1, _col2 - Statistics: Num rows: 14 Data size: 2744 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: count(), count(_col2) keys: _col1 (type: string) mode: hash outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 240 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 240 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col1 (type: bigint), _col2 (type: bigint) Reducer 8 Execution mode: vectorized, llap @@ -2478,12 +2592,12 @@ STAGE PLANS: keys: KEY._col0 (type: string) mode: mergepartial outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 240 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 7 Data size: 840 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 240 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col1 (type: bigint), _col2 (type: bigint) Reducer 9 Execution mode: llap @@ -2495,17 +2609,17 @@ STAGE PLANS: 0 _col1 (type: string), _col0 (type: string) 1 _col0 (type: string), _col1 (type: string) outputColumnNames: _col1, _col2 - Statistics: Num rows: 14 Data size: 2744 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator keys: _col2 (type: string), _col1 (type: string) mode: hash outputColumnNames: _col0, _col1 - Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 3 Data size: 588 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: string) sort order: ++ Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 7 Data size: 1372 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 3 Data size: 588 Basic stats: COMPLETE Column stats: COMPLETE Stage: Stage-0 Fetch Operator @@ -2703,15 +2817,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col14 Statistics: Num rows: 16 Data size: 3891 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col10 = 0L)) THEN (true) WHEN (_col10 is null) THEN (true) WHEN (_col14 is not null) THEN (false) WHEN (_col3 is null) THEN (null) WHEN ((_col11 < _col10)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 8 Data size: 1945 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col11 < _col10) is not true or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null or _col3 is null) and (_col14 is null or ((_col10 = 0L) or _col10 is null) is true) and (_col3 is not null or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null)) (type: boolean) + Statistics: Num rows: 16 Data size: 3891 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 8 Data size: 1945 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 16 Data size: 3891 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 8 Data size: 1945 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 16 Data size: 3891 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -3160,7 +3274,7 @@ STAGE PLANS: outputColumnNames: _col0, _col2, _col4, _col5, _col7 Statistics: Num rows: 2 Data size: 64 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col4 = 0L) or (_col7 is null and _col2 is not null and (_col5 >= _col4))) (type: boolean) + predicate: (((_col5 >= _col4) or (_col4 = 0L) or _col7 is not null or _col2 is null) and (_col2 is not null or (_col4 = 0L) or _col7 is not null) and (_col7 is null or (_col4 = 0L))) (type: boolean) Statistics: Num rows: 2 Data size: 64 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int), 1 (type: int) @@ -4073,15 +4187,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 27 Data size: 17153 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col0 = 3) or CASE WHEN ((_col9 = 0L)) THEN (true) WHEN (_col12 is not null) THEN (false) WHEN (_col5 is null) THEN (null) WHEN ((_col10 < _col9)) THEN (null) ELSE (true) END) (type: boolean) - Statistics: Num rows: 14 Data size: 8898 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col9 <> 0L) and _col12 is null and (_col10 >= _col9) and _col5 is not null) or (_col0 = 3) or (_col9 = 0L)) (type: boolean) + Statistics: Num rows: 27 Data size: 17153 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 14 Data size: 8666 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 27 Data size: 16713 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 14 Data size: 8666 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 27 Data size: 16713 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -4293,7 +4407,7 @@ STAGE PLANS: outputColumnNames: _col1, _col2, _col4, _col5 Statistics: Num rows: 631 Data size: 65521 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col4 is not null and (_col2 <> 0L)) or _col1 is not null or _col5 is not null) (type: boolean) + predicate: (((_col2 <> 0L) and _col4 is not null) or _col1 is not null or _col5 is not null) (type: boolean) Statistics: Num rows: 631 Data size: 65521 Basic stats: COMPLETE Column stats: COMPLETE Select Operator Statistics: Num rows: 631 Data size: 65521 Basic stats: COMPLETE Column stats: COMPLETE diff --git ql/src/test/results/clientpositive/llap/subquery_notin.q.out ql/src/test/results/clientpositive/llap/subquery_notin.q.out index 007161ec5a..0dffbc8eed 100644 --- ql/src/test/results/clientpositive/llap/subquery_notin.q.out +++ ql/src/test/results/clientpositive/llap/subquery_notin.q.out @@ -115,7 +115,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col5 Statistics: Num rows: 631 Data size: 122942 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col2 = 0L) or (_col5 is null and _col0 is not null and (_col3 >= _col2))) (type: boolean) + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col0 is null) and (_col0 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) Statistics: Num rows: 631 Data size: 122942 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: string) @@ -404,15 +404,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col4, _col5, _col8 Statistics: Num rows: 38 Data size: 8914 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 19 Data size: 4457 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col0 is null) and (_col0 is not null or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) (type: boolean) + Statistics: Num rows: 38 Data size: 8914 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col1 (type: string), _col0 (type: string), _col2 (type: int) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 19 Data size: 4237 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 38 Data size: 8474 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 19 Data size: 4237 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 38 Data size: 8474 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -687,7 +687,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col5 Statistics: Num rows: 27 Data size: 3815 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col2 = 0L) or (_col5 is null and _col1 is not null and (_col3 >= _col2))) (type: boolean) + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col1 is null) and (_col1 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) Statistics: Num rows: 27 Data size: 3815 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: int) @@ -999,15 +999,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col4, _col5, _col8 Statistics: Num rows: 15 Data size: 3605 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN (_col2 is null) THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 7 Data size: 1685 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col2 is null) and (_col2 is not null or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) (type: boolean) + Statistics: Num rows: 15 Data size: 3605 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col1 (type: string), _col0 (type: string), _col2 (type: int) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 7 Data size: 1561 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 15 Data size: 3345 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 7 Data size: 1561 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 15 Data size: 3345 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -1476,7 +1476,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: ((key < '11') or ((key < '11') and CASE WHEN ((key > '104')) THEN (null) ELSE ((key < '11')) END)) (type: boolean) + filterExpr: ((key < '11') or ((key < '11') and (((key > '104') is true and null) or (key is not null and (key > '104') is not true)))) (type: boolean) properties: insideView TRUE Statistics: Num rows: 500 Data size: 43500 Basic stats: COMPLETE Column stats: COMPLETE @@ -1493,22 +1493,22 @@ STAGE PLANS: Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 166 Data size: 14442 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((key < '11') and CASE WHEN ((key > '104')) THEN (null) ELSE ((key < '11')) END) (type: boolean) - Statistics: Num rows: 83 Data size: 7221 Basic stats: COMPLETE Column stats: COMPLETE + predicate: ((((key > '104') is true and null) or (key is not null and (key > '104') is not true)) and (key < '11')) (type: boolean) + Statistics: Num rows: 166 Data size: 14442 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: CASE WHEN ((key > '104')) THEN (null) ELSE (key) END (type: string) outputColumnNames: _col0 - Statistics: Num rows: 83 Data size: 7221 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 166 Data size: 14442 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator keys: _col0 (type: string) mode: hash outputColumnNames: _col0 - Statistics: Num rows: 41 Data size: 7544 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 83 Data size: 15272 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 41 Data size: 7544 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 83 Data size: 15272 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator predicate: (key < '11') (type: boolean) Statistics: Num rows: 166 Data size: 14442 Basic stats: COMPLETE Column stats: COMPLETE @@ -1537,10 +1537,10 @@ STAGE PLANS: 0 _col0 (type: string) 1 _col0 (type: string) outputColumnNames: _col0, _col2 - Statistics: Num rows: 230 Data size: 20270 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 297 Data size: 26367 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator sort order: - Statistics: Num rows: 230 Data size: 20270 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 297 Data size: 26367 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col0 (type: string), _col2 (type: boolean) Reducer 3 Execution mode: llap @@ -1552,21 +1552,21 @@ STAGE PLANS: 0 1 outputColumnNames: _col0, _col2, _col3, _col4 - Statistics: Num rows: 230 Data size: 23950 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 297 Data size: 31119 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col3 (type: bigint), _col4 (type: bigint), _col2 (type: boolean) outputColumnNames: _col0, _col1, _col2, _col4 - Statistics: Num rows: 230 Data size: 23950 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 297 Data size: 31119 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col1 = 0L) or (_col4 is null and _col0 is not null and (_col2 >= _col1))) (type: boolean) - Statistics: Num rows: 230 Data size: 23950 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col2 >= _col1) or (_col1 = 0L) or _col4 is not null or _col0 is null) and (_col0 is not null or (_col1 = 0L) or _col4 is not null) and (_col4 is null or (_col1 = 0L))) (type: boolean) + Statistics: Num rows: 297 Data size: 31119 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string) outputColumnNames: _col0 - Statistics: Num rows: 230 Data size: 20010 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 297 Data size: 25839 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 230 Data size: 20010 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 297 Data size: 25839 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -1578,16 +1578,16 @@ STAGE PLANS: keys: KEY._col0 (type: string) mode: mergepartial outputColumnNames: _col0 - Statistics: Num rows: 41 Data size: 7544 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 83 Data size: 15272 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), true (type: boolean) outputColumnNames: _col0, _col1 - Statistics: Num rows: 41 Data size: 7708 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 83 Data size: 15604 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 41 Data size: 7708 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 83 Data size: 15604 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col1 (type: boolean) Reducer 5 Execution mode: vectorized, llap @@ -1740,15 +1740,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col14 Statistics: Num rows: 64 Data size: 40340 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col10 = 0L)) THEN (true) WHEN (_col10 is null) THEN (true) WHEN (_col14 is not null) THEN (false) WHEN (_col5 is null) THEN (null) WHEN ((_col11 < _col10)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 32 Data size: 20180 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col11 < _col10) is not true or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null or _col5 is null) and (_col14 is null or ((_col10 = 0L) or _col10 is null) is true) and (_col5 is not null or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null)) (type: boolean) + Statistics: Num rows: 64 Data size: 40340 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 32 Data size: 19808 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 64 Data size: 39616 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 32 Data size: 19808 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 64 Data size: 39616 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -1921,7 +1921,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 33 Data size: 20987 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col12 is null and _col5 is not null and (_col10 >= _col9)) or (_col9 = 0L)) (type: boolean) + predicate: (((_col10 >= _col9) or (_col9 = 0L) or _col12 is not null or _col5 is null) and (_col12 is null or (_col9 = 0L)) and (_col5 is not null or (_col9 = 0L) or _col12 is not null)) (type: boolean) Statistics: Num rows: 33 Data size: 20987 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) @@ -2136,7 +2136,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 32 Data size: 20348 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col12 is null and _col0 is not null and _col5 is not null and (_col10 >= _col9)) or (_col9 = 0L)) (type: boolean) + predicate: (((_col0 is not null and _col5 is not null) or (_col9 = 0L) or _col12 is not null) and ((_col10 >= _col9) or (_col9 = 0L) or _col12 is not null or _col0 is null or _col5 is null) and (_col12 is null or (_col9 = 0L))) (type: boolean) Statistics: Num rows: 32 Data size: 20348 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) @@ -2395,10 +2395,10 @@ STAGE PLANS: outputColumnNames: _col1, _col3, _col4, _col7 Statistics: Num rows: 48 Data size: 660 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN ((_col1 + 100) is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 24 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col1 is null) and (_col1 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 48 Data size: 660 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - Statistics: Num rows: 24 Data size: 340 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 48 Data size: 660 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: count() mode: hash @@ -2585,7 +2585,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 32 Data size: 20348 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col12 is null and _col7 is not null and (_col10 >= _col9)) or (_col9 = 0L)) (type: boolean) + predicate: (((_col10 >= _col9) or (_col9 = 0L) or _col12 is not null or _col7 is null) and (_col12 is null or (_col9 = 0L)) and (_col7 is not null or (_col9 = 0L) or _col12 is not null)) (type: boolean) Statistics: Num rows: 32 Data size: 20348 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) @@ -2694,13 +2694,10 @@ STAGE PLANS: Tez #### A masked pattern was here #### Edges: - Reducer 10 <- Map 9 (SIMPLE_EDGE) - Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 6 (ONE_TO_ONE_EDGE) - Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 8 (ONE_TO_ONE_EDGE) - Reducer 5 <- Map 4 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE) - Reducer 6 <- Reducer 5 (SIMPLE_EDGE) - Reducer 7 <- Map 4 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE) - Reducer 8 <- Reducer 7 (SIMPLE_EDGE) + Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 5 (ONE_TO_ONE_EDGE) + Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 6 (ONE_TO_ONE_EDGE) + Reducer 5 <- Map 4 (SIMPLE_EDGE) + Reducer 6 <- Map 4 (SIMPLE_EDGE) #### A masked pattern was here #### Vertices: Map 1 @@ -2724,79 +2721,46 @@ STAGE PLANS: Map Operator Tree: TableScan alias: p - filterExpr: ((p_size is not null and p_partkey is not null) or (p_size is not null and p_partkey is not null and p_name is not null)) (type: boolean) + filterExpr: ((((p_size + 121150) = p_partkey) and p_size is not null) or (((p_size + 121150) = p_partkey) and p_size is not null and p_name is not null)) (type: boolean) Statistics: Num rows: 26 Data size: 3354 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (p_partkey is not null and p_size is not null) (type: boolean) - Statistics: Num rows: 26 Data size: 3354 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((p_size + 121150) = p_partkey) and p_size is not null) (type: boolean) + Statistics: Num rows: 13 Data size: 1677 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: p_partkey (type: int), p_name (type: string), p_size (type: int) - outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 26 Data size: 3354 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - key expressions: _col2 (type: int), _col0 (type: int) - sort order: ++ - Map-reduce partition columns: _col2 (type: int), _col0 (type: int) - Statistics: Num rows: 26 Data size: 3354 Basic stats: COMPLETE Column stats: COMPLETE - value expressions: _col1 (type: string) + expressions: p_name (type: string), p_size (type: int) + outputColumnNames: p_name, p_size + Statistics: Num rows: 13 Data size: 1677 Basic stats: COMPLETE Column stats: COMPLETE + Group By Operator + aggregations: count(), count(p_name) + keys: p_size (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 6 Data size: 120 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 6 Data size: 120 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col1 (type: bigint), _col2 (type: bigint) Filter Operator - predicate: (p_name is not null and p_partkey is not null and p_size is not null) (type: boolean) - Statistics: Num rows: 26 Data size: 3354 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((p_size + 121150) = p_partkey) and p_name is not null and p_size is not null) (type: boolean) + Statistics: Num rows: 13 Data size: 1677 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: p_partkey (type: int), p_name (type: string), p_size (type: int) - outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 26 Data size: 3354 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - key expressions: _col2 (type: int), _col0 (type: int) - sort order: ++ - Map-reduce partition columns: _col2 (type: int), _col0 (type: int) - Statistics: Num rows: 26 Data size: 3354 Basic stats: COMPLETE Column stats: COMPLETE - value expressions: _col1 (type: string) - Execution mode: vectorized, llap - LLAP IO: no inputs - Map 9 - Map Operator Tree: - TableScan - alias: part - filterExpr: p_size is not null (type: boolean) - Statistics: Num rows: 26 Data size: 104 Basic stats: COMPLETE Column stats: COMPLETE - Filter Operator - predicate: p_size is not null (type: boolean) - Statistics: Num rows: 26 Data size: 104 Basic stats: COMPLETE Column stats: COMPLETE - Group By Operator - keys: p_size (type: int) - mode: hash - outputColumnNames: _col0 - Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - key expressions: _col0 (type: int) - sort order: + - Map-reduce partition columns: _col0 (type: int) - Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: COMPLETE + expressions: p_name (type: string), p_size (type: int) + outputColumnNames: p_name, p_size + Statistics: Num rows: 13 Data size: 1677 Basic stats: COMPLETE Column stats: COMPLETE + Group By Operator + keys: p_name (type: string), p_size (type: int) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 6 Data size: 750 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int) + Statistics: Num rows: 6 Data size: 750 Basic stats: COMPLETE Column stats: COMPLETE Execution mode: vectorized, llap LLAP IO: no inputs - Reducer 10 - Execution mode: vectorized, llap - Reduce Operator Tree: - Group By Operator - keys: KEY._col0 (type: int) - mode: mergepartial - outputColumnNames: _col0 - Statistics: Num rows: 13 Data size: 52 Basic stats: COMPLETE Column stats: COMPLETE - Select Operator - expressions: _col0 (type: int), (_col0 + 121150) (type: int) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 13 Data size: 104 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - key expressions: _col0 (type: int), _col1 (type: int) - sort order: ++ - Map-reduce partition columns: _col0 (type: int), _col1 (type: int) - Statistics: Num rows: 13 Data size: 104 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - key expressions: _col0 (type: int), _col1 (type: int) - sort order: ++ - Map-reduce partition columns: _col0 (type: int), _col1 (type: int) - Statistics: Num rows: 13 Data size: 104 Basic stats: COMPLETE Column stats: COMPLETE Reducer 2 Execution mode: llap Reduce Operator Tree: @@ -2826,43 +2790,20 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col14 Statistics: Num rows: 40 Data size: 25032 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col10 = 0L)) THEN (true) WHEN (_col10 is null) THEN (true) WHEN (_col14 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col11 < _col10)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 20 Data size: 12524 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col11 < _col10) is not true or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null or _col1 is null) and (_col1 is not null or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null) and (_col14 is null or ((_col10 = 0L) or _col10 is null) is true)) (type: boolean) + Statistics: Num rows: 40 Data size: 25032 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 20 Data size: 12380 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 40 Data size: 24760 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 20 Data size: 12380 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 40 Data size: 24760 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe Reducer 5 - Execution mode: llap - Reduce Operator Tree: - Merge Join Operator - condition map: - Inner Join 0 to 1 - keys: - 0 _col2 (type: int), _col0 (type: int) - 1 _col0 (type: int), _col1 (type: int) - outputColumnNames: _col1, _col3 - Statistics: Num rows: 13 Data size: 1625 Basic stats: COMPLETE Column stats: COMPLETE - Group By Operator - aggregations: count(), count(_col1) - keys: _col3 (type: int) - mode: hash - outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 6 Data size: 120 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - key expressions: _col0 (type: int) - sort order: + - Map-reduce partition columns: _col0 (type: int) - Statistics: Num rows: 6 Data size: 120 Basic stats: COMPLETE Column stats: COMPLETE - value expressions: _col1 (type: bigint), _col2 (type: bigint) - Reducer 6 Execution mode: vectorized, llap Reduce Operator Tree: Group By Operator @@ -2877,28 +2818,7 @@ STAGE PLANS: Map-reduce partition columns: _col0 (type: int) Statistics: Num rows: 6 Data size: 120 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col1 (type: bigint), _col2 (type: bigint) - Reducer 7 - Execution mode: llap - Reduce Operator Tree: - Merge Join Operator - condition map: - Inner Join 0 to 1 - keys: - 0 _col2 (type: int), _col0 (type: int) - 1 _col0 (type: int), _col1 (type: int) - outputColumnNames: _col1, _col3 - Statistics: Num rows: 13 Data size: 1625 Basic stats: COMPLETE Column stats: COMPLETE - Group By Operator - keys: _col1 (type: string), _col3 (type: int) - mode: hash - outputColumnNames: _col0, _col1 - Statistics: Num rows: 6 Data size: 750 Basic stats: COMPLETE Column stats: COMPLETE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: int) - sort order: ++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: int) - Statistics: Num rows: 6 Data size: 750 Basic stats: COMPLETE Column stats: COMPLETE - Reducer 8 + Reducer 6 Execution mode: vectorized, llap Reduce Operator Tree: Group By Operator @@ -3060,15 +2980,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col11, _col12, _col16 Statistics: Num rows: 59 Data size: 37149 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col11 = 0L)) THEN (true) WHEN (_col11 is null) THEN (true) WHEN (_col16 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col12 < _col11)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 29 Data size: 18267 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col12 < _col11) is not true or ((_col11 = 0L) or _col11 is null) is true or _col16 is not null or _col1 is null) and (_col1 is not null or ((_col11 = 0L) or _col11 is null) is true or _col16 is not null) and (_col16 is null or ((_col11 = 0L) or _col11 is null) is true)) (type: boolean) + Statistics: Num rows: 59 Data size: 37149 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 29 Data size: 17951 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 59 Data size: 36521 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 29 Data size: 17951 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 59 Data size: 36521 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -3234,15 +3154,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col4, _col5, _col8 Statistics: Num rows: 58 Data size: 13682 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 29 Data size: 6849 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col1 is null) and (_col1 is not null or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) (type: boolean) + Statistics: Num rows: 58 Data size: 13682 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string) outputColumnNames: _col0 - Statistics: Num rows: 29 Data size: 3509 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 58 Data size: 7018 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 29 Data size: 3509 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 58 Data size: 7018 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -3470,15 +3390,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col4, _col5, _col8 Statistics: Num rows: 46 Data size: 10734 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 23 Data size: 5375 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col1 is null) and (_col1 is not null or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) (type: boolean) + Statistics: Num rows: 46 Data size: 10734 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string) outputColumnNames: _col0 - Statistics: Num rows: 23 Data size: 2783 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 46 Data size: 5566 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 23 Data size: 2783 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 46 Data size: 5566 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -3723,7 +3643,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col5 Statistics: Num rows: 907 Data size: 177590 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col2 = 0L) or (_col5 is null and _col1 is not null and (_col3 >= _col2))) (type: boolean) + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col1 is null) and (_col1 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) Statistics: Num rows: 907 Data size: 177590 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string) @@ -4017,12 +3937,12 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col3, _col4, _col7 Statistics: Num rows: 1623 Data size: 309794 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 811 Data size: 154810 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col1 is null) and (_col1 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 1623 Data size: 309794 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string) outputColumnNames: _col0 - Statistics: Num rows: 811 Data size: 154810 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 1623 Data size: 309794 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: count() keys: _col0 (type: string) @@ -4277,7 +4197,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 33 Data size: 20987 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col12 is null and _col5 is not null and (_col10 >= _col9)) or (_col9 = 0L)) (type: boolean) + predicate: (((_col10 >= _col9) or (_col9 = 0L) or _col12 is not null or _col5 is null) and (_col12 is null or (_col9 = 0L)) and (_col5 is not null or (_col9 = 0L) or _col12 is not null)) (type: boolean) Statistics: Num rows: 33 Data size: 20987 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) @@ -4493,7 +4413,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 33 Data size: 20987 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col12 is null and _col5 is not null and (_col10 >= _col9)) or (_col9 = 0L)) (type: boolean) + predicate: (((_col10 >= _col9) or (_col9 = 0L) or _col12 is not null or _col5 is null) and (_col12 is null or (_col9 = 0L)) and (_col5 is not null or (_col9 = 0L) or _col12 is not null)) (type: boolean) Statistics: Num rows: 33 Data size: 20987 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) @@ -4776,7 +4696,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col5 Statistics: Num rows: 539 Data size: 104726 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col2 = 0L) or (_col5 is null and _col0 is not null and (_col3 >= _col2))) (type: boolean) + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col0 is null) and (_col0 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) Statistics: Num rows: 539 Data size: 104726 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: string) @@ -5472,10 +5392,10 @@ STAGE PLANS: outputColumnNames: _col1, _col3, _col4, _col7 Statistics: Num rows: 53 Data size: 780 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN ((_col1 + 100) is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 26 Data size: 388 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col1 is null) and (_col1 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 50 Data size: 728 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - Statistics: Num rows: 26 Data size: 388 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 50 Data size: 728 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: count() mode: hash @@ -5704,7 +5624,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col4 Statistics: Num rows: 5 Data size: 108 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col1 = 0L) or (_col4 is null and _col0 is not null and (_col2 >= _col1))) (type: boolean) + predicate: (((_col2 >= _col1) or (_col1 = 0L) or _col4 is not null or _col0 is null) and (_col0 is not null or (_col1 = 0L) or _col4 is not null) and (_col4 is null or (_col1 = 0L))) (type: boolean) Statistics: Num rows: 5 Data size: 108 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int) @@ -5880,15 +5800,15 @@ STAGE PLANS: outputColumnNames: _col0, _col3, _col4, _col7 Statistics: Num rows: 6 Data size: 80 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col0 is null) and (_col0 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 6 Data size: 80 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int) outputColumnNames: _col0 - Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 6 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -6157,7 +6077,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col3, _col4, _col7 Statistics: Num rows: 3 Data size: 84 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col1 is null) and (_col1 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int) @@ -6402,7 +6322,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col3, _col4, _col6 Statistics: Num rows: 2 Data size: 56 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col6 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col6 is not null or _col1 is null) and (_col1 is not null or ((_col3 = 0L) or _col3 is null) is true or _col6 is not null) and (_col6 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int), _col1 (type: int) @@ -6650,7 +6570,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col3, _col4, _col6 Statistics: Num rows: 3 Data size: 84 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col6 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col6 is not null or _col1 is null) and (_col1 is not null or ((_col3 = 0L) or _col3 is null) is true or _col6 is not null) and (_col6 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) Statistics: Num rows: 1 Data size: 28 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int) @@ -6841,15 +6761,15 @@ STAGE PLANS: outputColumnNames: _col0, _col3, _col4, _col7 Statistics: Num rows: 4 Data size: 88 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 2 Data size: 44 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col0 is null) and (_col0 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 4 Data size: 88 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int) outputColumnNames: _col0 - Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -7005,7 +6925,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col5 Statistics: Num rows: 3 Data size: 84 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col2 = 0L) or (_col5 is null and _col1 is not null and (_col3 >= _col2))) (type: boolean) + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col1 is null) and (_col1 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) Statistics: Num rows: 3 Data size: 84 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int) @@ -7178,7 +7098,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col4 Statistics: Num rows: 4 Data size: 88 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col1 = 0L) or (_col4 is null and _col0 is not null and (_col2 >= _col1))) (type: boolean) + predicate: (((_col2 >= _col1) or (_col1 = 0L) or _col4 is not null or _col0 is null) and (_col0 is not null or (_col1 = 0L) or _col4 is not null) and (_col4 is null or (_col1 = 0L))) (type: boolean) Statistics: Num rows: 4 Data size: 88 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int) @@ -7349,15 +7269,15 @@ STAGE PLANS: residual filter predicates: {(_col1 > _col6)} Statistics: Num rows: 1145 Data size: 236851 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 572 Data size: 118384 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col0 is null) and (_col0 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 1145 Data size: 236851 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: string) outputColumnNames: _col0, _col1 - Statistics: Num rows: 572 Data size: 101816 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 1145 Data size: 203810 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 572 Data size: 101816 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 1145 Data size: 203810 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git ql/src/test/results/clientpositive/llap/subquery_null_agg.q.out ql/src/test/results/clientpositive/llap/subquery_null_agg.q.out index 4591ff8460..f00934515e 100644 --- ql/src/test/results/clientpositive/llap/subquery_null_agg.q.out +++ ql/src/test/results/clientpositive/llap/subquery_null_agg.q.out @@ -6,8 +6,8 @@ POSTHOOK: query: CREATE TABLE table_7 (int_col INT) POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@table_7 -Warning: Shuffle Join MERGEJOIN[29][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product -Warning: Shuffle Join MERGEJOIN[30][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Reducer 3' is a cross product +Warning: Shuffle Join MERGEJOIN[24][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product +Warning: Shuffle Join MERGEJOIN[25][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Reducer 3' is a cross product PREHOOK: query: explain SELECT (t1.int_col) * (t1.int_col) AS int_col @@ -59,10 +59,9 @@ STAGE PLANS: Tez #### A masked pattern was here #### Edges: - Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE), Reducer 4 (CUSTOM_SIMPLE_EDGE) - Reducer 3 <- Reducer 2 (XPROD_EDGE), Reducer 5 (XPROD_EDGE) - Reducer 4 <- Map 1 (SIMPLE_EDGE) - Reducer 5 <- Map 1 (CUSTOM_SIMPLE_EDGE) + Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE), Map 5 (CUSTOM_SIMPLE_EDGE) + Reducer 3 <- Reducer 2 (XPROD_EDGE), Reducer 4 (XPROD_EDGE) + Reducer 4 <- Map 1 (CUSTOM_SIMPLE_EDGE) #### A masked pattern was here #### Vertices: Map 1 @@ -79,27 +78,34 @@ STAGE PLANS: predicate: false (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE Group By Operator - keys: true (type: boolean) + aggregations: count() mode: hash outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE + Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE Reduce Output Operator - key expressions: _col0 (type: boolean) - sort order: + - Map-reduce partition columns: _col0 (type: boolean) - Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE + value expressions: _col0 (type: bigint) + Execution mode: vectorized, llap + LLAP IO: no inputs + Map 5 + Map Operator Tree: + TableScan + alias: table_7 + Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE + Select Operator + Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE Filter Operator predicate: false (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE - Group By Operator - aggregations: count() - mode: hash + Select Operator + expressions: true (type: boolean) outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE + Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE Reduce Output Operator sort order: - Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE - value expressions: _col0 (type: bigint) + Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE + value expressions: _col0 (type: boolean) Execution mode: vectorized, llap LLAP IO: no inputs Reducer 2 @@ -126,14 +132,14 @@ STAGE PLANS: keys: 0 1 - outputColumnNames: _col1, _col2 + outputColumnNames: _col1, _col2, _col3 Statistics: Num rows: 1 Data size: 10 Basic stats: PARTIAL Column stats: NONE Select Operator - expressions: _col2 (type: bigint), _col1 (type: boolean) - outputColumnNames: _col1, _col2 + expressions: _col2 (type: bigint), _col3 (type: bigint), _col1 (type: boolean) + outputColumnNames: _col1, _col2, _col3 Statistics: Num rows: 1 Data size: 10 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: ((_col1 = 0L) or _col2 is null) (type: boolean) + predicate: ((_col1 = 0L) or (_col3 is null and (_col2 >= _col1))) (type: boolean) Statistics: Num rows: 1 Data size: 10 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: null (type: void) @@ -150,30 +156,18 @@ STAGE PLANS: Execution mode: vectorized, llap Reduce Operator Tree: Group By Operator - keys: KEY._col0 (type: boolean) - mode: mergepartial - outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE - Select Operator - expressions: true (type: boolean) - outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE - Reduce Output Operator - sort order: - Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE - value expressions: _col0 (type: boolean) - Reducer 5 - Execution mode: vectorized, llap - Reduce Operator Tree: - Group By Operator aggregations: count(VALUE._col0) mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE - Reduce Output Operator - sort order: + Select Operator + expressions: _col0 (type: bigint), _col0 (type: bigint) + outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE - value expressions: _col0 (type: bigint) + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE + value expressions: _col0 (type: bigint), _col1 (type: bigint) Stage: Stage-0 Fetch Operator diff --git ql/src/test/results/clientpositive/llap/subquery_scalar.q.out ql/src/test/results/clientpositive/llap/subquery_scalar.q.out index 024aa9a5d1..2fb387bd4d 100644 --- ql/src/test/results/clientpositive/llap/subquery_scalar.q.out +++ ql/src/test/results/clientpositive/llap/subquery_scalar.q.out @@ -353,8 +353,8 @@ STAGE PLANS: Processor Tree: ListSink -Warning: Shuffle Join MERGEJOIN[26][tables = [$hdt$_1, $hdt$_2]] in Stage 'Reducer 3' is a cross product -Warning: Shuffle Join MERGEJOIN[27][tables = [$hdt$_1, $hdt$_2, $hdt$_0]] in Stage 'Reducer 4' is a cross product +Warning: Shuffle Join MERGEJOIN[25][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product +Warning: Shuffle Join MERGEJOIN[26][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Reducer 3' is a cross product PREHOOK: query: explain select * from part where p_name = (select p_name from part_null_n0 where p_name is null) PREHOOK: type: QUERY PREHOOK: Input: default@part @@ -374,72 +374,54 @@ STAGE PLANS: Tez #### A masked pattern was here #### Edges: - Reducer 2 <- Map 1 (CUSTOM_SIMPLE_EDGE) - Reducer 3 <- Map 1 (XPROD_EDGE), Reducer 2 (XPROD_EDGE) - Reducer 4 <- Map 5 (XPROD_EDGE), Reducer 3 (XPROD_EDGE) + Reducer 2 <- Map 1 (XPROD_EDGE), Reducer 5 (XPROD_EDGE) + Reducer 3 <- Map 4 (XPROD_EDGE), Reducer 2 (XPROD_EDGE) + Reducer 5 <- Map 4 (CUSTOM_SIMPLE_EDGE) #### A masked pattern was here #### Vertices: Map 1 Map Operator Tree: TableScan - alias: part_null_n0 - filterExpr: p_name is null (type: boolean) - Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: NONE + alias: part + Statistics: Num rows: 26 Data size: 16094 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: p_name is null (type: boolean) - Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: NONE + predicate: false (type: boolean) + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: NONE - Group By Operator - aggregations: count() - mode: hash - outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - sort order: - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: bigint) + expressions: p_partkey (type: int), p_name (type: string), p_mfgr (type: string), p_brand (type: string), p_type (type: string), p_size (type: int), p_container (type: string), p_retailprice (type: double), p_comment (type: string) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator sort order: - Statistics: Num rows: 1 Data size: 184 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) Execution mode: vectorized, llap LLAP IO: no inputs - Map 5 + Map 4 Map Operator Tree: TableScan - alias: part - filterExpr: (p_name = null) (type: boolean) - Statistics: Num rows: 26 Data size: 16094 Basic stats: COMPLETE Column stats: COMPLETE - Filter Operator - predicate: (p_name = null) (type: boolean) - Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE - Select Operator - expressions: p_partkey (type: int), p_mfgr (type: string), p_brand (type: string), p_type (type: string), p_size (type: int), p_container (type: string), p_retailprice (type: double), p_comment (type: string) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 - Statistics: Num rows: 1 Data size: 498 Basic stats: COMPLETE Column stats: COMPLETE + alias: part_null_n0 + Statistics: Num rows: 1 Data size: 32560 Basic stats: COMPLETE Column stats: COMPLETE + Select Operator + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE + Filter Operator + predicate: false (type: boolean) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE + Group By Operator + aggregations: count(0) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col0 (type: bigint) Reduce Output Operator sort order: - Statistics: Num rows: 1 Data size: 498 Basic stats: COMPLETE Column stats: COMPLETE - value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), _col5 (type: string), _col6 (type: double), _col7 (type: string) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE Execution mode: vectorized, llap LLAP IO: no inputs Reducer 2 - Execution mode: vectorized, llap - Reduce Operator Tree: - Group By Operator - aggregations: count(VALUE._col0) - mode: mergepartial - outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: (sq_count_check(_col0) <= 1) (type: boolean) - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - Select Operator - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - sort order: - Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE - Reducer 3 Execution mode: llap Reduce Operator Tree: Merge Join Operator @@ -448,11 +430,13 @@ STAGE PLANS: keys: 0 1 - Statistics: Num rows: 1 Data size: 377 Basic stats: COMPLETE Column stats: NONE + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator sort order: - Statistics: Num rows: 1 Data size: 377 Basic stats: COMPLETE Column stats: NONE - Reducer 4 + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) + Reducer 3 Execution mode: llap Reduce Operator Tree: Merge Join Operator @@ -461,19 +445,28 @@ STAGE PLANS: keys: 0 1 - outputColumnNames: _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9 - Statistics: Num rows: 1 Data size: 876 Basic stats: COMPLETE Column stats: NONE + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 619 Basic stats: COMPLETE Column stats: COMPLETE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + Reducer 5 + Execution mode: vectorized, llap + Reduce Operator Tree: + Group By Operator + aggregations: count(VALUE._col0) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: _col2 (type: int), null (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: int), _col7 (type: string), _col8 (type: double), _col9 (type: string) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 1 Data size: 876 Basic stats: COMPLETE Column stats: NONE - File Output Operator - compressed: false - Statistics: Num rows: 1 Data size: 876 Basic stats: COMPLETE Column stats: NONE - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Stage: Stage-0 Fetch Operator @@ -481,8 +474,8 @@ STAGE PLANS: Processor Tree: ListSink -Warning: Shuffle Join MERGEJOIN[26][tables = [$hdt$_1, $hdt$_2]] in Stage 'Reducer 3' is a cross product -Warning: Shuffle Join MERGEJOIN[27][tables = [$hdt$_1, $hdt$_2, $hdt$_0]] in Stage 'Reducer 4' is a cross product +Warning: Shuffle Join MERGEJOIN[25][tables = [$hdt$_0, $hdt$_1]] in Stage 'Reducer 2' is a cross product +Warning: Shuffle Join MERGEJOIN[26][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Reducer 3' is a cross product PREHOOK: query: select * from part where p_name = (select p_name from part_null_n0 where p_name is null) PREHOOK: type: QUERY PREHOOK: Input: default@part @@ -3556,15 +3549,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col13 Statistics: Num rows: 7 Data size: 3595 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col10 = 0L) or (_col13 is null and _col3 is not null and (_col11 >= _col10))) (type: boolean) - Statistics: Num rows: 4 Data size: 2054 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col11 >= _col10) or (_col10 = 0L) or _col13 is not null or _col3 is null) and (_col13 is null or (_col10 = 0L)) and (_col3 is not null or (_col10 = 0L) or _col13 is not null)) (type: boolean) + Statistics: Num rows: 6 Data size: 3081 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 4 Data size: 2054 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 6 Data size: 3081 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 4 Data size: 2054 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 6 Data size: 3081 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -3803,17 +3796,17 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 14 Data size: 2025 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col12 is null and _col3 is not null and (_col10 >= _col9)) or (_col9 = 0L)) (type: boolean) - Statistics: Num rows: 9 Data size: 1301 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col10 >= _col9) or (_col9 = 0L) or _col12 is not null or _col3 is null) and (_col12 is null or (_col9 = 0L)) and (_col3 is not null or (_col9 = 0L) or _col12 is not null)) (type: boolean) + Statistics: Num rows: 14 Data size: 2025 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 9 Data size: 1301 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 14 Data size: 2025 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col4 (type: string) sort order: + Map-reduce partition columns: _col4 (type: string) - Statistics: Num rows: 9 Data size: 1301 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 14 Data size: 2025 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) Reducer 5 Execution mode: llap @@ -3826,14 +3819,14 @@ STAGE PLANS: 1 _col1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9 residual filter predicates: {(not (_col1 like _col9))} - Statistics: Num rows: 5 Data size: 795 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 8 Data size: 1187 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 5 Data size: 795 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 8 Data size: 1187 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 5 Data size: 795 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 8 Data size: 1187 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -6487,15 +6480,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 2 Data size: 40 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN (_col3 is null) THEN (true) ELSE ((_col2 = 0L)) END (type: boolean) - Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: COMPLETE + predicate: ((_col2 = 0L) or _col3 is null) (type: boolean) + Statistics: Num rows: 2 Data size: 40 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int), _col1 (type: int) outputColumnNames: _col0, _col1 - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -6827,15 +6820,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 2 Data size: 17 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN (_col3 is null) THEN (true) ELSE ((_col2 = 0L)) END (type: boolean) - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + predicate: ((_col2 = 0L) or _col3 is null) (type: boolean) + Statistics: Num rows: 2 Data size: 17 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: int) outputColumnNames: _col0, _col1 - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2 Data size: 17 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2 Data size: 17 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git ql/src/test/results/clientpositive/llap/subquery_select.q.out ql/src/test/results/clientpositive/llap/subquery_select.q.out index 629ac5075b..dd72e2318d 100644 --- ql/src/test/results/clientpositive/llap/subquery_select.q.out +++ ql/src/test/results/clientpositive/llap/subquery_select.q.out @@ -96,7 +96,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col3, _col4, _col5 Statistics: Num rows: 27 Data size: 440 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: _col0 (type: int), CASE WHEN (_col4) THEN (false) WHEN (_col3 is not null) THEN (true) WHEN (_col1) THEN (null) WHEN (_col5) THEN (null) ELSE (false) END (type: boolean) + expressions: _col0 (type: int), ((_col3 is not null and _col4) or ((_col1 or _col5) and null and _col4 and _col3 is null)) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 27 Data size: 216 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator @@ -138,7 +138,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: (_col0 = 0L) (type: boolean), (_col1 < _col0) (type: boolean) + expressions: (_col0 <> 0L) (type: boolean), (_col1 < _col0) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator @@ -294,7 +294,7 @@ STAGE PLANS: outputColumnNames: _col1, _col2, _col4, _col5, _col6, _col9 Statistics: Num rows: 48 Data size: 852 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: _col1 (type: int), CASE WHEN (_col5) THEN (false) WHEN (_col4 is null) THEN (false) WHEN (_col9 is not null) THEN (true) WHEN (_col2) THEN (null) WHEN (_col6) THEN (null) ELSE (false) END (type: boolean) + expressions: _col1 (type: int), ((_col9 is not null and (_col5 or _col4 is null) is not true) or ((_col2 or _col6) is true and null and (_col5 or _col4 is null) is not true and _col9 is null)) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 48 Data size: 384 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator @@ -430,15 +430,15 @@ STAGE PLANS: alias: part Statistics: Num rows: 26 Data size: 104 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: p_size (type: int), p_size is null (type: boolean) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 26 Data size: 208 Basic stats: COMPLETE Column stats: COMPLETE + expressions: p_size (type: int), p_size is null (type: boolean), p_size is not null (type: boolean) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 26 Data size: 312 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: int) sort order: + Map-reduce partition columns: _col0 (type: int) - Statistics: Num rows: 26 Data size: 208 Basic stats: COMPLETE Column stats: COMPLETE - value expressions: _col1 (type: boolean) + Statistics: Num rows: 26 Data size: 312 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col1 (type: boolean), _col2 (type: boolean) Select Operator expressions: p_size (type: int) outputColumnNames: p_size @@ -476,12 +476,12 @@ STAGE PLANS: keys: 0 _col0 (type: int) 1 _col0 (type: int) - outputColumnNames: _col0, _col1, _col3 - Statistics: Num rows: 27 Data size: 224 Basic stats: COMPLETE Column stats: COMPLETE + outputColumnNames: _col0, _col1, _col2, _col4 + Statistics: Num rows: 27 Data size: 332 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator sort order: - Statistics: Num rows: 27 Data size: 224 Basic stats: COMPLETE Column stats: COMPLETE - value expressions: _col0 (type: int), _col1 (type: boolean), _col3 (type: boolean) + Statistics: Num rows: 27 Data size: 332 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col0 (type: int), _col1 (type: boolean), _col2 (type: boolean), _col4 (type: boolean) Reducer 3 Execution mode: llap Reduce Operator Tree: @@ -491,10 +491,10 @@ STAGE PLANS: keys: 0 1 - outputColumnNames: _col0, _col1, _col3, _col4, _col5 - Statistics: Num rows: 27 Data size: 440 Basic stats: COMPLETE Column stats: COMPLETE + outputColumnNames: _col0, _col1, _col2, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 27 Data size: 764 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: _col0 (type: int), CASE WHEN (_col4) THEN (true) WHEN (_col3 is not null) THEN (false) WHEN (_col1) THEN (null) WHEN (_col5) THEN (null) ELSE (true) END (type: boolean) + expressions: _col0 (type: int), (_col5 or ((_col1 or _col6) and null and _col7 and _col4 is null) or (_col7 and _col4 is null and _col2 and _col8)) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 27 Data size: 216 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator @@ -536,13 +536,13 @@ STAGE PLANS: outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: (_col0 = 0L) (type: boolean), (_col1 < _col0) (type: boolean) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + expressions: (_col0 = 0L) (type: boolean), (_col1 < _col0) (type: boolean), (_col0 <> 0L) (type: boolean), (_col1 >= _col0) (type: boolean) + outputColumnNames: _col0, _col1, _col2, _col3 + Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator sort order: - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE - value expressions: _col0 (type: boolean), _col1 (type: boolean) + Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col0 (type: boolean), _col1 (type: boolean), _col2 (type: boolean), _col3 (type: boolean) Stage: Stage-0 Fetch Operator @@ -759,7 +759,7 @@ STAGE PLANS: outputColumnNames: _col1, _col2, _col4, _col5, _col6, _col9 Statistics: Num rows: 13 Data size: 364 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: _col1 (type: int), CASE WHEN (_col5) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col9 is not null) THEN (false) WHEN (_col2) THEN (null) WHEN (_col6) THEN (null) ELSE (true) END (type: boolean) + expressions: _col1 (type: int), ((_col5 or _col4 is null) is true or ((_col2 or _col6) is true and null and (_col5 or _col4 is null) is not true and _col9 is null) or ((_col5 or _col4 is null) is not true and _col9 is null and (_col2 or _col6) is not true)) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 13 Data size: 104 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator @@ -2306,7 +2306,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col3, _col4, _col5 Statistics: Num rows: 27 Data size: 440 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: _col0 (type: int), CASE WHEN (_col4) THEN (false) WHEN (_col3 is not null) THEN (true) WHEN (_col1) THEN (null) WHEN (_col5) THEN (null) ELSE (false) END (type: boolean) + expressions: _col0 (type: int), ((_col3 is not null and _col4) or ((_col1 or _col5) and null and _col4 and _col3 is null)) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 27 Data size: 216 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator @@ -2343,7 +2343,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: (_col0 = 0L) (type: boolean), (_col1 < _col0) (type: boolean) + expressions: (_col0 <> 0L) (type: boolean), (_col1 < _col0) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator @@ -2888,7 +2888,7 @@ STAGE PLANS: outputColumnNames: _col1, _col2, _col3 Statistics: Num rows: 36 Data size: 324 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: _col1 (type: int), CASE WHEN (_col3 is null) THEN (false) ELSE (_col2 is null) END (type: boolean) + expressions: _col1 (type: int), (_col2 is null and _col3 is not null) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 36 Data size: 288 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator @@ -3319,7 +3319,7 @@ STAGE PLANS: outputColumnNames: _col2, _col3, _col4, _col6, _col7, _col8, _col11, _col13, _col14, _col15 Statistics: Num rows: 49 Data size: 1476 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: _col2 (type: int), (CASE WHEN (_col7) THEN (false) WHEN (_col6 is null) THEN (false) WHEN (_col11 is not null) THEN (true) WHEN (_col3) THEN (null) WHEN (_col8) THEN (null) ELSE (false) END and CASE WHEN (_col14) THEN (false) WHEN (_col13 is not null) THEN (true) WHEN (_col4) THEN (null) WHEN (_col15) THEN (null) ELSE (false) END) (type: boolean) + expressions: _col2 (type: int), (((_col11 is not null and (_col7 or _col6 is null) is not true) or ((_col3 or _col8) is true and null and (_col7 or _col6 is null) is not true and _col11 is null)) and ((_col13 is not null and _col14) or ((_col4 or _col15) and null and _col14 and _col13 is null))) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 49 Data size: 392 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator @@ -3391,7 +3391,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: (_col0 = 0L) (type: boolean), (_col1 < _col0) (type: boolean) + expressions: (_col0 <> 0L) (type: boolean), (_col1 < _col0) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator @@ -3690,7 +3690,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col3, _col4, _col5 Statistics: Num rows: 27 Data size: 440 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: _col0 (type: int), CASE WHEN (_col4) THEN (false) WHEN (_col3 is not null) THEN (true) WHEN (_col1) THEN (null) WHEN (_col5) THEN (null) ELSE (false) END (type: boolean) + expressions: _col0 (type: int), ((_col3 is not null and _col4) or ((_col1 or _col5) and null and _col4 and _col3 is null)) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 27 Data size: 216 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator @@ -3770,7 +3770,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: (_col0 = 0L) (type: boolean), (_col1 < _col0) (type: boolean) + expressions: (_col0 <> 0L) (type: boolean), (_col1 < _col0) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator diff --git ql/src/test/results/clientpositive/llap/subquery_views.q.out ql/src/test/results/clientpositive/llap/subquery_views.q.out index 418238236d..f2a186a66e 100644 --- ql/src/test/results/clientpositive/llap/subquery_views.q.out +++ ql/src/test/results/clientpositive/llap/subquery_views.q.out @@ -277,17 +277,17 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col4, _col5, _col8 Statistics: Num rows: 386 Data size: 73020 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 193 Data size: 36518 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col0 is null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) (type: boolean) + Statistics: Num rows: 386 Data size: 73020 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: string) outputColumnNames: _col0, _col1 - Statistics: Num rows: 193 Data size: 34354 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 386 Data size: 68708 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 193 Data size: 34354 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 386 Data size: 68708 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col1 (type: string) Reducer 4 Execution mode: llap @@ -299,10 +299,10 @@ STAGE PLANS: 0 _col0 (type: string) 1 _col0 (type: string) outputColumnNames: _col0, _col1 - Statistics: Num rows: 193 Data size: 34354 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 386 Data size: 68708 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 193 Data size: 34354 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 386 Data size: 68708 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -375,12 +375,12 @@ STAGE PLANS: outputColumnNames: _col0, _col4, _col5, _col8 Statistics: Num rows: 319 Data size: 30993 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 159 Data size: 15453 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col0 is null) and (_col0 is not null or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) (type: boolean) + Statistics: Num rows: 285 Data size: 27695 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string) outputColumnNames: _col0 - Statistics: Num rows: 159 Data size: 13833 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 285 Data size: 24795 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator keys: _col0 (type: string) mode: hash diff --git ql/src/test/results/clientpositive/llap/tez_smb_reduce_side.q.out ql/src/test/results/clientpositive/llap/tez_smb_reduce_side.q.out index c58a28d024..75b321cfa2 100644 --- ql/src/test/results/clientpositive/llap/tez_smb_reduce_side.q.out +++ ql/src/test/results/clientpositive/llap/tez_smb_reduce_side.q.out @@ -691,7 +691,7 @@ STAGE PLANS: outputColumnNames: _col0, _col2, _col3, _col5 Statistics: Num rows: 5 Data size: 72 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col2 = 0L)) THEN (true) WHEN (_col2 is null) THEN (true) WHEN (_col5 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col3 < _col2)) THEN (false) ELSE (true) END (type: boolean) + predicate: (((_col3 < _col2) is not true or ((_col2 = 0L) or _col2 is null) is true or _col5 is not null or _col0 is null) and (_col0 is not null or ((_col2 = 0L) or _col2 is null) is true or _col5 is not null) and (_col5 is null or ((_col2 = 0L) or _col2 is null) is true)) (type: boolean) Statistics: Num rows: 2 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int) @@ -911,7 +911,7 @@ STAGE PLANS: outputColumnNames: _col0, _col2, _col3, _col5 Statistics: Num rows: 5 Data size: 72 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col2 = 0L)) THEN (true) WHEN (_col2 is null) THEN (true) WHEN (_col5 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col3 < _col2)) THEN (false) ELSE (true) END (type: boolean) + predicate: (((_col3 < _col2) is not true or ((_col2 = 0L) or _col2 is null) is true or _col5 is not null or _col0 is null) and (_col0 is not null or ((_col2 = 0L) or _col2 is null) is true or _col5 is not null) and (_col5 is null or ((_col2 = 0L) or _col2 is null) is true)) (type: boolean) Statistics: Num rows: 2 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int) diff --git ql/src/test/results/clientpositive/llap/unionDistinct_1.q.out ql/src/test/results/clientpositive/llap/unionDistinct_1.q.out index 7f2cc85392..7c487c2330 100644 --- ql/src/test/results/clientpositive/llap/unionDistinct_1.q.out +++ ql/src/test/results/clientpositive/llap/unionDistinct_1.q.out @@ -3799,6 +3799,19 @@ POSTHOOK: Input: default@dst_union22_delta_n0@ds=1 POSTHOOK: Input: default@dst_union22_n0 POSTHOOK: Input: default@dst_union22_n0@ds=1 POSTHOOK: Output: default@dst_union22_n0@ds=2 +OPTIMIZED SQL: SELECT `k1`, `k2`, `k3`, `k4` +FROM (SELECT `k1`, `k2`, `k3`, `k4` +FROM `default`.`dst_union22_delta_n0` +WHERE `ds` = '1' AND `k0` <= 50 +UNION ALL +SELECT `t2`.`k1`, `t2`.`k2`, `t4`.`k3`, `t4`.`k4` +FROM (SELECT `k1`, `k2`, `ds` = '1' AS `=` +FROM `default`.`dst_union22_n0` +WHERE `k1` > 20) AS `t2` +LEFT JOIN (SELECT `k1`, `k3`, `k4` +FROM `default`.`dst_union22_delta_n0` +WHERE `ds` = '1' AND `k0` > 50 AND `k1` > 20) AS `t4` ON `t2`.`k1` = `t4`.`k1` AND `t2`.`=`) +GROUP BY `k1`, `k2`, `k3`, `k4` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-2 depends on stages: Stage-1 diff --git ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out index 6529758a3a..08200b419b 100644 --- ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out +++ ql/src/test/results/clientpositive/llap/vector_case_when_1.q.out @@ -209,13 +209,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:l_orderkey:int, 1:l_partkey:int, 2:l_suppkey:int, 3:l_linenumber:int, 4:l_quantity:int, 5:l_extendedprice:double, 6:l_discount:double, 7:l_tax:decimal(10,2)/DECIMAL_64, 8:l_returnflag:char(1), 9:l_linestatus:char(1), 10:l_shipdate:date, 11:l_commitdate:date, 12:l_receiptdate:date, 13:l_shipinstruct:varchar(20), 14:l_shipmode:char(10), 15:l_comment:string, 16:ROW__ID:struct] Select Operator - expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN (null) ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) + expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16 Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [4, 21, 26, 31, 35, 39, 43, 45, 47, 49, 51, 53, 55, 59, 62, 65, 68] - selectExpressions: VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 22:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 23:boolean, LongColLessLongScalar(col 4:int, val 10) -> 24:boolean, LongColLessLongScalar(col 4:int, val 100) -> 25:boolean) -> 26:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN (null) ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 27:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 28:boolean, LongColLessLongScalar(col 4:int, val 10) -> 29:boolean, LongColLessLongScalar(col 4:int, val 100) -> 30:boolean) -> 31:string, IfExprLongColumnLongColumn(col 32:boolean, col 33:date, col 34:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 32:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 33:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 34:date) -> 35:date, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 36:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 37:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 37:double) -> 38:double) -> 39:double, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 40:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 41:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 41:double) -> 42:double) -> 43:double, VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 44:boolean) -> 45:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 46:boolean) -> 47:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 48:boolean) -> 49:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 50:boolean) -> 51:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 52:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 52:boolean) -> 53:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 54:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 54:boolean) -> 55:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 56:boolean, col 57:timestampcol 58:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 56:boolean, CastDateToTimestamp(col 12:date) -> 57:timestamp, CastDateToTimestamp(col 11:date) -> 58:timestamp) -> 59:timestamp, VectorUDFAdaptor(if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 60:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 61:int) -> 62:int, VectorUDFAdaptor(if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 63:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 64:int) -> 65:int, IfExprLongScalarLongScalar(col 67:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 66:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 66:int) -> 67:boolean) -> 68:date + projectedOutputColumnNums: [4, 21, 26, 30, 34, 38, 42, 44, 46, 48, 50, 52, 54, 58, 61, 64, 67] + selectExpressions: VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 22:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 23:boolean, LongColLessLongScalar(col 4:int, val 10) -> 24:boolean, LongColLessLongScalar(col 4:int, val 100) -> 25:boolean) -> 26:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 27:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 28:boolean, LongColLessLongScalar(col 4:int, val 10) -> 29:boolean) -> 30:string, IfExprLongColumnLongColumn(col 31:boolean, col 32:date, col 33:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 31:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 32:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 33:date) -> 34:date, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 35:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 36:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 36:double) -> 37:double) -> 38:double, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 39:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 40:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 40:double) -> 41:double) -> 42:double, VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 43:boolean) -> 44:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 45:boolean) -> 46:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 47:boolean) -> 48:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 49:boolean) -> 50:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 51:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 51:boolean) -> 52:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 53:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 53:boolean) -> 54:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 55:boolean, col 56:timestampcol 57:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 55:boolean, CastDateToTimestamp(col 12:date) -> 56:timestamp, CastDateToTimestamp(col 11:date) -> 57:timestamp) -> 58:timestamp, VectorUDFAdaptor(if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 59:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 60:int) -> 61:int, VectorUDFAdaptor(if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 62:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 63:int) -> 64:int, IfExprLongScalarLongScalar(col 66:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 65:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 65:int) -> 66:boolean) -> 67:date Statistics: Num rows: 101 Data size: 141804 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -243,7 +243,7 @@ STAGE PLANS: includeColumns: [1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14] dataColumns: l_orderkey:int, l_partkey:int, l_suppkey:int, l_linenumber:int, l_quantity:int, l_extendedprice:double, l_discount:double, l_tax:decimal(10,2)/DECIMAL_64, l_returnflag:char(1), l_linestatus:char(1), l_shipdate:date, l_commitdate:date, l_receiptdate:date, l_shipinstruct:varchar(20), l_shipmode:char(10), l_comment:string partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, double, double, double, bigint, double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, decimal(12,2), bigint, decimal(12,2), bigint, decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, bigint, timestamp, timestamp, timestamp, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, double, double, double, bigint, double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, decimal(12,2), bigint, decimal(12,2), bigint, decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, bigint, timestamp, timestamp, timestamp, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint] Stage: Stage-0 Fetch Operator @@ -546,13 +546,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:l_orderkey:int, 1:l_partkey:int, 2:l_suppkey:int, 3:l_linenumber:int, 4:l_quantity:int, 5:l_extendedprice:double, 6:l_discount:double, 7:l_tax:decimal(10,2)/DECIMAL_64, 8:l_returnflag:char(1), 9:l_linestatus:char(1), 10:l_shipdate:date, 11:l_commitdate:date, 12:l_receiptdate:date, 13:l_shipinstruct:varchar(20), 14:l_shipmode:char(10), 15:l_comment:string, 16:ROW__ID:struct] Select Operator - expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN (null) ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) + expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16 Select Vectorization: className: VectorSelectOperator native: true projectedOutputColumnNums: [4, 24, 33, 40, 44, 49, 53, 55, 57, 59, 61, 63, 65, 69, 72, 75, 78] - selectExpressions: IfExprStringScalarStringGroupColumn(col 17:boolean, val Singlecol 23:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 22:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, IfExprStringScalarStringGroupColumn(col 19:boolean, val Somecol 21:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, IfExprStringScalarStringScalar(col 20:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string) -> 22:string) -> 23:string) -> 24:string, IfExprStringScalarStringGroupColumn(col 25:boolean, val Singlecol 32:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 25:boolean, IfExprStringScalarStringGroupColumn(col 26:boolean, val Twocol 31:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 26:boolean, IfExprStringScalarStringGroupColumn(col 27:boolean, val Somecol 30:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 27:boolean, IfExprColumnNull(col 28:boolean, col 29:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 28:boolean, ConstantVectorExpression(val Many) -> 29:string) -> 30:string) -> 31:string) -> 32:string) -> 33:string, IfExprStringScalarStringGroupColumn(col 34:boolean, val Singlecol 39:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 34:boolean, IfExprStringScalarStringGroupColumn(col 35:boolean, val Twocol 38:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 35:boolean, IfExprStringScalarStringGroupColumn(col 36:boolean, val Somecol 37:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 36:boolean, IfExprNullNull(null, null) -> 37:string) -> 38:string) -> 39:string) -> 40:string, IfExprLongColumnLongColumn(col 41:boolean, col 42:date, col 43:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 41:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 42:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 43:date) -> 44:date, IfExprDoubleColumnDoubleColumn(col 45:boolean, col 47:doublecol 48:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 45:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 46:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 46:double) -> 47:double, ConstantVectorExpression(val 0.0) -> 48:double) -> 49:double, IfExprDoubleColumnDoubleScalar(col 50:boolean, col 52:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 50:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 51:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 51:double) -> 52:double) -> 53:double, IfExprNullColumn(col 54:boolean, null, col 79)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 54:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 79:decimal(10,2)) -> 55:decimal(10,2), IfExprColumnNull(col 56:boolean, col 80:decimal(10,2), null)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 56:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 80:decimal(10,2)) -> 57:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 58:boolean) -> 59:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 60:boolean) -> 61:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 62:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 62:boolean) -> 63:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 64:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 64:boolean) -> 65:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 66:boolean, col 67:timestampcol 68:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 66:boolean, CastDateToTimestamp(col 12:date) -> 67:timestamp, CastDateToTimestamp(col 11:date) -> 68:timestamp) -> 69:timestamp, IfExprColumnNull(col 70:boolean, col 71:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 70:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 71:int) -> 72:int, IfExprNullColumn(col 73:boolean, null, col 74)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 73:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 74:int) -> 75:int, IfExprLongScalarLongScalar(col 77:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 76:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 76:int) -> 77:boolean) -> 78:date + selectExpressions: IfExprStringScalarStringGroupColumn(col 17:boolean, val Singlecol 23:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 22:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, IfExprStringScalarStringGroupColumn(col 19:boolean, val Somecol 21:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, IfExprStringScalarStringScalar(col 20:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string) -> 22:string) -> 23:string) -> 24:string, IfExprStringScalarStringGroupColumn(col 25:boolean, val Singlecol 32:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 25:boolean, IfExprStringScalarStringGroupColumn(col 26:boolean, val Twocol 31:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 26:boolean, IfExprStringScalarStringGroupColumn(col 27:boolean, val Somecol 30:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 27:boolean, IfExprColumnNull(col 28:boolean, col 29:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 28:boolean, ConstantVectorExpression(val Many) -> 29:string) -> 30:string) -> 31:string) -> 32:string) -> 33:string, IfExprStringScalarStringGroupColumn(col 34:boolean, val Singlecol 39:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 34:boolean, IfExprStringScalarStringGroupColumn(col 35:boolean, val Twocol 38:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 35:boolean, IfExprColumnNull(col 36:boolean, col 37:string, null)(children: LongColLessLongScalar(col 4:int, val 10) -> 36:boolean, ConstantVectorExpression(val Some) -> 37:string) -> 38:string) -> 39:string) -> 40:string, IfExprLongColumnLongColumn(col 41:boolean, col 42:date, col 43:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 41:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 42:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 43:date) -> 44:date, IfExprDoubleColumnDoubleColumn(col 45:boolean, col 47:doublecol 48:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 45:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 46:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 46:double) -> 47:double, ConstantVectorExpression(val 0.0) -> 48:double) -> 49:double, IfExprDoubleColumnDoubleScalar(col 50:boolean, col 52:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 50:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 51:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 51:double) -> 52:double) -> 53:double, IfExprNullColumn(col 54:boolean, null, col 79)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 54:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 79:decimal(10,2)) -> 55:decimal(10,2), IfExprColumnNull(col 56:boolean, col 80:decimal(10,2), null)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 56:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 80:decimal(10,2)) -> 57:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 58:boolean) -> 59:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 60:boolean) -> 61:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 62:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 62:boolean) -> 63:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 64:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 64:boolean) -> 65:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 66:boolean, col 67:timestampcol 68:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 66:boolean, CastDateToTimestamp(col 12:date) -> 67:timestamp, CastDateToTimestamp(col 11:date) -> 68:timestamp) -> 69:timestamp, IfExprColumnNull(col 70:boolean, col 71:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 70:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 71:int) -> 72:int, IfExprNullColumn(col 73:boolean, null, col 74)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 73:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 74:int) -> 75:int, IfExprLongScalarLongScalar(col 77:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 76:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 76:int) -> 77:boolean) -> 78:date Statistics: Num rows: 101 Data size: 141804 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -883,13 +883,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:l_orderkey:int, 1:l_partkey:int, 2:l_suppkey:int, 3:l_linenumber:int, 4:l_quantity:int, 5:l_extendedprice:double, 6:l_discount:double, 7:l_tax:decimal(10,2)/DECIMAL_64, 8:l_returnflag:char(1), 9:l_linestatus:char(1), 10:l_shipdate:date, 11:l_commitdate:date, 12:l_receiptdate:date, 13:l_shipinstruct:varchar(20), 14:l_shipmode:char(10), 15:l_comment:string, 16:ROW__ID:struct] Select Operator - expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN (null) ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) + expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16 Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [4, 27, 39, 49, 53, 58, 63, 65, 67, 72, 77, 79, 81, 85, 88, 91, 94] - selectExpressions: IfExprColumnCondExpr(col 17:boolean, col 18:stringcol 26:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, ConstantVectorExpression(val Single) -> 18:string, IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 25:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 19:boolean, ConstantVectorExpression(val Two) -> 20:string, IfExprColumnCondExpr(col 21:boolean, col 22:stringcol 24:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 21:boolean, ConstantVectorExpression(val Some) -> 22:string, IfExprStringScalarStringScalar(col 23:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 23:boolean) -> 24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 28:boolean, col 29:stringcol 38:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 28:boolean, ConstantVectorExpression(val Single) -> 29:string, IfExprColumnCondExpr(col 30:boolean, col 31:stringcol 37:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 30:boolean, ConstantVectorExpression(val Two) -> 31:string, IfExprColumnCondExpr(col 32:boolean, col 33:stringcol 36:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 32:boolean, ConstantVectorExpression(val Some) -> 33:string, IfExprColumnNull(col 34:boolean, col 35:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 34:boolean, ConstantVectorExpression(val Many) -> 35:string) -> 36:string) -> 37:string) -> 38:string) -> 39:string, IfExprColumnCondExpr(col 40:boolean, col 41:stringcol 48:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 40:boolean, ConstantVectorExpression(val Single) -> 41:string, IfExprColumnCondExpr(col 42:boolean, col 43:stringcol 47:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 42:boolean, ConstantVectorExpression(val Two) -> 43:string, IfExprColumnCondExpr(col 44:boolean, col 45:stringcol 46:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 44:boolean, ConstantVectorExpression(val Some) -> 45:string, IfExprNullNull(null, null) -> 46:string) -> 47:string) -> 48:string) -> 49:string, IfExprCondExprCondExpr(col 50:boolean, col 51:datecol 52:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 50:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 51:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 52:date) -> 53:date, IfExprCondExprCondExpr(col 54:boolean, col 56:doublecol 57:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 54:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 55:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 55:double) -> 56:double, ConstantVectorExpression(val 0.0) -> 57:double) -> 58:double, IfExprCondExprColumn(col 59:boolean, col 61:double, col 62:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 59:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 60:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 60:double) -> 61:double, ConstantVectorExpression(val 0.0) -> 62:double) -> 63:double, IfExprNullColumn(col 64:boolean, null, col 95)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 64:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 95:decimal(10,2)) -> 65:decimal(10,2), IfExprColumnNull(col 66:boolean, col 96:decimal(10,2), null)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 66:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 96:decimal(10,2)) -> 67:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 71:boolean) -> 72:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 76:boolean) -> 77:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 78:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 78:boolean) -> 79:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 80:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 80:boolean) -> 81:decimal(10,2)/DECIMAL_64, IfExprCondExprCondExpr(col 82:boolean, col 83:timestampcol 84:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 82:boolean, CastDateToTimestamp(col 12:date) -> 83:timestamp, CastDateToTimestamp(col 11:date) -> 84:timestamp) -> 85:timestamp, IfExprCondExprNull(col 86:boolean, col 87:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 86:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 87:int) -> 88:int, IfExprNullCondExpr(col 89:boolean, null, col 90:int)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 89:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 90:int) -> 91:int, IfExprLongScalarLongScalar(col 93:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 92:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 92:int) -> 93:boolean) -> 94:date + projectedOutputColumnNums: [4, 27, 39, 48, 52, 57, 62, 64, 66, 71, 76, 78, 80, 84, 87, 90, 93] + selectExpressions: IfExprColumnCondExpr(col 17:boolean, col 18:stringcol 26:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, ConstantVectorExpression(val Single) -> 18:string, IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 25:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 19:boolean, ConstantVectorExpression(val Two) -> 20:string, IfExprColumnCondExpr(col 21:boolean, col 22:stringcol 24:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 21:boolean, ConstantVectorExpression(val Some) -> 22:string, IfExprStringScalarStringScalar(col 23:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 23:boolean) -> 24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 28:boolean, col 29:stringcol 38:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 28:boolean, ConstantVectorExpression(val Single) -> 29:string, IfExprColumnCondExpr(col 30:boolean, col 31:stringcol 37:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 30:boolean, ConstantVectorExpression(val Two) -> 31:string, IfExprColumnCondExpr(col 32:boolean, col 33:stringcol 36:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 32:boolean, ConstantVectorExpression(val Some) -> 33:string, IfExprColumnNull(col 34:boolean, col 35:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 34:boolean, ConstantVectorExpression(val Many) -> 35:string) -> 36:string) -> 37:string) -> 38:string) -> 39:string, IfExprColumnCondExpr(col 40:boolean, col 41:stringcol 47:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 40:boolean, ConstantVectorExpression(val Single) -> 41:string, IfExprColumnCondExpr(col 42:boolean, col 43:stringcol 46:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 42:boolean, ConstantVectorExpression(val Two) -> 43:string, IfExprColumnNull(col 44:boolean, col 45:string, null)(children: LongColLessLongScalar(col 4:int, val 10) -> 44:boolean, ConstantVectorExpression(val Some) -> 45:string) -> 46:string) -> 47:string) -> 48:string, IfExprCondExprCondExpr(col 49:boolean, col 50:datecol 51:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 49:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 50:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 51:date) -> 52:date, IfExprCondExprCondExpr(col 53:boolean, col 55:doublecol 56:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 53:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 54:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 54:double) -> 55:double, ConstantVectorExpression(val 0.0) -> 56:double) -> 57:double, IfExprCondExprColumn(col 58:boolean, col 60:double, col 61:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 58:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 59:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 59:double) -> 60:double, ConstantVectorExpression(val 0.0) -> 61:double) -> 62:double, IfExprNullColumn(col 63:boolean, null, col 94)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 63:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 94:decimal(10,2)) -> 64:decimal(10,2), IfExprColumnNull(col 65:boolean, col 95:decimal(10,2), null)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 65:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 95:decimal(10,2)) -> 66:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 70:boolean) -> 71:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 75:boolean) -> 76:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 77:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 77:boolean) -> 78:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 79:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 79:boolean) -> 80:decimal(10,2)/DECIMAL_64, IfExprCondExprCondExpr(col 81:boolean, col 82:timestampcol 83:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 81:boolean, CastDateToTimestamp(col 12:date) -> 82:timestamp, CastDateToTimestamp(col 11:date) -> 83:timestamp) -> 84:timestamp, IfExprCondExprNull(col 85:boolean, col 86:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 85:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 86:int) -> 87:int, IfExprNullCondExpr(col 88:boolean, null, col 89:int)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 88:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 89:int) -> 90:int, IfExprLongScalarLongScalar(col 92:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 91:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 91:int) -> 92:boolean) -> 93:date Statistics: Num rows: 101 Data size: 141804 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -917,7 +917,7 @@ STAGE PLANS: includeColumns: [1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14] dataColumns: l_orderkey:int, l_partkey:int, l_suppkey:int, l_linenumber:int, l_quantity:int, l_extendedprice:double, l_discount:double, l_tax:decimal(10,2)/DECIMAL_64, l_returnflag:char(1), l_linestatus:char(1), l_shipdate:date, l_commitdate:date, l_receiptdate:date, l_shipinstruct:varchar(20), l_shipmode:char(10), l_comment:string partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, string, bigint, string, bigint, string, bigint, string, string, string, string, string, bigint, bigint, bigint, bigint, bigint, double, double, double, double, bigint, double, double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, bigint, decimal(12,2), bigint, decimal(12,2), bigint, decimal(12,2), bigint, bigint, decimal(12,2), bigint, decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, bigint, timestamp, timestamp, timestamp, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, decimal(10,2), decimal(10,2)] + scratchColumnTypeNames: [bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, string, bigint, string, bigint, string, bigint, string, string, string, string, bigint, bigint, bigint, bigint, bigint, double, double, double, double, bigint, double, double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, bigint, decimal(12,2), bigint, decimal(12,2), bigint, decimal(12,2), bigint, bigint, decimal(12,2), bigint, decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, bigint, timestamp, timestamp, timestamp, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, decimal(10,2), decimal(10,2)] Stage: Stage-0 Fetch Operator diff --git ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out index 218a5cff17..d7a7c2f9f9 100644 --- ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out +++ ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out @@ -144,13 +144,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:cdate:date, 1:ctimestamp1:timestamp, 2:stimestamp1:string, 3:ctimestamp2:timestamp, 4:ROW__ID:struct] Select Operator - expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) + expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [1, 3, 9, 14, 19, 23, 25, 28, 33, 39, 2] - selectExpressions: VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 6:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 9:string, VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 10:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 11:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 12:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 13:boolean) -> 14:string, VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 15:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 16:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 17:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 18:boolean) -> 19:string, IfExprLongColumnLongColumn(col 20:boolean, col 21:int, col 22:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 20:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 21:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 22:int) -> 23:int, VectorUDFAdaptor(CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END)(children: SelectStringColLikeStringScalar(col 2:string) -> 24:boolean) -> 25:string, VectorUDFAdaptor(if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)))(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 26:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 27:int) -> 28:int, VectorUDFAdaptor(if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null))(children: ColAndCol(col 29:boolean, col 30:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 29:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 30:boolean) -> 31:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 32:int) -> 33:int, IfExprLongColumnLongColumn(col 36:boolean, col 37:date, col 38:date)(children: DoubleColGreaterDoubleScalar(col 35:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 34:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 34:double) -> 35:double) -> 36:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 37:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 38:date) -> 39:date + projectedOutputColumnNums: [1, 3, 9, 14, 18, 22, 24, 27, 32, 38, 2] + selectExpressions: VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 6:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 9:string, VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 10:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 11:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 12:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 13:boolean) -> 14:string, VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') ELSE (null) END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 15:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 16:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 17:boolean) -> 18:string, IfExprLongColumnLongColumn(col 19:boolean, col 20:int, col 21:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 19:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 20:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 21:int) -> 22:int, VectorUDFAdaptor(CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END)(children: SelectStringColLikeStringScalar(col 2:string) -> 23:boolean) -> 24:string, VectorUDFAdaptor(if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)))(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 25:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 26:int) -> 27:int, VectorUDFAdaptor(if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null))(children: ColAndCol(col 28:boolean, col 29:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 28:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 29:boolean) -> 30:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 31:int) -> 32:int, IfExprLongColumnLongColumn(col 35:boolean, col 36:date, col 37:date)(children: DoubleColGreaterDoubleScalar(col 34:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 33:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 33:double) -> 34:double) -> 35:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 36:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 37:date) -> 38:date Statistics: Num rows: 51 Data size: 50745 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: timestamp), _col10 (type: string), _col1 (type: timestamp) @@ -160,7 +160,7 @@ STAGE PLANS: keyColumns: 1:timestamp, 2:string, 3:timestamp native: true nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true - valueColumns: 9:string, 14:string, 19:string, 23:int, 25:string, 28:int, 33:int, 39:date + valueColumns: 9:string, 14:string, 18:string, 22:int, 24:string, 27:int, 32:int, 38:date Statistics: Num rows: 51 Data size: 50745 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: int), _col8 (type: int), _col9 (type: date) Execution mode: vectorized, llap @@ -179,7 +179,7 @@ STAGE PLANS: includeColumns: [0, 1, 2, 3] dataColumns: cdate:date, ctimestamp1:timestamp, stimestamp1:string, ctimestamp2:timestamp partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, double, double, bigint, bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, double, double, bigint, bigint, bigint, bigint] Reducer 2 Execution mode: vectorized, llap Reduce Vectorization: @@ -433,13 +433,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:cdate:date, 1:ctimestamp1:timestamp, 2:stimestamp1:string, 3:ctimestamp2:timestamp, 4:ROW__ID:struct] Select Operator - expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) + expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 Select Vectorization: className: VectorSelectOperator native: true projectedOutputColumnNums: [1, 3, 12, 21, 28, 32, 34, 37, 42, 48, 2] - selectExpressions: IfExprStringScalarStringGroupColumn(col 5:boolean, val 1800s or Earliercol 11:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, IfExprStringScalarStringGroupColumn(col 6:boolean, val 1900scol 10:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 6:boolean, IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 9:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, IfExprStringScalarStringScalar(col 8:boolean, val Early 2010s, val Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 9:string) -> 10:string) -> 11:string) -> 12:string, IfExprStringScalarStringGroupColumn(col 13:boolean, val Oldcol 20:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 13:boolean, IfExprStringScalarStringGroupColumn(col 14:boolean, val Early 2000scol 19:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 14:boolean, IfExprStringScalarStringGroupColumn(col 15:boolean, val Late 2000scol 18:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 15:boolean, IfExprColumnNull(col 16:boolean, col 17:string, null)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 16:boolean, ConstantVectorExpression(val Early 2010s) -> 17:string) -> 18:string) -> 19:string) -> 20:string) -> 21:string, IfExprStringScalarStringGroupColumn(col 22:boolean, val Oldcol 27:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 22:boolean, IfExprStringScalarStringGroupColumn(col 23:boolean, val Early 2000scol 26:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 23:boolean, IfExprStringScalarStringGroupColumn(col 24:boolean, val Late 2000scol 25:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 24:boolean, IfExprNullNull(null, null) -> 25:string) -> 26:string) -> 27:string) -> 28:string, IfExprLongColumnLongColumn(col 29:boolean, col 30:int, col 31:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 29:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 30:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 31:int) -> 32:int, IfExprStringGroupColumnStringScalar(col 33:boolean, col 2:string, val 2018-03-08 23:04:59)(children: SelectStringColLikeStringScalar(col 2:string) -> 33:boolean) -> 34:string, IfExprNullColumn(col 35:boolean, null, col 36)(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 35:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 36:int) -> 37:int, IfExprColumnNull(col 40:boolean, col 41:int, null)(children: ColAndCol(col 38:boolean, col 39:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 38:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 39:boolean) -> 40:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 41:int) -> 42:int, IfExprLongColumnLongColumn(col 45:boolean, col 46:date, col 47:date)(children: DoubleColGreaterDoubleScalar(col 44:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 43:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 43:double) -> 44:double) -> 45:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 46:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 47:date) -> 48:date + selectExpressions: IfExprStringScalarStringGroupColumn(col 5:boolean, val 1800s or Earliercol 11:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, IfExprStringScalarStringGroupColumn(col 6:boolean, val 1900scol 10:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 6:boolean, IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 9:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, IfExprStringScalarStringScalar(col 8:boolean, val Early 2010s, val Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 9:string) -> 10:string) -> 11:string) -> 12:string, IfExprStringScalarStringGroupColumn(col 13:boolean, val Oldcol 20:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 13:boolean, IfExprStringScalarStringGroupColumn(col 14:boolean, val Early 2000scol 19:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 14:boolean, IfExprStringScalarStringGroupColumn(col 15:boolean, val Late 2000scol 18:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 15:boolean, IfExprColumnNull(col 16:boolean, col 17:string, null)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 16:boolean, ConstantVectorExpression(val Early 2010s) -> 17:string) -> 18:string) -> 19:string) -> 20:string) -> 21:string, IfExprStringScalarStringGroupColumn(col 22:boolean, val Oldcol 27:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 22:boolean, IfExprStringScalarStringGroupColumn(col 23:boolean, val Early 2000scol 26:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 23:boolean, IfExprColumnNull(col 24:boolean, col 25:string, null)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 24:boolean, ConstantVectorExpression(val Late 2000s) -> 25:string) -> 26:string) -> 27:string) -> 28:string, IfExprLongColumnLongColumn(col 29:boolean, col 30:int, col 31:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 29:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 30:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 31:int) -> 32:int, IfExprStringGroupColumnStringScalar(col 33:boolean, col 2:string, val 2018-03-08 23:04:59)(children: SelectStringColLikeStringScalar(col 2:string) -> 33:boolean) -> 34:string, IfExprNullColumn(col 35:boolean, null, col 36)(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 35:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 36:int) -> 37:int, IfExprColumnNull(col 40:boolean, col 41:int, null)(children: ColAndCol(col 38:boolean, col 39:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 38:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 39:boolean) -> 40:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 41:int) -> 42:int, IfExprLongColumnLongColumn(col 45:boolean, col 46:date, col 47:date)(children: DoubleColGreaterDoubleScalar(col 44:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 43:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 43:double) -> 44:double) -> 45:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 46:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 47:date) -> 48:date Statistics: Num rows: 51 Data size: 50745 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: timestamp), _col10 (type: string), _col1 (type: timestamp) @@ -722,13 +722,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:cdate:date, 1:ctimestamp1:timestamp, 2:stimestamp1:string, 3:ctimestamp2:timestamp, 4:ROW__ID:struct] Select Operator - expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) + expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [1, 3, 15, 27, 37, 41, 43, 46, 51, 57, 2] - selectExpressions: IfExprColumnCondExpr(col 5:boolean, col 6:stringcol 14:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, ConstantVectorExpression(val 1800s or Earlier) -> 6:string, IfExprColumnCondExpr(col 7:boolean, col 8:stringcol 13:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 7:boolean, ConstantVectorExpression(val 1900s) -> 8:string, IfExprColumnCondExpr(col 9:boolean, col 10:stringcol 12:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 9:boolean, ConstantVectorExpression(val Late 2000s) -> 10:string, IfExprStringScalarStringScalar(col 11:boolean, val Early 2010s, val Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 11:boolean) -> 12:string) -> 13:string) -> 14:string) -> 15:string, IfExprColumnCondExpr(col 16:boolean, col 17:stringcol 26:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 16:boolean, ConstantVectorExpression(val Old) -> 17:string, IfExprColumnCondExpr(col 18:boolean, col 19:stringcol 25:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 18:boolean, ConstantVectorExpression(val Early 2000s) -> 19:string, IfExprColumnCondExpr(col 20:boolean, col 21:stringcol 24:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 20:boolean, ConstantVectorExpression(val Late 2000s) -> 21:string, IfExprColumnNull(col 22:boolean, col 23:string, null)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 22:boolean, ConstantVectorExpression(val Early 2010s) -> 23:string) -> 24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 28:boolean, col 29:stringcol 36:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 28:boolean, ConstantVectorExpression(val Old) -> 29:string, IfExprColumnCondExpr(col 30:boolean, col 31:stringcol 35:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 30:boolean, ConstantVectorExpression(val Early 2000s) -> 31:string, IfExprColumnCondExpr(col 32:boolean, col 33:stringcol 34:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 32:boolean, ConstantVectorExpression(val Late 2000s) -> 33:string, IfExprNullNull(null, null) -> 34:string) -> 35:string) -> 36:string) -> 37:string, IfExprCondExprCondExpr(col 38:boolean, col 39:intcol 40:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 38:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 39:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 40:int) -> 41:int, IfExprStringGroupColumnStringScalar(col 42:boolean, col 2:string, val 2018-03-08 23:04:59)(children: SelectStringColLikeStringScalar(col 2:string) -> 42:boolean) -> 43:string, IfExprNullCondExpr(col 44:boolean, null, col 45:int)(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 44:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 45:int) -> 46:int, IfExprCondExprNull(col 49:boolean, col 50:int, null)(children: ColAndCol(col 47:boolean, col 48:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 47:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 48:boolean) -> 49:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 50:int) -> 51:int, IfExprCondExprCondExpr(col 54:boolean, col 55:datecol 56:date)(children: DoubleColGreaterDoubleScalar(col 53:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 52:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 52:double) -> 53:double) -> 54:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 55:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 56:date) -> 57:date + projectedOutputColumnNums: [1, 3, 15, 27, 36, 40, 42, 45, 50, 56, 2] + selectExpressions: IfExprColumnCondExpr(col 5:boolean, col 6:stringcol 14:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, ConstantVectorExpression(val 1800s or Earlier) -> 6:string, IfExprColumnCondExpr(col 7:boolean, col 8:stringcol 13:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 7:boolean, ConstantVectorExpression(val 1900s) -> 8:string, IfExprColumnCondExpr(col 9:boolean, col 10:stringcol 12:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 9:boolean, ConstantVectorExpression(val Late 2000s) -> 10:string, IfExprStringScalarStringScalar(col 11:boolean, val Early 2010s, val Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 11:boolean) -> 12:string) -> 13:string) -> 14:string) -> 15:string, IfExprColumnCondExpr(col 16:boolean, col 17:stringcol 26:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 16:boolean, ConstantVectorExpression(val Old) -> 17:string, IfExprColumnCondExpr(col 18:boolean, col 19:stringcol 25:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 18:boolean, ConstantVectorExpression(val Early 2000s) -> 19:string, IfExprColumnCondExpr(col 20:boolean, col 21:stringcol 24:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 20:boolean, ConstantVectorExpression(val Late 2000s) -> 21:string, IfExprColumnNull(col 22:boolean, col 23:string, null)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 22:boolean, ConstantVectorExpression(val Early 2010s) -> 23:string) -> 24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 28:boolean, col 29:stringcol 35:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 28:boolean, ConstantVectorExpression(val Old) -> 29:string, IfExprColumnCondExpr(col 30:boolean, col 31:stringcol 34:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 30:boolean, ConstantVectorExpression(val Early 2000s) -> 31:string, IfExprColumnNull(col 32:boolean, col 33:string, null)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 32:boolean, ConstantVectorExpression(val Late 2000s) -> 33:string) -> 34:string) -> 35:string) -> 36:string, IfExprCondExprCondExpr(col 37:boolean, col 38:intcol 39:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 37:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 38:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 39:int) -> 40:int, IfExprStringGroupColumnStringScalar(col 41:boolean, col 2:string, val 2018-03-08 23:04:59)(children: SelectStringColLikeStringScalar(col 2:string) -> 41:boolean) -> 42:string, IfExprNullCondExpr(col 43:boolean, null, col 44:int)(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 43:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 44:int) -> 45:int, IfExprCondExprNull(col 48:boolean, col 49:int, null)(children: ColAndCol(col 46:boolean, col 47:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 46:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 47:boolean) -> 48:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 49:int) -> 50:int, IfExprCondExprCondExpr(col 53:boolean, col 54:datecol 55:date)(children: DoubleColGreaterDoubleScalar(col 52:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 51:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 51:double) -> 52:double) -> 53:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 54:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 55:date) -> 56:date Statistics: Num rows: 51 Data size: 50745 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: timestamp), _col10 (type: string), _col1 (type: timestamp) @@ -738,7 +738,7 @@ STAGE PLANS: keyColumns: 1:timestamp, 2:string, 3:timestamp native: true nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true - valueColumns: 15:string, 27:string, 37:string, 41:int, 43:string, 46:int, 51:int, 57:date + valueColumns: 15:string, 27:string, 36:string, 40:int, 42:string, 45:int, 50:int, 56:date Statistics: Num rows: 51 Data size: 50745 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: int), _col8 (type: int), _col9 (type: date) Execution mode: vectorized, llap @@ -757,7 +757,7 @@ STAGE PLANS: includeColumns: [0, 1, 2, 3] dataColumns: cdate:date, ctimestamp1:timestamp, stimestamp1:string, ctimestamp2:timestamp partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, string, bigint, string, bigint, string, bigint, string, string, string, string, string, bigint, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, double, double, bigint, bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, string, bigint, string, bigint, string, bigint, string, string, string, string, bigint, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, double, double, bigint, bigint, bigint, bigint] Reducer 2 Execution mode: vectorized, llap Reduce Vectorization: diff --git ql/src/test/results/clientpositive/llap/vector_coalesce_3.q.out ql/src/test/results/clientpositive/llap/vector_coalesce_3.q.out index 493cfca23a..0a341490e1 100644 --- ql/src/test/results/clientpositive/llap/vector_coalesce_3.q.out +++ ql/src/test/results/clientpositive/llap/vector_coalesce_3.q.out @@ -162,13 +162,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:member:bigint, 1:attr:bigint, 2:ROW__ID:struct] Select Operator - expressions: member (type: bigint), CASE WHEN (CASE WHEN (attr is not null) THEN ((attr > 1L)) ELSE (true) END) THEN (attr) ELSE (null) END (type: bigint) + expressions: member (type: bigint), CASE WHEN (((attr > 1L) or attr is null)) THEN (attr) ELSE (null) END (type: bigint) outputColumnNames: _col0, _col1 Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [0, 7] - selectExpressions: IfExprColumnNull(col 6:boolean, col 1:bigint, null)(children: IfExprCondExprColumn(col 3:boolean, col 4:boolean, col 5:boolean)(children: IsNotNull(col 1:bigint) -> 3:boolean, LongColGreaterLongScalar(col 1:bigint, val 1) -> 4:boolean, ConstantVectorExpression(val 1) -> 5:boolean) -> 6:boolean, col 1:bigint) -> 7:bigint + projectedOutputColumnNums: [0, 6] + selectExpressions: IfExprColumnNull(col 5:boolean, col 1:bigint, null)(children: ColOrCol(col 3:boolean, col 4:boolean)(children: LongColGreaterLongScalar(col 1:bigint, val 1) -> 3:boolean, IsNull(col 1:bigint) -> 4:boolean) -> 5:boolean, col 1:bigint) -> 6:bigint Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: bigint) @@ -179,7 +179,7 @@ STAGE PLANS: keyColumns: 0:bigint native: true nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true - valueColumns: 7:bigint + valueColumns: 6:bigint Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col1 (type: bigint) Execution mode: vectorized, llap @@ -198,7 +198,7 @@ STAGE PLANS: includeColumns: [0, 1] dataColumns: member:bigint, attr:bigint partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint] Stage: Stage-0 Fetch Operator diff --git ql/src/test/results/clientpositive/llap/vector_decimal_math_funcs.q.out ql/src/test/results/clientpositive/llap/vector_decimal_math_funcs.q.out index b26fb62e17..90e638ea34 100644 --- ql/src/test/results/clientpositive/llap/vector_decimal_math_funcs.q.out +++ ql/src/test/results/clientpositive/llap/vector_decimal_math_funcs.q.out @@ -119,7 +119,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: decimal_test_n0 - filterExpr: (((cbigint % 500) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) + filterExpr: (((cbigint % 500L) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) Statistics: Num rows: 12289 Data size: 1100992 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -129,7 +129,7 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: FilterExprAndExpr(children: FilterLongColEqualLongScalar(col 5:bigint, val 0)(children: LongColModuloLongScalar(col 0:bigint, val 500) -> 5:bigint), FilterDoubleColGreaterEqualDoubleScalar(col 7:double, val -1.0)(children: FuncSinDoubleToDouble(col 6:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 6:double) -> 7:double)) - predicate: (((cbigint % 500) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) + predicate: (((cbigint % 500L) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) Statistics: Num rows: 2048 Data size: 183600 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: cdecimal1 (type: decimal(20,10)), round(cdecimal1, 2) (type: decimal(13,2)), round(cdecimal1) (type: decimal(11,0)), floor(cdecimal1) (type: decimal(11,0)), ceil(cdecimal1) (type: decimal(11,0)), round(exp(cdecimal1), 58) (type: double), ln(cdecimal1) (type: double), log10(cdecimal1) (type: double), log2(cdecimal1) (type: double), log2((cdecimal1 - 15601)) (type: double), log(2, cdecimal1) (type: double), power(log2(cdecimal1), 2) (type: double), power(log2(cdecimal1), 2) (type: double), sqrt(cdecimal1) (type: double), abs(cdecimal1) (type: decimal(20,10)), sin(cdecimal1) (type: double), asin(cdecimal1) (type: double), cos(cdecimal1) (type: double), acos(cdecimal1) (type: double), atan(cdecimal1) (type: double), degrees(cdecimal1) (type: double), radians(cdecimal1) (type: double), cdecimal1 (type: decimal(20,10)), (- cdecimal1) (type: decimal(20,10)), sign(cdecimal1) (type: int), cos(((- sin(log(cdecimal1))) + 3.14159D)) (type: double) @@ -370,7 +370,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: decimal_test_small - filterExpr: (((cbigint % 500) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) + filterExpr: (((cbigint % 500L) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) Statistics: Num rows: 12288 Data size: 1100992 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -380,7 +380,7 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: FilterExprAndExpr(children: FilterLongColEqualLongScalar(col 5:bigint, val 0)(children: LongColModuloLongScalar(col 0:bigint, val 500) -> 5:bigint), FilterDoubleColGreaterEqualDoubleScalar(col 8:double, val -1.0)(children: FuncSinDoubleToDouble(col 7:double)(children: CastDecimalToDouble(col 6:decimal(12,4))(children: ConvertDecimal64ToDecimal(col 2:decimal(12,4)/DECIMAL_64) -> 6:decimal(12,4)) -> 7:double) -> 8:double)) - predicate: (((cbigint % 500) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) + predicate: (((cbigint % 500L) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) Statistics: Num rows: 2048 Data size: 183600 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: cdecimal1 (type: decimal(12,4)), round(cdecimal1, 2) (type: decimal(11,2)), round(cdecimal1) (type: decimal(9,0)), floor(cdecimal1) (type: decimal(9,0)), ceil(cdecimal1) (type: decimal(9,0)), round(exp(cdecimal1), 58) (type: double), ln(cdecimal1) (type: double), log10(cdecimal1) (type: double), log2(cdecimal1) (type: double), log2((cdecimal1 - 15601)) (type: double), log(2, cdecimal1) (type: double), power(log2(cdecimal1), 2) (type: double), power(log2(cdecimal1), 2) (type: double), sqrt(cdecimal1) (type: double), abs(cdecimal1) (type: decimal(12,4)), sin(cdecimal1) (type: double), asin(cdecimal1) (type: double), cos(cdecimal1) (type: double), acos(cdecimal1) (type: double), atan(cdecimal1) (type: double), degrees(cdecimal1) (type: double), radians(cdecimal1) (type: double), cdecimal1 (type: decimal(12,4)), (- cdecimal1) (type: decimal(12,4)), sign(cdecimal1) (type: int), cos(((- sin(log(cdecimal1))) + 3.14159D)) (type: double) diff --git ql/src/test/results/clientpositive/llap/vector_groupby_mapjoin.q.out ql/src/test/results/clientpositive/llap/vector_groupby_mapjoin.q.out index c20bc71257..ddaf6d7115 100644 --- ql/src/test/results/clientpositive/llap/vector_groupby_mapjoin.q.out +++ ql/src/test/results/clientpositive/llap/vector_groupby_mapjoin.q.out @@ -93,8 +93,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterLongColEqualLongScalar(col 4:bigint, val 0), FilterExprAndExpr(children: SelectColumnIsNull(col 3:boolean), SelectColumnIsNotNull(col 0:string), FilterLongColGreaterEqualLongColumn(col 5:bigint, col 4:bigint))) - predicate: ((_col2 = 0L) or (_col5 is null and _col0 is not null and (_col3 >= _col2))) (type: boolean) + predicateExpression: FilterExprAndExpr(children: FilterExprOrExpr(children: SelectColumnIsNull(col 3:boolean), FilterLongColEqualLongScalar(col 4:bigint, val 0)), FilterExprOrExpr(children: SelectColumnIsNotNull(col 0:string), FilterLongColEqualLongScalar(col 4:bigint, val 0), SelectColumnIsNotNull(col 3:boolean)), FilterExprOrExpr(children: FilterLongColGreaterEqualLongColumn(col 5:bigint, col 4:bigint), FilterLongColEqualLongScalar(col 4:bigint, val 0), SelectColumnIsNotNull(col 3:boolean), SelectColumnIsNull(col 0:string))) + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col0 is null) and (_col0 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) Statistics: Num rows: 895 Data size: 175214 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: string) diff --git ql/src/test/results/clientpositive/llap/vectorization_0.q.out ql/src/test/results/clientpositive/llap/vectorization_0.q.out index ec0712b8bb..9fe775d649 100644 --- ql/src/test/results/clientpositive/llap/vectorization_0.q.out +++ ql/src/test/results/clientpositive/llap/vectorization_0.q.out @@ -30772,6 +30772,9 @@ POSTHOOK: query: explain extended select * from alltypesorc where POSTHOOK: type: QUERY POSTHOOK: Input: default@alltypesorc #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `ctinyint`, `csmallint`, `cint`, `cbigint`, `cfloat`, `cdouble`, `cstring1`, `cstring2`, `ctimestamp1`, `ctimestamp2`, `cboolean1`, `cboolean2` +FROM `default`.`alltypesorc` +WHERE ROW(`cint`, `cfloat`) IN (ROW(49, 3.5), ROW(47, 2.09), ROW(45, 3.02)) STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -31017,6 +31020,11 @@ POSTHOOK: query: explain extended select count(*),cstring1 from alltypesorc wher POSTHOOK: type: QUERY POSTHOOK: Input: default@alltypesorc #### A masked pattern was here #### +OPTIMIZED SQL: SELECT COUNT(*) AS `_o__c0`, `cstring1` +FROM `default`.`alltypesorc` +WHERE `cstring1` IN ('biology', 'history', 'topology') +GROUP BY `cstring1` +ORDER BY `cstring1` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 diff --git ql/src/test/results/clientpositive/llap/vectorization_5.q.out ql/src/test/results/clientpositive/llap/vectorization_5.q.out index 8fe415657c..573ae4fa22 100644 --- ql/src/test/results/clientpositive/llap/vectorization_5.q.out +++ ql/src/test/results/clientpositive/llap/vectorization_5.q.out @@ -62,7 +62,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((cboolean2 is not null and (cstring1 like '%b%')) or ((UDFToDouble(ctinyint) = cdouble) and ctimestamp2 is not null and (cstring2 like 'a'))) (type: boolean) + filterExpr: (((cstring1 like '%b%') and cboolean2 is not null) or ((UDFToDouble(ctinyint) = cdouble) and (cstring2 like 'a') and ctimestamp2 is not null)) (type: boolean) Statistics: Num rows: 12288 Data size: 2454862 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -71,8 +71,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: SelectColumnIsNotNull(col 11:boolean), FilterStringColLikeStringScalar(col 6:string, pattern %b%)), FilterExprAndExpr(children: FilterDoubleColEqualDoubleColumn(col 13:double, col 5:double)(children: CastLongToDouble(col 0:tinyint) -> 13:double), SelectColumnIsNotNull(col 9:timestamp), FilterStringColLikeStringScalar(col 7:string, pattern a))) - predicate: (((UDFToDouble(ctinyint) = cdouble) and ctimestamp2 is not null and (cstring2 like 'a')) or (cboolean2 is not null and (cstring1 like '%b%'))) (type: boolean) + predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: FilterStringColLikeStringScalar(col 6:string, pattern %b%), SelectColumnIsNotNull(col 11:boolean)), FilterExprAndExpr(children: FilterDoubleColEqualDoubleColumn(col 13:double, col 5:double)(children: CastLongToDouble(col 0:tinyint) -> 13:double), FilterStringColLikeStringScalar(col 7:string, pattern a), SelectColumnIsNotNull(col 9:timestamp))) + predicate: (((UDFToDouble(ctinyint) = cdouble) and (cstring2 like 'a') and ctimestamp2 is not null) or ((cstring1 like '%b%') and cboolean2 is not null)) (type: boolean) Statistics: Num rows: 7658 Data size: 1529972 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int) diff --git ql/src/test/results/clientpositive/llap/vectorization_8.q.out ql/src/test/results/clientpositive/llap/vectorization_8.q.out index 3959239dbe..7d0594ae8f 100644 --- ql/src/test/results/clientpositive/llap/vectorization_8.q.out +++ ql/src/test/results/clientpositive/llap/vectorization_8.q.out @@ -72,7 +72,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((cstring2 is not null and (UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D)) or (cfloat < -6432.0) or (cboolean1 is not null and (cdouble = 988888.0D))) (type: boolean) + filterExpr: (((UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D) and cstring2 is not null) or (cfloat < -6432.0) or ((cdouble = 988888.0D) and cboolean1 is not null)) (type: boolean) Statistics: Num rows: 12288 Data size: 2983078 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -81,8 +81,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: SelectColumnIsNotNull(col 7:string), FilterDoubleColLessEqualDoubleScalar(col 13:double, val 10.0)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 16.0)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: SelectColumnIsNotNull(col 10:boolean), FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0))) - predicate: ((cboolean1 is not null and (cdouble = 988888.0D)) or (cfloat < -6432.0) or (cstring2 is not null and (UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D))) (type: boolean) + predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: FilterDoubleColLessEqualDoubleScalar(col 13:double, val 10.0)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 16.0)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double), SelectColumnIsNotNull(col 7:string)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0), SelectColumnIsNotNull(col 10:boolean))) + predicate: (((UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D) and cstring2 is not null) or ((cdouble = 988888.0D) and cboolean1 is not null) or (cfloat < -6432.0)) (type: boolean) Statistics: Num rows: 3059 Data size: 742850 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: ctimestamp1 (type: timestamp), cdouble (type: double), cboolean1 (type: boolean), cstring1 (type: string), cfloat (type: float), (- cdouble) (type: double), (-5638.15D - cdouble) (type: double), (cdouble * -257.0D) (type: double), (UDFToFloat(cint) + cfloat) (type: float), ((- cdouble) + UDFToDouble(cbigint)) (type: double), (- cdouble) (type: double), (-1.389 - cfloat) (type: float), (- cfloat) (type: float), ((-5638.15D - cdouble) + UDFToDouble((UDFToFloat(cint) + cfloat))) (type: double) @@ -313,7 +313,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((cstring2 is not null and (UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D)) or (cfloat < -6432.0) or (cboolean1 is not null and (cdouble = 988888.0D))) (type: boolean) + filterExpr: (((UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D) and cstring2 is not null) or (cfloat < -6432.0) or ((cdouble = 988888.0D) and cboolean1 is not null)) (type: boolean) Statistics: Num rows: 12288 Data size: 2983078 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -321,8 +321,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: SelectColumnIsNotNull(col 7:string), FilterDoubleColLessEqualDoubleScalar(col 13:double, val 12.503)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 11.998)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: SelectColumnIsNotNull(col 10:boolean), FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0))) - predicate: ((cboolean1 is not null and (cdouble = 988888.0D)) or (cfloat < -6432.0) or (cstring2 is not null and (UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D))) (type: boolean) + predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: FilterDoubleColLessEqualDoubleScalar(col 13:double, val 12.503)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 11.998)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double), SelectColumnIsNotNull(col 7:string)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0), SelectColumnIsNotNull(col 10:boolean))) + predicate: (((UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D) and cstring2 is not null) or ((cdouble = 988888.0D) and cboolean1 is not null) or (cfloat < -6432.0)) (type: boolean) Statistics: Num rows: 3059 Data size: 742850 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: ctimestamp1 (type: timestamp), cdouble (type: double), cboolean1 (type: boolean), cstring1 (type: string), cfloat (type: float), (- cdouble) (type: double), (-5638.15D - cdouble) (type: double), (cdouble * -257.0D) (type: double), (UDFToFloat(cint) + cfloat) (type: float), ((- cdouble) + UDFToDouble(cbigint)) (type: double), (- cdouble) (type: double), (-1.389 - cfloat) (type: float), (- cfloat) (type: float), ((-5638.15D - cdouble) + UDFToDouble((UDFToFloat(cint) + cfloat))) (type: double) diff --git ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out index 19fd205106..38ca44b946 100644 --- ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out +++ ql/src/test/results/clientpositive/llap/vectorization_short_regress.q.out @@ -622,7 +622,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((ctimestamp1 = ctimestamp2) or (cfloat = 762.0) or (cstring1 = 'ss') or ((UDFToLong(csmallint) <= cbigint) and (cboolean2 = 1)) or (cboolean1 is not null and ctimestamp2 is not null and (cstring2 > 'a'))) (type: boolean) + filterExpr: ((ctimestamp1 = ctimestamp2) or (cfloat = 762.0) or (cstring1 = 'ss') or ((UDFToLong(csmallint) <= cbigint) and (cboolean2 = 1)) or ((cstring2 > 'a') and cboolean1 is not null and ctimestamp2 is not null)) (type: boolean) Statistics: Num rows: 12288 Data size: 3093170 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -630,8 +630,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterTimestampColEqualTimestampColumn(col 8:timestamp, col 9:timestamp), FilterDoubleColEqualDoubleScalar(col 4:float, val 762.0), FilterStringGroupColEqualStringScalar(col 6:string, val ss), FilterExprAndExpr(children: FilterLongColLessEqualLongColumn(col 1:bigint, col 3:bigint)(children: col 1:smallint), FilterLongColEqualLongScalar(col 11:boolean, val 1)), FilterExprAndExpr(children: SelectColumnIsNotNull(col 10:boolean), SelectColumnIsNotNull(col 9:timestamp), FilterStringGroupColGreaterStringScalar(col 7:string, val a))) - predicate: (((UDFToLong(csmallint) <= cbigint) and (cboolean2 = 1)) or (cboolean1 is not null and ctimestamp2 is not null and (cstring2 > 'a')) or (cfloat = 762.0) or (cstring1 = 'ss') or (ctimestamp1 = ctimestamp2)) (type: boolean) + predicateExpression: FilterExprOrExpr(children: FilterTimestampColEqualTimestampColumn(col 8:timestamp, col 9:timestamp), FilterDoubleColEqualDoubleScalar(col 4:float, val 762.0), FilterStringGroupColEqualStringScalar(col 6:string, val ss), FilterExprAndExpr(children: FilterLongColLessEqualLongColumn(col 1:bigint, col 3:bigint)(children: col 1:smallint), FilterLongColEqualLongScalar(col 11:boolean, val 1)), FilterExprAndExpr(children: FilterStringGroupColGreaterStringScalar(col 7:string, val a), SelectColumnIsNotNull(col 10:boolean), SelectColumnIsNotNull(col 9:timestamp))) + predicate: (((UDFToLong(csmallint) <= cbigint) and (cboolean2 = 1)) or ((cstring2 > 'a') and cboolean1 is not null and ctimestamp2 is not null) or (cfloat = 762.0) or (cstring1 = 'ss') or (ctimestamp1 = ctimestamp2)) (type: boolean) Statistics: Num rows: 11346 Data size: 2856120 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: cbigint (type: bigint), ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cdouble (type: double), UDFToDouble(cbigint) (type: double), (UDFToDouble(cbigint) * UDFToDouble(cbigint)) (type: double), UDFToDouble(csmallint) (type: double), (UDFToDouble(csmallint) * UDFToDouble(csmallint)) (type: double), (cdouble * cdouble) (type: double) @@ -2219,7 +2219,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((UDFToInteger(csmallint) >= -257) and ((UDFToInteger(csmallint) = -6432) or ((UDFToDouble(cint) >= cdouble) and (UDFToInteger(ctinyint) <= cint)))) (type: boolean) + filterExpr: ((UDFToInteger(csmallint) >= -257) and (UDFToDouble(cint) >= cdouble) and (UDFToInteger(ctinyint) <= cint)) (type: boolean) Statistics: Num rows: 12288 Data size: 256884 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -2227,9 +2227,9 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprAndExpr(children: FilterLongColGreaterEqualLongScalar(col 1:int, val -257)(children: col 1:smallint), FilterExprOrExpr(children: FilterLongColEqualLongScalar(col 1:int, val -6432)(children: col 1:smallint), FilterExprAndExpr(children: FilterDoubleColGreaterEqualDoubleColumn(col 13:double, col 5:double)(children: CastLongToDouble(col 2:int) -> 13:double), FilterLongColLessEqualLongColumn(col 0:int, col 2:int)(children: col 0:tinyint)))) - predicate: (((UDFToInteger(csmallint) = -6432) or ((UDFToDouble(cint) >= cdouble) and (UDFToInteger(ctinyint) <= cint))) and (UDFToInteger(csmallint) >= -257)) (type: boolean) - Statistics: Num rows: 2503 Data size: 52344 Basic stats: COMPLETE Column stats: COMPLETE + predicateExpression: FilterExprAndExpr(children: FilterLongColGreaterEqualLongScalar(col 1:int, val -257)(children: col 1:smallint), FilterDoubleColGreaterEqualDoubleColumn(col 13:double, col 5:double)(children: CastLongToDouble(col 2:int) -> 13:double), FilterLongColLessEqualLongColumn(col 0:int, col 2:int)(children: col 0:tinyint)) + predicate: ((UDFToDouble(cint) >= cdouble) and (UDFToInteger(csmallint) >= -257) and (UDFToInteger(ctinyint) <= cint)) (type: boolean) + Statistics: Num rows: 455 Data size: 9548 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: csmallint (type: smallint), cbigint (type: bigint), ctinyint (type: tinyint), UDFToDouble(csmallint) (type: double), (UDFToDouble(csmallint) * UDFToDouble(csmallint)) (type: double), UDFToDouble(ctinyint) (type: double), (UDFToDouble(ctinyint) * UDFToDouble(ctinyint)) (type: double) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 @@ -2238,7 +2238,7 @@ STAGE PLANS: native: true projectedOutputColumnNums: [1, 3, 0, 14, 17, 18, 21] selectExpressions: CastLongToDouble(col 1:smallint) -> 14:double, DoubleColMultiplyDoubleColumn(col 15:double, col 16:double)(children: CastLongToDouble(col 1:smallint) -> 15:double, CastLongToDouble(col 1:smallint) -> 16:double) -> 17:double, CastLongToDouble(col 0:tinyint) -> 18:double, DoubleColMultiplyDoubleColumn(col 19:double, col 20:double)(children: CastLongToDouble(col 0:tinyint) -> 19:double, CastLongToDouble(col 0:tinyint) -> 20:double) -> 21:double - Statistics: Num rows: 2503 Data size: 52344 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 455 Data size: 9548 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: sum(_col4), sum(_col3), count(_col0), sum(_col1), sum(_col6), sum(_col5), count(_col2), count() Group By Vectorization: @@ -2252,7 +2252,7 @@ STAGE PLANS: keys: _col0 (type: smallint) mode: hash outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 1251 Data size: 83804 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 227 Data size: 15212 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: smallint) sort order: + @@ -2261,7 +2261,7 @@ STAGE PLANS: className: VectorReduceSinkLongOperator native: true nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true - Statistics: Num rows: 1251 Data size: 83804 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 227 Data size: 15212 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col1 (type: double), _col2 (type: double), _col3 (type: bigint), _col4 (type: bigint), _col5 (type: double), _col6 (type: double), _col7 (type: bigint), _col8 (type: bigint) Execution mode: vectorized, llap LLAP IO: all inputs @@ -2296,7 +2296,7 @@ STAGE PLANS: keys: KEY._col0 (type: smallint) mode: mergepartial outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 1251 Data size: 83804 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 227 Data size: 15212 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: smallint), (UDFToInteger(_col0) % -75) (type: int), power(((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END), 0.5) (type: double), (-1.389 / CAST( _col0 AS decimal(5,0))) (type: decimal(10,9)), _col4 (type: bigint), (UDFToDouble((UDFToInteger(_col0) % -75)) / UDFToDouble(_col4)) (type: double), (- (UDFToInteger(_col0) % -75)) (type: int), ((_col5 - ((_col6 * _col6) / _col7)) / _col7) (type: double), (- (- (UDFToInteger(_col0) % -75))) (type: int), _col8 (type: bigint), (_col8 - -89010L) (type: bigint) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 @@ -2305,7 +2305,7 @@ STAGE PLANS: native: true projectedOutputColumnNums: [0, 9, 17, 19, 4, 23, 25, 29, 32, 8, 33] selectExpressions: LongColModuloLongScalar(col 0:int, val -75)(children: col 0:smallint) -> 9:int, FuncPowerDoubleToDouble(col 16:double)(children: DoubleColDivideLongColumn(col 12:double, col 15:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 11:double)(children: DoubleColDivideLongColumn(col 10:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 10:double) -> 11:double) -> 12:double, IfExprNullCondExpr(col 13:boolean, null, col 14:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 13:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 14:bigint) -> 15:bigint) -> 16:double) -> 17:double, DecimalScalarDivideDecimalColumn(val -1.389, col 18:decimal(5,0))(children: CastLongToDecimal(col 0:smallint) -> 18:decimal(5,0)) -> 19:decimal(10,9), DoubleColDivideDoubleColumn(col 21:double, col 22:double)(children: CastLongToDouble(col 20:int)(children: LongColModuloLongScalar(col 0:int, val -75)(children: col 0:smallint) -> 20:int) -> 21:double, CastLongToDouble(col 4:bigint) -> 22:double) -> 23:double, LongColUnaryMinus(col 24:int)(children: LongColModuloLongScalar(col 0:int, val -75)(children: col 0:smallint) -> 24:int) -> 25:int, DoubleColDivideLongColumn(col 28:double, col 7:bigint)(children: DoubleColSubtractDoubleColumn(col 5:double, col 27:double)(children: DoubleColDivideLongColumn(col 26:double, col 7:bigint)(children: DoubleColMultiplyDoubleColumn(col 6:double, col 6:double) -> 26:double) -> 27:double) -> 28:double) -> 29:double, LongColUnaryMinus(col 31:int)(children: LongColUnaryMinus(col 30:int)(children: LongColModuloLongScalar(col 0:int, val -75)(children: col 0:smallint) -> 30:int) -> 31:int) -> 32:int, LongColSubtractLongScalar(col 8:bigint, val -89010) -> 33:bigint - Statistics: Num rows: 1251 Data size: 218912 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 227 Data size: 39728 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: smallint), _col1 (type: int), _col2 (type: double), _col3 (type: decimal(10,9)), _col4 (type: bigint), _col5 (type: double), _col6 (type: int), _col7 (type: double), _col8 (type: int), _col9 (type: bigint), _col10 (type: bigint) sort order: +++++++++++ @@ -2313,7 +2313,7 @@ STAGE PLANS: className: VectorReduceSinkObjectHashOperator native: true nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true - Statistics: Num rows: 1251 Data size: 218912 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 227 Data size: 39728 Basic stats: COMPLETE Column stats: COMPLETE TopN Hash Memory Usage: 0.1 Reducer 3 Execution mode: vectorized, llap @@ -2331,7 +2331,7 @@ STAGE PLANS: className: VectorSelectOperator native: true projectedOutputColumnNums: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] - Statistics: Num rows: 1251 Data size: 218912 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 227 Data size: 39728 Basic stats: COMPLETE Column stats: COMPLETE Limit Number of rows: 20 Limit Vectorization: diff --git ql/src/test/results/clientpositive/llap/vectorized_casts.q.out ql/src/test/results/clientpositive/llap/vectorized_casts.q.out index d1a9620186..0d21c2ac8a 100644 --- ql/src/test/results/clientpositive/llap/vectorized_casts.q.out +++ ql/src/test/results/clientpositive/llap/vectorized_casts.q.out @@ -169,7 +169,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((cbigint % 250) = 0) (type: boolean) + filterExpr: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 12288 Data size: 1684250 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -179,7 +179,7 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: FilterLongColEqualLongScalar(col 13:bigint, val 0)(children: LongColModuloLongScalar(col 3:bigint, val 250) -> 13:bigint) - predicate: ((cbigint % 250) = 0) (type: boolean) + predicate: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 6144 Data size: 842180 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: UDFToBoolean(ctinyint) (type: boolean), UDFToBoolean(csmallint) (type: boolean), UDFToBoolean(cint) (type: boolean), UDFToBoolean(cbigint) (type: boolean), UDFToBoolean(cfloat) (type: boolean), UDFToBoolean(cdouble) (type: boolean), cboolean1 (type: boolean), UDFToBoolean((cbigint * 0L)) (type: boolean), UDFToBoolean(ctimestamp1) (type: boolean), UDFToBoolean(cstring1) (type: boolean), UDFToInteger(ctinyint) (type: int), UDFToInteger(csmallint) (type: int), cint (type: int), UDFToInteger(cbigint) (type: int), UDFToInteger(cfloat) (type: int), UDFToInteger(cdouble) (type: int), UDFToInteger(cboolean1) (type: int), UDFToInteger(ctimestamp1) (type: int), UDFToInteger(cstring1) (type: int), UDFToInteger(substr(cstring1, 1, 1)) (type: int), UDFToByte(cfloat) (type: tinyint), UDFToShort(cfloat) (type: smallint), UDFToLong(cfloat) (type: bigint), UDFToDouble(ctinyint) (type: double), UDFToDouble(csmallint) (type: double), UDFToDouble(cint) (type: double), UDFToDouble(cbigint) (type: double), UDFToDouble(cfloat) (type: double), cdouble (type: double), UDFToDouble(cboolean1) (type: double), UDFToDouble(ctimestamp1) (type: double), UDFToDouble(cstring1) (type: double), UDFToDouble(substr(cstring1, 1, 1)) (type: double), UDFToFloat(cint) (type: float), UDFToFloat(cdouble) (type: float), CAST( ctinyint AS TIMESTAMP) (type: timestamp), CAST( csmallint AS TIMESTAMP) (type: timestamp), CAST( cint AS TIMESTAMP) (type: timestamp), CAST( cbigint AS TIMESTAMP) (type: timestamp), CAST( cfloat AS TIMESTAMP) (type: timestamp), CAST( cdouble AS TIMESTAMP) (type: timestamp), CAST( cboolean1 AS TIMESTAMP) (type: timestamp), CAST( (cbigint * 0L) AS TIMESTAMP) (type: timestamp), CAST( CAST( ctimestamp1 AS DATE) AS TIMESTAMP) (type: timestamp), ctimestamp1 (type: timestamp), CAST( cstring1 AS TIMESTAMP) (type: timestamp), CAST( substr(cstring1, 1, 1) AS TIMESTAMP) (type: timestamp), CAST( ctinyint AS STRING) (type: string), CAST( csmallint AS STRING) (type: string), CAST( cint AS STRING) (type: string), CAST( cbigint AS STRING) (type: string), CAST( cfloat AS STRING) (type: string), CAST( cdouble AS STRING) (type: string), CAST( cboolean1 AS STRING) (type: string), CAST( (cbigint * 0L) AS STRING) (type: string), CAST( ctimestamp1 AS STRING) (type: string), cstring1 (type: string), CAST( CAST( cstring1 AS CHAR(10)) AS STRING) (type: string), CAST( CAST( cstring1 AS varchar(10)) AS STRING) (type: string), UDFToFloat(UDFToInteger(cfloat)) (type: float), UDFToDouble((cint * 2)) (type: double), CAST( sin(cfloat) AS STRING) (type: string), (UDFToDouble(UDFToFloat(cint)) + UDFToDouble(cboolean1)) (type: double) diff --git ql/src/test/results/clientpositive/llap/vectorized_math_funcs.q.out ql/src/test/results/clientpositive/llap/vectorized_math_funcs.q.out index 63b42fde3a..26472f7f1d 100644 --- ql/src/test/results/clientpositive/llap/vectorized_math_funcs.q.out +++ ql/src/test/results/clientpositive/llap/vectorized_math_funcs.q.out @@ -123,7 +123,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: (((cbigint % 500) = 0) and (sin(cfloat) >= -1.0D)) (type: boolean) + filterExpr: (((cbigint % 500L) = 0) and (sin(cfloat) >= -1.0D)) (type: boolean) Statistics: Num rows: 12288 Data size: 293580 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -132,7 +132,7 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: FilterExprAndExpr(children: FilterLongColEqualLongScalar(col 13:bigint, val 0)(children: LongColModuloLongScalar(col 3:bigint, val 500) -> 13:bigint), FilterDoubleColGreaterEqualDoubleScalar(col 14:double, val -1.0)(children: FuncSinDoubleToDouble(col 4:float) -> 14:double)) - predicate: (((cbigint % 500) = 0) and (sin(cfloat) >= -1.0D)) (type: boolean) + predicate: (((cbigint % 500L) = 0) and (sin(cfloat) >= -1.0D)) (type: boolean) Statistics: Num rows: 2048 Data size: 48960 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: cdouble (type: double), round(cdouble, 2) (type: double), floor(cdouble) (type: bigint), ceil(cdouble) (type: bigint), rand() (type: double), rand(98007) (type: double), exp(ln(cdouble)) (type: double), ln(cdouble) (type: double), ln(cfloat) (type: double), log10(cdouble) (type: double), log2(cdouble) (type: double), log2((cdouble - 15601.0D)) (type: double), log2(cfloat) (type: double), log2(cbigint) (type: double), log2(cint) (type: double), log2(csmallint) (type: double), log2(ctinyint) (type: double), log(2, cdouble) (type: double), power(log2(cdouble), 2) (type: double), power(log2(cdouble), 2) (type: double), sqrt(cdouble) (type: double), sqrt(cbigint) (type: double), bin(cbigint) (type: string), hex(cdouble) (type: string), conv(cbigint, 10, 16) (type: string), abs(cdouble) (type: double), abs(ctinyint) (type: int), (cint pmod 3) (type: int), sin(cdouble) (type: double), asin(cdouble) (type: double), cos(cdouble) (type: double), acos(cdouble) (type: double), atan(cdouble) (type: double), degrees(cdouble) (type: double), radians(cdouble) (type: double), cdouble (type: double), cbigint (type: bigint), (- cdouble) (type: double), sign(cdouble) (type: double), sign(cbigint) (type: double), cos(((- sin(log(cdouble))) + 3.14159D)) (type: double) diff --git ql/src/test/results/clientpositive/llap/vectorized_string_funcs.q.out ql/src/test/results/clientpositive/llap/vectorized_string_funcs.q.out index 7a5073577e..1d3fa093a3 100644 --- ql/src/test/results/clientpositive/llap/vectorized_string_funcs.q.out +++ ql/src/test/results/clientpositive/llap/vectorized_string_funcs.q.out @@ -63,10 +63,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: (((cbigint % 237) = 0) and (length(substr(cstring1, 1, 2)) <= 2) and (cstring1 like '%')) (type: boolean) + filterExpr: (((cbigint % 237L) = 0) and (length(substr(cstring1, 1, 2)) <= 2) and (cstring1 like '%')) (type: boolean) Statistics: Num rows: 12288 Data size: 1816546 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (((cbigint % 237) = 0) and (cstring1 like '%') and (length(substr(cstring1, 1, 2)) <= 2)) (type: boolean) + predicate: (((cbigint % 237L) = 0) and (cstring1 like '%') and (length(substr(cstring1, 1, 2)) <= 2)) (type: boolean) Statistics: Num rows: 1024 Data size: 151470 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: substr(cstring1, 1, 2) (type: string), substr(cstring1, 2) (type: string), lower(cstring1) (type: string), upper(cstring1) (type: string), upper(cstring1) (type: string), length(cstring1) (type: int), trim(cstring1) (type: string), ltrim(cstring1) (type: string), rtrim(cstring1) (type: string), concat(cstring1, cstring2) (type: string), concat('>', cstring1) (type: string), concat(cstring1, '<') (type: string), concat(substr(cstring1, 1, 2), substr(cstring2, 1, 2)) (type: string) diff --git ql/src/test/results/clientpositive/llap/vectorized_timestamp_ints_casts.q.out ql/src/test/results/clientpositive/llap/vectorized_timestamp_ints_casts.q.out index c52e3b9e94..43edbcff24 100644 --- ql/src/test/results/clientpositive/llap/vectorized_timestamp_ints_casts.q.out +++ ql/src/test/results/clientpositive/llap/vectorized_timestamp_ints_casts.q.out @@ -55,7 +55,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((cbigint % 250) = 0) (type: boolean) + filterExpr: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 12288 Data size: 1684250 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -64,7 +64,7 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: FilterLongColEqualLongScalar(col 13:bigint, val 0)(children: LongColModuloLongScalar(col 3:bigint, val 250) -> 13:bigint) - predicate: ((cbigint % 250) = 0) (type: boolean) + predicate: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 6144 Data size: 842180 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: CAST( ctinyint AS TIMESTAMP) (type: timestamp), CAST( csmallint AS TIMESTAMP) (type: timestamp), CAST( cint AS TIMESTAMP) (type: timestamp), CAST( cbigint AS TIMESTAMP) (type: timestamp), CAST( cfloat AS TIMESTAMP) (type: timestamp), CAST( cdouble AS TIMESTAMP) (type: timestamp), CAST( cboolean1 AS TIMESTAMP) (type: timestamp), CAST( (cbigint * 0L) AS TIMESTAMP) (type: timestamp), ctimestamp1 (type: timestamp), CAST( cstring1 AS TIMESTAMP) (type: timestamp), CAST( substr(cstring1, 1, 1) AS TIMESTAMP) (type: timestamp) @@ -224,7 +224,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((cbigint % 250) = 0) (type: boolean) + filterExpr: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 12288 Data size: 1684250 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -233,7 +233,7 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: FilterLongColEqualLongScalar(col 13:bigint, val 0)(children: LongColModuloLongScalar(col 3:bigint, val 250) -> 13:bigint) - predicate: ((cbigint % 250) = 0) (type: boolean) + predicate: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 6144 Data size: 842180 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: CAST( ctinyint AS TIMESTAMP) (type: timestamp), CAST( csmallint AS TIMESTAMP) (type: timestamp), CAST( cint AS TIMESTAMP) (type: timestamp), CAST( cbigint AS TIMESTAMP) (type: timestamp), CAST( cfloat AS TIMESTAMP) (type: timestamp), CAST( cdouble AS TIMESTAMP) (type: timestamp), CAST( cboolean1 AS TIMESTAMP) (type: timestamp), CAST( (cbigint * 0L) AS TIMESTAMP) (type: timestamp), ctimestamp1 (type: timestamp), CAST( cstring1 AS TIMESTAMP) (type: timestamp), CAST( substr(cstring1, 1, 1) AS TIMESTAMP) (type: timestamp) diff --git ql/src/test/results/clientpositive/mergejoin.q.out ql/src/test/results/clientpositive/mergejoin.q.out index 84bcd42a7e..4002c4af48 100644 --- ql/src/test/results/clientpositive/mergejoin.q.out +++ ql/src/test/results/clientpositive/mergejoin.q.out @@ -3358,7 +3358,6 @@ POSTHOOK: Input: default@tab_part_n10@ds=2008-04-08 #### A masked pattern was here #### NULL NULL NULL 98 val_98 2008-04-08 NULL NULL NULL 98 val_98 2008-04-08 -Warning: Shuffle Join JOIN[14][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Stage-2:MAPRED' is a cross product Warning: Shuffle Join JOIN[11][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product PREHOOK: query: select * from (select * from tab_n9 where tab_n9.key = 0)a @@ -3928,8 +3927,7 @@ NULL NULL NULL NULL NULL NULL 97 val_97 2008-04-08 NULL NULL NULL NULL NULL NULL 97 val_97 2008-04-08 NULL NULL NULL NULL NULL NULL 98 val_98 2008-04-08 NULL NULL NULL NULL NULL NULL 98 val_98 2008-04-08 -Warning: Shuffle Join JOIN[14][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product -Warning: Shuffle Join JOIN[10][tables = [$hdt$_1, $hdt$_2]] in Stage 'Stage-2:MAPRED' is a cross product +Warning: Shuffle Join JOIN[10][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product PREHOOK: query: select * from (select * from tab_n9 where tab_n9.key = 0)a join diff --git ql/src/test/results/clientpositive/optimize_filter_literal.q.out ql/src/test/results/clientpositive/optimize_filter_literal.q.out index 6eb573a400..4ef0f51375 100644 --- ql/src/test/results/clientpositive/optimize_filter_literal.q.out +++ ql/src/test/results/clientpositive/optimize_filter_literal.q.out @@ -136,7 +136,6 @@ POSTHOOK: Input: default@tab_n14@ds=2008-04-08 POSTHOOK: Output: default@tab_n14 POSTHOOK: Output: default@tab_n14@ds=2008-04-08 #### A masked pattern was here #### -Warning: Shuffle Join JOIN[14][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Stage-2:MAPRED' is a cross product Warning: Shuffle Join JOIN[11][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product PREHOOK: query: select * from (select * from tab_n14 where tab_n14.key = 0)a diff --git ql/src/test/results/clientpositive/parquet_vectorization_0.q.out ql/src/test/results/clientpositive/parquet_vectorization_0.q.out index c83b6e6a4d..4449d02ec9 100644 --- ql/src/test/results/clientpositive/parquet_vectorization_0.q.out +++ ql/src/test/results/clientpositive/parquet_vectorization_0.q.out @@ -30572,6 +30572,9 @@ POSTHOOK: query: explain extended select * from alltypesparquet where POSTHOOK: type: QUERY POSTHOOK: Input: default@alltypesparquet #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `ctinyint`, `csmallint`, `cint`, `cbigint`, `cfloat`, `cdouble`, `cstring1`, `cstring2`, `ctimestamp1`, `ctimestamp2`, `cboolean1`, `cboolean2` +FROM `default`.`alltypesparquet` +WHERE ROW(`cint`, `cfloat`) IN (ROW(49, 3.5), ROW(47, 2.09), ROW(45, 3.02)) STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -30808,6 +30811,11 @@ POSTHOOK: query: explain extended select count(*),cstring1 from alltypesparquet POSTHOOK: type: QUERY POSTHOOK: Input: default@alltypesparquet #### A masked pattern was here #### +OPTIMIZED SQL: SELECT COUNT(*) AS `_o__c0`, `cstring1` +FROM `default`.`alltypesparquet` +WHERE `cstring1` IN ('biology', 'history', 'topology') +GROUP BY `cstring1` +ORDER BY `cstring1` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-2 depends on stages: Stage-1 diff --git ql/src/test/results/clientpositive/parquet_vectorization_5.q.out ql/src/test/results/clientpositive/parquet_vectorization_5.q.out index 3e5cfd7dc3..ed6d871cd2 100644 --- ql/src/test/results/clientpositive/parquet_vectorization_5.q.out +++ ql/src/test/results/clientpositive/parquet_vectorization_5.q.out @@ -56,7 +56,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesparquet - filterExpr: ((cboolean2 is not null and (cstring1 like '%b%')) or ((UDFToDouble(ctinyint) = cdouble) and ctimestamp2 is not null and (cstring2 like 'a'))) (type: boolean) + filterExpr: (((cstring1 like '%b%') and cboolean2 is not null) or ((UDFToDouble(ctinyint) = cdouble) and (cstring2 like 'a') and ctimestamp2 is not null)) (type: boolean) Statistics: Num rows: 12288 Data size: 2454862 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -64,8 +64,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: SelectColumnIsNotNull(col 11:boolean), FilterStringColLikeStringScalar(col 6:string, pattern %b%)), FilterExprAndExpr(children: FilterDoubleColEqualDoubleColumn(col 13:double, col 5:double)(children: CastLongToDouble(col 0:tinyint) -> 13:double), SelectColumnIsNotNull(col 9:timestamp), FilterStringColLikeStringScalar(col 7:string, pattern a))) - predicate: (((UDFToDouble(ctinyint) = cdouble) and ctimestamp2 is not null and (cstring2 like 'a')) or (cboolean2 is not null and (cstring1 like '%b%'))) (type: boolean) + predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: FilterStringColLikeStringScalar(col 6:string, pattern %b%), SelectColumnIsNotNull(col 11:boolean)), FilterExprAndExpr(children: FilterDoubleColEqualDoubleColumn(col 13:double, col 5:double)(children: CastLongToDouble(col 0:tinyint) -> 13:double), FilterStringColLikeStringScalar(col 7:string, pattern a), SelectColumnIsNotNull(col 9:timestamp))) + predicate: (((UDFToDouble(ctinyint) = cdouble) and (cstring2 like 'a') and ctimestamp2 is not null) or ((cstring1 like '%b%') and cboolean2 is not null)) (type: boolean) Statistics: Num rows: 7658 Data size: 1529972 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int) diff --git ql/src/test/results/clientpositive/parquet_vectorization_8.q.out ql/src/test/results/clientpositive/parquet_vectorization_8.q.out index 112f63392a..3285996358 100644 --- ql/src/test/results/clientpositive/parquet_vectorization_8.q.out +++ ql/src/test/results/clientpositive/parquet_vectorization_8.q.out @@ -66,7 +66,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesparquet - filterExpr: ((cstring2 is not null and (UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D)) or (cfloat < -6432.0) or (cboolean1 is not null and (cdouble = 988888.0D))) (type: boolean) + filterExpr: (((UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D) and cstring2 is not null) or (cfloat < -6432.0) or ((cdouble = 988888.0D) and cboolean1 is not null)) (type: boolean) Statistics: Num rows: 12288 Data size: 2983078 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -74,8 +74,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: SelectColumnIsNotNull(col 7:string), FilterDoubleColLessEqualDoubleScalar(col 13:double, val 10.0)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 16.0)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: SelectColumnIsNotNull(col 10:boolean), FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0))) - predicate: ((cboolean1 is not null and (cdouble = 988888.0D)) or (cfloat < -6432.0) or (cstring2 is not null and (UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D))) (type: boolean) + predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: FilterDoubleColLessEqualDoubleScalar(col 13:double, val 10.0)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 16.0)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double), SelectColumnIsNotNull(col 7:string)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0), SelectColumnIsNotNull(col 10:boolean))) + predicate: (((UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D) and cstring2 is not null) or ((cdouble = 988888.0D) and cboolean1 is not null) or (cfloat < -6432.0)) (type: boolean) Statistics: Num rows: 3059 Data size: 742850 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: ctimestamp1 (type: timestamp), cdouble (type: double), cboolean1 (type: boolean), cstring1 (type: string), cfloat (type: float), (- cdouble) (type: double), (-5638.15D - cdouble) (type: double), (cdouble * -257.0D) (type: double), (UDFToFloat(cint) + cfloat) (type: float), ((- cdouble) + UDFToDouble(cbigint)) (type: double), (- cdouble) (type: double), (-1.389 - cfloat) (type: float), (- cfloat) (type: float), ((-5638.15D - cdouble) + UDFToDouble((UDFToFloat(cint) + cfloat))) (type: double) @@ -272,7 +272,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesparquet - filterExpr: ((cstring2 is not null and (UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D)) or (cfloat < -6432.0) or (cboolean1 is not null and (cdouble = 988888.0D))) (type: boolean) + filterExpr: (((UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D) and cstring2 is not null) or (cfloat < -6432.0) or ((cdouble = 988888.0D) and cboolean1 is not null)) (type: boolean) Statistics: Num rows: 12288 Data size: 2983078 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -280,8 +280,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: SelectColumnIsNotNull(col 7:string), FilterDoubleColLessEqualDoubleScalar(col 13:double, val 12.503)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 11.998)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: SelectColumnIsNotNull(col 10:boolean), FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0))) - predicate: ((cboolean1 is not null and (cdouble = 988888.0D)) or (cfloat < -6432.0) or (cstring2 is not null and (UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D))) (type: boolean) + predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: FilterDoubleColLessEqualDoubleScalar(col 13:double, val 12.503)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 11.998)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double), SelectColumnIsNotNull(col 7:string)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0), SelectColumnIsNotNull(col 10:boolean))) + predicate: (((UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D) and cstring2 is not null) or ((cdouble = 988888.0D) and cboolean1 is not null) or (cfloat < -6432.0)) (type: boolean) Statistics: Num rows: 3059 Data size: 742850 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: ctimestamp1 (type: timestamp), cdouble (type: double), cboolean1 (type: boolean), cstring1 (type: string), cfloat (type: float), (- cdouble) (type: double), (-5638.15D - cdouble) (type: double), (cdouble * -257.0D) (type: double), (UDFToFloat(cint) + cfloat) (type: float), ((- cdouble) + UDFToDouble(cbigint)) (type: double), (- cdouble) (type: double), (-1.389 - cfloat) (type: float), (- cfloat) (type: float), ((-5638.15D - cdouble) + UDFToDouble((UDFToFloat(cint) + cfloat))) (type: double) diff --git ql/src/test/results/clientpositive/pcr.q.out ql/src/test/results/clientpositive/pcr.q.out index f8fe477e6b..0f509c6c3c 100644 --- ql/src/test/results/clientpositive/pcr.q.out +++ ql/src/test/results/clientpositive/pcr.q.out @@ -1522,6 +1522,11 @@ POSTHOOK: Input: default@pcr_t1 POSTHOOK: Input: default@pcr_t1@ds=2000-04-08 POSTHOOK: Input: default@pcr_t1@ds=2000-04-09 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT CAST(14 AS INTEGER) AS `key`, `value` +FROM (SELECT `value` +FROM `default`.`pcr_t1` +WHERE `ds` IN ('2000-04-08', '2000-04-09') AND `key` = 14 +ORDER BY `value`) AS `t1` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1712,6 +1717,10 @@ POSTHOOK: Input: default@pcr_t1 POSTHOOK: Input: default@pcr_t1@ds=2000-04-08 POSTHOOK: Input: default@pcr_t1@ds=2000-04-09 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value` +FROM `default`.`pcr_t1` +WHERE `ds` IN ('2000-04-08', '2000-04-09') +ORDER BY `key`, `value` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1942,7 +1951,7 @@ POSTHOOK: Input: default@pcr_t1@ds=2000-04-10 #### A masked pattern was here #### OPTIMIZED SQL: SELECT `key`, `value` FROM `default`.`pcr_t1` -WHERE `ds` >= '2000-04-08' OR `ds` IS NOT NULL +WHERE `ds` >= '2000-04-08' OR `ds` < '2000-04-10' ORDER BY `key`, `value` STAGE DEPENDENCIES: Stage-1 is a root stage @@ -1954,7 +1963,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: pcr_t1 - filterExpr: ((ds >= '2000-04-08') or ds is not null) (type: boolean) + filterExpr: ((ds >= '2000-04-08') or (ds < '2000-04-10')) (type: boolean) Statistics: Num rows: 60 Data size: 5640 Basic stats: COMPLETE Column stats: PARTIAL GatherStats: false Select Operator @@ -2241,6 +2250,10 @@ POSTHOOK: Input: default@pcr_t1 POSTHOOK: Input: default@pcr_t1@ds=2000-04-08 POSTHOOK: Input: default@pcr_t1@ds=2000-04-09 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, `ds` +FROM `default`.`pcr_t1` +WHERE ROW(`key`, `ds`) IN (ROW(1, '2000-04-08'), ROW(2, '2000-04-09')) +ORDER BY `key`, `value`, `ds` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -2430,7 +2443,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@pcr_t1 POSTHOOK: Input: default@pcr_t1@ds=2000-04-08 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS STRING) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-08' AS STRING) AS `ds1` +OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds1` FROM (SELECT * FROM (SELECT `key`, `value` FROM `default`.`pcr_t1` @@ -2710,7 +2723,7 @@ POSTHOOK: Input: default@pcr_t1 POSTHOOK: Input: default@pcr_t1@ds=2000-04-08 POSTHOOK: Input: default@pcr_t1@ds=2000-04-09 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS STRING) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-09' AS STRING) AS `ds1` +OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-09' AS VARCHAR(65536)) AS `ds1` FROM (SELECT * FROM (SELECT `key`, `value` FROM `default`.`pcr_t1` @@ -5048,6 +5061,11 @@ POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds`, `hr` +FROM (SELECT `key`, `value`, `hr` +FROM `default`.`srcpart` +WHERE `hr` IN ('11', '12') AND `ds` = '2008-04-08' AND `key` = 11 +ORDER BY `key`, `hr`) AS `t1` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -5243,7 +5261,7 @@ POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `key`, `value`, `ds`, CAST('11' AS STRING) AS `hr` +OPTIMIZED SQL: SELECT `key`, `value`, `ds`, CAST('11' AS VARCHAR(65536)) AS `hr` FROM (SELECT `key`, `value`, `ds` FROM `default`.`srcpart` WHERE `hr` = '11' AND `key` = 11 diff --git ql/src/test/results/clientpositive/pcs.q.out ql/src/test/results/clientpositive/pcs.q.out index 1923af78a7..993f3e4e1f 100644 --- ql/src/test/results/clientpositive/pcs.q.out +++ ql/src/test/results/clientpositive/pcs.q.out @@ -98,6 +98,10 @@ POSTHOOK: Input: default@pcs_t1 POSTHOOK: Input: default@pcs_t1@ds=2000-04-08 POSTHOOK: Input: default@pcs_t1@ds=2000-04-09 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, `ds` +FROM `default`.`pcs_t1` +WHERE ROW(`key`, `ds`) IN (ROW(1, '2000-04-08'), ROW(2, '2000-04-09')) +ORDER BY `key`, `value`, `ds` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -289,6 +293,9 @@ POSTHOOK: Input: default@pcs_t1 POSTHOOK: Input: default@pcs_t1@ds=2000-04-08 POSTHOOK: Input: default@pcs_t1@ds=2000-04-09 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `ds` +FROM `default`.`pcs_t1` +WHERE ROW(`key`, `ds`) IN (ROW(1, '2000-04-08'), ROW(2, '2000-04-09')) STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -467,6 +474,9 @@ POSTHOOK: Input: default@pcs_t1 POSTHOOK: Input: default@pcs_t1@ds=2000-04-08 POSTHOOK: Input: default@pcs_t1@ds=2000-04-09 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `ds` +FROM `default`.`pcs_t1` +WHERE ROW(`ds`, `key` + 2) IN (ROW('2000-04-08', 3), ROW('2000-04-09', 4)) STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -866,6 +876,9 @@ POSTHOOK: Input: default@pcs_t1 POSTHOOK: Input: default@pcs_t1@ds=2000-04-08 POSTHOOK: Input: default@pcs_t1@ds=2000-04-09 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `ds` +FROM `default`.`pcs_t1` +WHERE ROW(`ds`, `key` + `key`) IN (ROW('2000-04-08', 1), ROW('2000-04-09', 2)) STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1272,9 +1285,9 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@pcs_t1 POSTHOOK: Input: default@pcs_t1@ds=2000-04-08 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('2000-04-08' AS STRING) AS `$f0` +OPTIMIZED SQL: SELECT `ds` FROM `default`.`pcs_t1` -WHERE `ds` = '2000-04-08' +WHERE `ds` = '2000-04-08' IS TRUE STAGE DEPENDENCIES: Stage-0 is a root stage @@ -1332,13 +1345,13 @@ STAGE PLANS: Processor Tree: TableScan alias: pcs_t1 - filterExpr: (ds = '2000-04-08') (type: boolean) - Statistics: Num rows: 20 Data size: 320 Basic stats: COMPLETE Column stats: COMPLETE + filterExpr: true is true (type: boolean) + Statistics: Num rows: 20 Data size: 3840 Basic stats: COMPLETE Column stats: COMPLETE GatherStats: false Select Operator - expressions: '2000-04-08' (type: string) + expressions: ds (type: string) outputColumnNames: _col0 - Statistics: Num rows: 20 Data size: 1880 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 20 Data size: 3680 Basic stats: COMPLETE Column stats: COMPLETE ListSink PREHOOK: query: select ds from pcs_t1 where struct(case when ds='2000-04-08' then 10 else 20 end) in (struct(10),struct(11)) @@ -1383,6 +1396,9 @@ POSTHOOK: Input: default@pcs_t1 POSTHOOK: Input: default@pcs_t1@ds=2000-04-08 POSTHOOK: Input: default@pcs_t1@ds=2000-04-09 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `ds` +FROM `default`.`pcs_t1` +WHERE ROW(`ds`, `key`, RAND(100)) IN (ROW('2000-04-08', 1, 0.2), ROW('2000-04-09', 2, 0.3)) STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1549,6 +1565,9 @@ POSTHOOK: Input: default@pcs_t1@ds=2000-04-08 POSTHOOK: Input: default@pcs_t1@ds=2000-04-09 POSTHOOK: Input: default@pcs_t1@ds=2000-04-10 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `ds` +FROM `default`.`pcs_t1` +WHERE (`ds` = '2000-04-08' OR `key` IS NOT NULL) AND `key` = 2 OR `ds` = '2000-04-08' = FALSE AND `key` = 3 STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1559,23 +1578,23 @@ STAGE PLANS: Map Operator Tree: TableScan alias: pcs_t1 - filterExpr: (struct(key,((ds = '2000-04-08') or (key = 2)))) IN (const struct(2,true), const struct(3,false)) (type: boolean) + filterExpr: ((((ds = '2000-04-08') or key is not null) and (key = 2)) or (((ds = '2000-04-08') = false) and (key = 3))) (type: boolean) Statistics: Num rows: 60 Data size: 11280 Basic stats: COMPLETE Column stats: PARTIAL GatherStats: false Filter Operator isSamplingPred: false - predicate: (struct(key,((ds = '2000-04-08') or (key = 2)))) IN (const struct(2,true), const struct(3,false)) (type: boolean) - Statistics: Num rows: 30 Data size: 5640 Basic stats: COMPLETE Column stats: PARTIAL + predicate: ((((ds = '2000-04-08') = false) and (key = 3)) or (((ds = '2000-04-08') or key is not null) and (key = 2))) (type: boolean) + Statistics: Num rows: 7 Data size: 1316 Basic stats: COMPLETE Column stats: PARTIAL Select Operator expressions: ds (type: string) outputColumnNames: _col0 - Statistics: Num rows: 30 Data size: 5520 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 7 Data size: 1288 Basic stats: COMPLETE Column stats: PARTIAL File Output Operator compressed: false GlobalTableId: 0 #### A masked pattern was here #### NumFilesPerFileSink: 1 - Statistics: Num rows: 30 Data size: 5520 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 7 Data size: 1288 Basic stats: COMPLETE Column stats: PARTIAL #### A masked pattern was here #### table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat @@ -1592,6 +1611,7 @@ STAGE PLANS: TotalFiles: 1 GatherStats: false MultiFileSpray: false + Execution mode: vectorized Path -> Alias: #### A masked pattern was here #### Path -> Partition: @@ -1781,6 +1801,9 @@ POSTHOOK: Input: default@pcs_t1@ds=2000-04-08 POSTHOOK: Input: default@pcs_t1@ds=2000-04-09 POSTHOOK: Input: default@pcs_t1@ds=2000-04-10 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `ds` +FROM `default`.`pcs_t1` +WHERE `key` = 3 OR ROW(`key`, `ds` = '2000-04-08' OR `key` = 2) IN (ROW(2, TRUE), ROW(3, FALSE)) AND `key` + 5 > 0 STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 diff --git ql/src/test/results/clientpositive/perf/spark/query11.q.out ql/src/test/results/clientpositive/perf/spark/query11.q.out index 28ce6d0814..b245052d9f 100644 --- ql/src/test/results/clientpositive/perf/spark/query11.q.out +++ ql/src/test/results/clientpositive/perf/spark/query11.q.out @@ -673,7 +673,7 @@ STAGE PLANS: outputColumnNames: _col1, _col3, _col5, _col6, _col8, _col9 Statistics: Num rows: 1149975359 Data size: 101451160012 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN (_col3 is not null) THEN (CASE WHEN (_col6) THEN (((_col1 / _col5) > (_col9 / _col3))) ELSE ((null > (_col9 / _col3))) END) ELSE (CASE WHEN (_col6) THEN (((_col1 / _col5) > null)) ELSE (null) END) END (type: boolean) + predicate: CASE WHEN (_col3 is not null) THEN (CASE WHEN (_col6) THEN (((_col1 / _col5) > (_col9 / _col3))) ELSE (null) END) ELSE (null) END (type: boolean) Statistics: Num rows: 574987679 Data size: 50725579961 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col8 (type: string) diff --git ql/src/test/results/clientpositive/perf/spark/query13.q.out ql/src/test/results/clientpositive/perf/spark/query13.q.out index b5df0bcd7b..c825165ab3 100644 --- ql/src/test/results/clientpositive/perf/spark/query13.q.out +++ ql/src/test/results/clientpositive/perf/spark/query13.q.out @@ -176,10 +176,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: store_sales - filterExpr: (((ss_sales_price >= 100) or (ss_sales_price <= 150) or ss_sales_price is not null or (ss_sales_price <= 200)) and ((ss_net_profit >= 100) or (ss_net_profit <= 200) or ss_net_profit is not null or (ss_net_profit <= 300) or (ss_net_profit <= 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) + filterExpr: (((ss_sales_price >= 100) or (ss_sales_price <= 150) or (ss_sales_price >= 50) or (ss_sales_price <= 100) or (ss_sales_price >= 150) or (ss_sales_price <= 200)) and ((ss_net_profit >= 100) or (ss_net_profit <= 200) or (ss_net_profit >= 150) or (ss_net_profit <= 300) or (ss_net_profit >= 50) or (ss_net_profit <= 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: 575995635 Data size: 50814502088 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ss_net_profit >= 100) or (ss_net_profit <= 200) or ss_net_profit is not null or (ss_net_profit <= 300) or (ss_net_profit <= 250)) and ((ss_sales_price >= 100) or (ss_sales_price <= 150) or ss_sales_price is not null or (ss_sales_price <= 200)) and ss_addr_sk is not null and ss_cdemo_sk is not null and ss_hdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) (type: boolean) + predicate: (((ss_net_profit >= 100) or (ss_net_profit <= 200) or (ss_net_profit >= 150) or (ss_net_profit <= 300) or (ss_net_profit >= 50) or (ss_net_profit <= 250)) and ((ss_sales_price >= 100) or (ss_sales_price <= 150) or (ss_sales_price >= 50) or (ss_sales_price <= 100) or (ss_sales_price >= 150) or (ss_sales_price <= 200)) and ss_addr_sk is not null and ss_cdemo_sk is not null and ss_hdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) (type: boolean) Statistics: Num rows: 575995635 Data size: 50814502088 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ss_sold_date_sk (type: int), ss_cdemo_sk (type: int), ss_hdemo_sk (type: int), ss_addr_sk (type: int), ss_store_sk (type: int), ss_quantity (type: int), ss_ext_sales_price (type: decimal(7,2)), ss_ext_wholesale_cost (type: decimal(7,2)), ss_net_profit BETWEEN 100 AND 200 (type: boolean), ss_net_profit BETWEEN 150 AND 300 (type: boolean), ss_net_profit BETWEEN 50 AND 250 (type: boolean), ss_sales_price BETWEEN 100 AND 150 (type: boolean), ss_sales_price BETWEEN 50 AND 100 (type: boolean), ss_sales_price BETWEEN 150 AND 200 (type: boolean) diff --git ql/src/test/results/clientpositive/perf/spark/query31.q.out ql/src/test/results/clientpositive/perf/spark/query31.q.out index 27cfadc942..de194294d8 100644 --- ql/src/test/results/clientpositive/perf/spark/query31.q.out +++ ql/src/test/results/clientpositive/perf/spark/query31.q.out @@ -837,7 +837,7 @@ STAGE PLANS: outputColumnNames: _col1, _col2, _col4, _col6, _col7, _col8, _col9, _col11, _col13 Statistics: Num rows: 2529945843 Data size: 223192556861 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (CASE WHEN ((_col11 > 0)) THEN (CASE WHEN (_col2) THEN (((_col6 / _col1) > (_col9 / _col11))) ELSE ((null > (_col9 / _col11))) END) ELSE (CASE WHEN (_col2) THEN (((_col6 / _col1) > null)) ELSE (null) END) END and CASE WHEN ((_col9 > 0)) THEN (CASE WHEN (_col7) THEN (((_col4 / _col6) > (_col13 / _col9))) ELSE ((null > (_col13 / _col9))) END) ELSE (CASE WHEN (_col7) THEN (((_col4 / _col6) > null)) ELSE (null) END) END) (type: boolean) + predicate: (CASE WHEN ((_col11 > 0)) THEN (CASE WHEN (_col2) THEN (((_col6 / _col1) > (_col9 / _col11))) ELSE (null) END) ELSE (null) END and CASE WHEN ((_col9 > 0)) THEN (CASE WHEN (_col7) THEN (((_col4 / _col6) > (_col13 / _col9))) ELSE (null) END) ELSE (null) END) (type: boolean) Statistics: Num rows: 632486460 Data size: 55798139149 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col8 (type: string), 2000 (type: int), (_col6 / _col1) (type: decimal(37,20)), (_col9 / _col11) (type: decimal(37,20)), (_col4 / _col6) (type: decimal(37,20)), (_col13 / _col9) (type: decimal(37,20)) diff --git ql/src/test/results/clientpositive/perf/spark/query36.q.out ql/src/test/results/clientpositive/perf/spark/query36.q.out index c6088be8db..facbf5a4e3 100644 --- ql/src/test/results/clientpositive/perf/spark/query36.q.out +++ ql/src/test/results/clientpositive/perf/spark/query36.q.out @@ -234,9 +234,9 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 1149975358 Data size: 101451159969 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: (grouping(_col4, 1) + grouping(_col4, 0)) (type: bigint), CASE WHEN ((grouping(_col4, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END (type: string), (_col2 / _col3) (type: decimal(37,20)) + key expressions: (grouping(_col4, 1) + grouping(_col4, 0)) (type: bigint), CASE WHEN ((grouping(_col4, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END (type: string), (_col2 / _col3) (type: decimal(37,20)) sort order: +++ - Map-reduce partition columns: (grouping(_col4, 1) + grouping(_col4, 0)) (type: bigint), CASE WHEN ((grouping(_col4, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END (type: string) + Map-reduce partition columns: (grouping(_col4, 1) + grouping(_col4, 0)) (type: bigint), CASE WHEN ((grouping(_col4, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END (type: string) Statistics: Num rows: 1149975358 Data size: 101451159969 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: string), _col1 (type: string), _col2 (type: decimal(17,2)), _col3 (type: decimal(17,2)), _col4 (type: bigint) Reducer 5 @@ -256,7 +256,7 @@ STAGE PLANS: input alias: ptf_1 name: windowingtablefunction order by: (_col2 / _col3) ASC NULLS FIRST - partition by: (grouping(_col4, 1) + grouping(_col4, 0)), CASE WHEN ((grouping(_col4, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END + partition by: (grouping(_col4, 1) + grouping(_col4, 0)), CASE WHEN ((grouping(_col4, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END raw input shape: window functions: window function definition diff --git ql/src/test/results/clientpositive/perf/spark/query4.q.out ql/src/test/results/clientpositive/perf/spark/query4.q.out index 93e83ef10e..5c488ea30d 100644 --- ql/src/test/results/clientpositive/perf/spark/query4.q.out +++ ql/src/test/results/clientpositive/perf/spark/query4.q.out @@ -986,7 +986,7 @@ STAGE PLANS: outputColumnNames: _col1, _col3, _col5, _col6, _col8, _col9, _col11, _col13, _col14 Statistics: Num rows: 1916625598 Data size: 169085266687 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (CASE WHEN (_col3 is not null) THEN (CASE WHEN (_col9) THEN (((_col11 / _col8) > (_col14 / _col3))) ELSE ((null > (_col14 / _col3))) END) ELSE (CASE WHEN (_col9) THEN (((_col11 / _col8) > null)) ELSE (null) END) END and CASE WHEN (_col6) THEN (CASE WHEN (_col9) THEN (((_col11 / _col8) > (_col1 / _col5))) ELSE ((null > (_col1 / _col5))) END) ELSE (CASE WHEN (_col9) THEN (((_col11 / _col8) > null)) ELSE (null) END) END) (type: boolean) + predicate: (CASE WHEN (_col3 is not null) THEN (CASE WHEN (_col9) THEN (((_col11 / _col8) > (_col14 / _col3))) ELSE (null) END) ELSE (null) END and CASE WHEN (_col6) THEN (CASE WHEN (_col9) THEN (((_col11 / _col8) > (_col1 / _col5))) ELSE (null) END) ELSE (null) END) (type: boolean) Statistics: Num rows: 479156399 Data size: 42271316627 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col13 (type: string) diff --git ql/src/test/results/clientpositive/perf/spark/query45.q.out ql/src/test/results/clientpositive/perf/spark/query45.q.out index c8242745ee..af93ba88ed 100644 --- ql/src/test/results/clientpositive/perf/spark/query45.q.out +++ ql/src/test/results/clientpositive/perf/spark/query45.q.out @@ -71,18 +71,16 @@ STAGE PLANS: predicate: (i_item_sk) IN (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) (type: boolean) Statistics: Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: i_item_id (type: string) - outputColumnNames: i_item_id Statistics: Num rows: 462000 Data size: 663560457 Basic stats: COMPLETE Column stats: NONE Group By Operator - aggregations: count(), count(i_item_id) + aggregations: count() mode: hash - outputColumnNames: _col0, _col1 - Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: - Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: bigint), _col1 (type: bigint) + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: bigint) Execution mode: vectorized Reducer 16 Execution mode: vectorized @@ -90,10 +88,10 @@ STAGE PLANS: Map Reduce Local Work Reduce Operator Tree: Group By Operator - aggregations: count(VALUE._col0), count(VALUE._col1) + aggregations: count(VALUE._col0) mode: mergepartial - outputColumnNames: _col0, _col1 - Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE Spark HashTable Sink Operator keys: 0 @@ -106,7 +104,7 @@ STAGE PLANS: Reducer 13 <- Map 12 (PARTITION-LEVEL SORT, 154), Map 14 (PARTITION-LEVEL SORT, 154) Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 855), Map 6 (PARTITION-LEVEL SORT, 855) Reducer 3 <- Reducer 2 (PARTITION-LEVEL SORT, 777), Reducer 9 (PARTITION-LEVEL SORT, 777) - Reducer 4 <- Reducer 3 (GROUP, 230) + Reducer 4 <- Reducer 3 (GROUP, 218) Reducer 5 <- Reducer 4 (SORT, 1) Reducer 8 <- Map 7 (PARTITION-LEVEL SORT, 8), Reducer 11 (PARTITION-LEVEL SORT, 8) Reducer 9 <- Reducer 13 (PARTITION-LEVEL SORT, 174), Reducer 8 (PARTITION-LEVEL SORT, 174) @@ -295,7 +293,7 @@ STAGE PLANS: keys: 0 _col0 (type: int) 1 _col6 (type: int) - outputColumnNames: _col3, _col4, _col6, _col8, _col12 + outputColumnNames: _col3, _col4, _col8, _col12 Statistics: Num rows: 191667562 Data size: 26061245514 Basic stats: COMPLETE Column stats: NONE Map Join Operator condition map: @@ -303,32 +301,32 @@ STAGE PLANS: keys: 0 1 - outputColumnNames: _col3, _col4, _col6, _col8, _col12, _col16, _col17 + outputColumnNames: _col3, _col4, _col8, _col12, _col16 input vertices: 1 Reducer 16 - Statistics: Num rows: 191667562 Data size: 29319594068 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 191667562 Data size: 27786253572 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col12 (type: decimal(7,2)), _col3 (type: string), _col4 (type: string), _col6 (type: string), _col16 (type: bigint), _col17 (type: bigint), _col8 (type: boolean) - outputColumnNames: _col3, _col7, _col8, _col13, _col14, _col15, _col17 - Statistics: Num rows: 191667562 Data size: 29319594068 Basic stats: COMPLETE Column stats: NONE + expressions: _col12 (type: decimal(7,2)), _col3 (type: string), _col4 (type: string), _col16 (type: bigint), _col8 (type: boolean) + outputColumnNames: _col3, _col7, _col8, _col14, _col16 + Statistics: Num rows: 191667562 Data size: 27786253572 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((substr(_col8, 1, 5)) IN ('85669', '86197', '88274', '83405', '86475', '85392', '85460', '80348', '81792') or CASE WHEN ((_col14 = 0L)) THEN (false) WHEN (_col17 is not null) THEN (true) WHEN (_col13 is null) THEN (null) WHEN ((_col15 < _col14)) THEN (null) ELSE (false) END) (type: boolean) - Statistics: Num rows: 191667562 Data size: 29319594068 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col14 <> 0L) and _col16 is not null) or (substr(_col8, 1, 5)) IN ('85669', '86197', '88274', '83405', '86475', '85392', '85460', '80348', '81792')) (type: boolean) + Statistics: Num rows: 191667562 Data size: 27786253572 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col3 (type: decimal(7,2)), _col7 (type: string), _col8 (type: string) outputColumnNames: _col3, _col7, _col8 - Statistics: Num rows: 191667562 Data size: 29319594068 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 191667562 Data size: 27786253572 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: sum(_col3) keys: _col8 (type: string), _col7 (type: string) mode: hash outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 191667562 Data size: 29319594068 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 191667562 Data size: 27786253572 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: string) sort order: ++ Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 191667562 Data size: 29319594068 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 191667562 Data size: 27786253572 Basic stats: COMPLETE Column stats: NONE TopN Hash Memory Usage: 0.1 value expressions: _col2 (type: decimal(17,2)) Reducer 4 @@ -339,11 +337,11 @@ STAGE PLANS: keys: KEY._col0 (type: string), KEY._col1 (type: string) mode: mergepartial outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 95833781 Data size: 14659797034 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 95833781 Data size: 13893126786 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: string) sort order: ++ - Statistics: Num rows: 95833781 Data size: 14659797034 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 95833781 Data size: 13893126786 Basic stats: COMPLETE Column stats: NONE TopN Hash Memory Usage: 0.1 value expressions: _col2 (type: decimal(17,2)) Reducer 5 @@ -352,13 +350,13 @@ STAGE PLANS: Select Operator expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: decimal(17,2)) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 95833781 Data size: 14659797034 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 95833781 Data size: 13893126786 Basic stats: COMPLETE Column stats: NONE Limit Number of rows: 100 - Statistics: Num rows: 100 Data size: 15200 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 100 Data size: 14400 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 100 Data size: 15200 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 100 Data size: 14400 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -371,14 +369,14 @@ STAGE PLANS: keys: 0 _col1 (type: string) 1 _col0 (type: string) - outputColumnNames: _col0, _col1, _col3 + outputColumnNames: _col0, _col3 Statistics: Num rows: 508200 Data size: 729916518 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: int) sort order: + Map-reduce partition columns: _col0 (type: int) Statistics: Num rows: 508200 Data size: 729916518 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: string), _col3 (type: boolean) + value expressions: _col3 (type: boolean) Reducer 9 Reduce Operator Tree: Join Operator @@ -387,14 +385,14 @@ STAGE PLANS: keys: 0 _col0 (type: int) 1 _col1 (type: int) - outputColumnNames: _col1, _col3, _col6, _col7 + outputColumnNames: _col3, _col6, _col7 Statistics: Num rows: 174243235 Data size: 23692040863 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col6 (type: int) sort order: + Map-reduce partition columns: _col6 (type: int) Statistics: Num rows: 174243235 Data size: 23692040863 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: string), _col3 (type: boolean), _col7 (type: decimal(7,2)) + value expressions: _col3 (type: boolean), _col7 (type: decimal(7,2)) Stage: Stage-0 Fetch Operator diff --git ql/src/test/results/clientpositive/perf/spark/query48.q.out ql/src/test/results/clientpositive/perf/spark/query48.q.out index 3c99f4f66d..0ead17d016 100644 --- ql/src/test/results/clientpositive/perf/spark/query48.q.out +++ ql/src/test/results/clientpositive/perf/spark/query48.q.out @@ -184,10 +184,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: store_sales - filterExpr: (((ss_sales_price >= 100) or (ss_sales_price <= 150) or ss_sales_price is not null or (ss_sales_price <= 200)) and ((ss_net_profit >= 0) or (ss_net_profit <= 2000) or ss_net_profit is not null or (ss_net_profit <= 3000) or (ss_net_profit <= 25000)) and (ss_sales_price BETWEEN 100 AND 150 or ss_sales_price BETWEEN 50 AND 100 or ss_sales_price BETWEEN 150 AND 200) 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) + filterExpr: (((ss_sales_price >= 100) or (ss_sales_price <= 150) or (ss_sales_price >= 50) or (ss_sales_price <= 100) or (ss_sales_price >= 150) or (ss_sales_price <= 200)) and ((ss_net_profit >= 0) or (ss_net_profit <= 2000) or (ss_net_profit >= 150) or (ss_net_profit <= 3000) or (ss_net_profit >= 50) or (ss_net_profit <= 25000)) and (ss_sales_price BETWEEN 100 AND 150 or ss_sales_price BETWEEN 50 AND 100 or ss_sales_price BETWEEN 150 AND 200) 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: 575995635 Data size: 50814502088 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ss_net_profit >= 0) or (ss_net_profit <= 2000) or ss_net_profit is not null or (ss_net_profit <= 3000) or (ss_net_profit <= 25000)) and ((ss_sales_price >= 100) or (ss_sales_price <= 150) or ss_sales_price is not null or (ss_sales_price <= 200)) and (ss_sales_price BETWEEN 100 AND 150 or ss_sales_price BETWEEN 50 AND 100 or ss_sales_price BETWEEN 150 AND 200) and ss_addr_sk is not null and ss_cdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) (type: boolean) + predicate: (((ss_net_profit >= 0) or (ss_net_profit <= 2000) or (ss_net_profit >= 150) or (ss_net_profit <= 3000) or (ss_net_profit >= 50) or (ss_net_profit <= 25000)) and ((ss_sales_price >= 100) or (ss_sales_price <= 150) or (ss_sales_price >= 50) or (ss_sales_price <= 100) or (ss_sales_price >= 150) or (ss_sales_price <= 200)) and (ss_sales_price BETWEEN 100 AND 150 or ss_sales_price BETWEEN 50 AND 100 or ss_sales_price BETWEEN 150 AND 200) and ss_addr_sk is not null and ss_cdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) (type: boolean) Statistics: Num rows: 191998545 Data size: 16938167362 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ss_sold_date_sk (type: int), ss_cdemo_sk (type: int), ss_addr_sk (type: int), ss_store_sk (type: int), ss_quantity (type: int), ss_net_profit BETWEEN 0 AND 2000 (type: boolean), ss_net_profit BETWEEN 150 AND 3000 (type: boolean), ss_net_profit BETWEEN 50 AND 25000 (type: boolean) diff --git ql/src/test/results/clientpositive/perf/spark/query53.q.out ql/src/test/results/clientpositive/perf/spark/query53.q.out index ea5dde1e51..18e224f38f 100644 --- ql/src/test/results/clientpositive/perf/spark/query53.q.out +++ ql/src/test/results/clientpositive/perf/spark/query53.q.out @@ -249,7 +249,7 @@ STAGE PLANS: outputColumnNames: avg_window_0, _col0, _col2 Statistics: Num rows: 383325119 Data size: 33817053293 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((avg_window_0 > 0)) THEN (((abs((_col2 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (null) END (type: boolean) + predicate: CASE WHEN ((avg_window_0 > 0)) THEN (((abs((_col2 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (false) END (type: boolean) Statistics: Num rows: 191662559 Data size: 16908526602 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col2 (type: decimal(17,2)), avg_window_0 (type: decimal(21,6)) diff --git ql/src/test/results/clientpositive/perf/spark/query6.q.out ql/src/test/results/clientpositive/perf/spark/query6.q.out index 2702aefd92..18e1067fcc 100644 --- ql/src/test/results/clientpositive/perf/spark/query6.q.out +++ ql/src/test/results/clientpositive/perf/spark/query6.q.out @@ -326,7 +326,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col0 (type: string), (1.2 * CAST( (_col1 / _col2) AS decimal(16,6))) (type: decimal(19,7)) + expressions: _col0 (type: string), (1.2 * (_col1 / _col2)) (type: decimal(38,21)) outputColumnNames: _col0, _col1 Statistics: Num rows: 231000 Data size: 331780228 Basic stats: COMPLETE Column stats: NONE Map Join Operator @@ -344,7 +344,7 @@ STAGE PLANS: sort order: + Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 231000 Data size: 333859228 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: decimal(19,7)) + value expressions: _col1 (type: decimal(38,21)) Reducer 16 Reduce Operator Tree: Join Operator diff --git ql/src/test/results/clientpositive/perf/spark/query63.q.out ql/src/test/results/clientpositive/perf/spark/query63.q.out index 2d905d382b..a75610ff28 100644 --- ql/src/test/results/clientpositive/perf/spark/query63.q.out +++ ql/src/test/results/clientpositive/perf/spark/query63.q.out @@ -251,7 +251,7 @@ STAGE PLANS: outputColumnNames: avg_window_0, _col0, _col2 Statistics: Num rows: 383325119 Data size: 33817053293 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((avg_window_0 > 0)) THEN (((abs((_col2 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (null) END (type: boolean) + predicate: CASE WHEN ((avg_window_0 > 0)) THEN (((abs((_col2 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (false) END (type: boolean) Statistics: Num rows: 191662559 Data size: 16908526602 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col2 (type: decimal(17,2)), avg_window_0 (type: decimal(21,6)) diff --git ql/src/test/results/clientpositive/perf/spark/query70.q.out ql/src/test/results/clientpositive/perf/spark/query70.q.out index d73e54243d..b34ecfc247 100644 --- ql/src/test/results/clientpositive/perf/spark/query70.q.out +++ ql/src/test/results/clientpositive/perf/spark/query70.q.out @@ -386,9 +386,9 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 1149975358 Data size: 101451159969 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: (grouping(_col3, 1) + grouping(_col3, 0)) (type: bigint), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END (type: string), _col2 (type: decimal(17,2)) + key expressions: (grouping(_col3, 1) + grouping(_col3, 0)) (type: bigint), CASE WHEN ((grouping(_col3, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END (type: string), _col2 (type: decimal(17,2)) sort order: ++- - Map-reduce partition columns: (grouping(_col3, 1) + grouping(_col3, 0)) (type: bigint), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END (type: string) + Map-reduce partition columns: (grouping(_col3, 1) + grouping(_col3, 0)) (type: bigint), CASE WHEN ((grouping(_col3, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END (type: string) Statistics: Num rows: 1149975358 Data size: 101451159969 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: string), _col1 (type: string), _col3 (type: bigint) Reducer 5 @@ -408,7 +408,7 @@ STAGE PLANS: input alias: ptf_1 name: windowingtablefunction order by: _col2 DESC NULLS LAST - partition by: (grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END + partition by: (grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END raw input shape: window functions: window function definition diff --git ql/src/test/results/clientpositive/perf/spark/query74.q.out ql/src/test/results/clientpositive/perf/spark/query74.q.out index cc9b74eb0c..85af9739fe 100644 --- ql/src/test/results/clientpositive/perf/spark/query74.q.out +++ ql/src/test/results/clientpositive/perf/spark/query74.q.out @@ -641,7 +641,7 @@ STAGE PLANS: outputColumnNames: _col1, _col3, _col5, _col6, _col7, _col8, _col9, _col10 Statistics: Num rows: 1149975359 Data size: 101451160012 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN (_col3 is not null) THEN (CASE WHEN (_col6) THEN (((_col1 / _col5) > (_col10 / _col3))) ELSE ((null > (_col10 / _col3))) END) ELSE (CASE WHEN (_col6) THEN (((_col1 / _col5) > null)) ELSE (null) END) END (type: boolean) + predicate: CASE WHEN (_col3 is not null) THEN (CASE WHEN (_col6) THEN (((_col1 / _col5) > (_col10 / _col3))) ELSE (null) END) ELSE (null) END (type: boolean) Statistics: Num rows: 574987679 Data size: 50725579961 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col7 (type: string), _col8 (type: string), _col9 (type: string) diff --git ql/src/test/results/clientpositive/perf/spark/query78.q.out ql/src/test/results/clientpositive/perf/spark/query78.q.out index c121a341fd..b9102291f1 100644 --- ql/src/test/results/clientpositive/perf/spark/query78.q.out +++ ql/src/test/results/clientpositive/perf/spark/query78.q.out @@ -139,13 +139,13 @@ STAGE PLANS: Reducer 11 <- Map 10 (PARTITION-LEVEL SORT, 85), Reducer 14 (PARTITION-LEVEL SORT, 85) Reducer 12 <- Reducer 11 (GROUP, 93) Reducer 14 <- Map 13 (PARTITION-LEVEL SORT, 164), Map 15 (PARTITION-LEVEL SORT, 164) - Reducer 17 <- Map 10 (PARTITION-LEVEL SORT, 85), Reducer 20 (PARTITION-LEVEL SORT, 85) + Reducer 17 <- Map 16 (PARTITION-LEVEL SORT, 85), Reducer 20 (PARTITION-LEVEL SORT, 85) Reducer 18 <- Reducer 17 (GROUP, 93) Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 219), Reducer 8 (PARTITION-LEVEL SORT, 219) Reducer 20 <- Map 19 (PARTITION-LEVEL SORT, 177), Map 21 (PARTITION-LEVEL SORT, 177) Reducer 3 <- Reducer 2 (GROUP, 241) - Reducer 4 <- Reducer 12 (PARTITION-LEVEL SORT, 167), Reducer 3 (PARTITION-LEVEL SORT, 167) - Reducer 5 <- Reducer 18 (PARTITION-LEVEL SORT, 113), Reducer 4 (PARTITION-LEVEL SORT, 113) + Reducer 4 <- Reducer 12 (PARTITION-LEVEL SORT, 136), Reducer 3 (PARTITION-LEVEL SORT, 136) + Reducer 5 <- Reducer 18 (PARTITION-LEVEL SORT, 148), Reducer 4 (PARTITION-LEVEL SORT, 148) Reducer 6 <- Reducer 5 (SORT, 1) Reducer 8 <- Map 7 (PARTITION-LEVEL SORT, 432), Map 9 (PARTITION-LEVEL SORT, 432) #### A masked pattern was here #### @@ -192,10 +192,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: web_sales - filterExpr: ws_sold_date_sk is not null (type: boolean) + filterExpr: (ws_sold_date_sk is not null and ws_item_sk is not null and ws_bill_customer_sk is not null) (type: boolean) Statistics: Num rows: 144002668 Data size: 19580198212 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ws_sold_date_sk is not null (type: boolean) + predicate: (ws_bill_customer_sk is not null and ws_item_sk is not null and ws_sold_date_sk is not null) (type: boolean) Statistics: Num rows: 144002668 Data size: 19580198212 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ws_sold_date_sk (type: int), ws_item_sk (type: int), ws_bill_customer_sk (type: int), ws_order_number (type: int), ws_quantity (type: int), ws_wholesale_cost (type: decimal(7,2)), ws_sales_price (type: decimal(7,2)) @@ -212,25 +212,48 @@ STAGE PLANS: Map Operator Tree: TableScan alias: web_returns + filterExpr: wr_item_sk is not null (type: boolean) Statistics: Num rows: 14398467 Data size: 1325194184 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: wr_item_sk (type: int), wr_order_number (type: int) - outputColumnNames: _col0, _col1 + Filter Operator + predicate: wr_item_sk is not null (type: boolean) Statistics: Num rows: 14398467 Data size: 1325194184 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: int), _col1 (type: int) - sort order: ++ - Map-reduce partition columns: _col0 (type: int), _col1 (type: int) + Select Operator + expressions: wr_item_sk (type: int), wr_order_number (type: int) + outputColumnNames: _col0, _col1 Statistics: Num rows: 14398467 Data size: 1325194184 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int) + Statistics: Num rows: 14398467 Data size: 1325194184 Basic stats: COMPLETE Column stats: NONE + Execution mode: vectorized + Map 16 + Map Operator Tree: + TableScan + alias: date_dim + filterExpr: ((d_year = 2000) and d_date_sk is not null) (type: boolean) + Statistics: Num rows: 73049 Data size: 81741831 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: ((d_year = 2000) and d_date_sk is not null) (type: boolean) + Statistics: Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: d_date_sk (type: int) + outputColumnNames: _col0 + Statistics: Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 36524 Data size: 40870356 Basic stats: COMPLETE Column stats: NONE Execution mode: vectorized Map 19 Map Operator Tree: TableScan alias: catalog_sales - filterExpr: ((cs_item_sk = cs_item_sk) and cs_sold_date_sk is not null) (type: boolean) + filterExpr: ((cs_item_sk = cs_item_sk) and cs_sold_date_sk is not null and cs_bill_customer_sk is not null) (type: boolean) Statistics: Num rows: 287989836 Data size: 38999608952 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cs_item_sk = cs_item_sk) and cs_sold_date_sk is not null) (type: boolean) + predicate: ((cs_item_sk = cs_item_sk) and cs_bill_customer_sk is not null and cs_sold_date_sk is not null) (type: boolean) Statistics: Num rows: 143994918 Data size: 19499804476 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cs_sold_date_sk (type: int), cs_bill_customer_sk (type: int), cs_item_sk (type: int), cs_order_number (type: int), cs_quantity (type: int), cs_wholesale_cost (type: decimal(7,2)), cs_sales_price (type: decimal(7,2)) @@ -262,10 +285,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: store_sales - filterExpr: ss_sold_date_sk is not null (type: boolean) + filterExpr: (ss_sold_date_sk is not null and ss_item_sk is not null and ss_customer_sk is not null) (type: boolean) Statistics: Num rows: 575995635 Data size: 50814502088 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ss_sold_date_sk is not null (type: boolean) + predicate: (ss_customer_sk is not null and ss_item_sk is not null and ss_sold_date_sk is not null) (type: boolean) Statistics: Num rows: 575995635 Data size: 50814502088 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ss_sold_date_sk (type: int), ss_item_sk (type: int), ss_customer_sk (type: int), ss_ticket_number (type: int), ss_quantity (type: int), ss_wholesale_cost (type: decimal(7,2)), ss_sales_price (type: decimal(7,2)) @@ -282,16 +305,20 @@ STAGE PLANS: Map Operator Tree: TableScan alias: store_returns + filterExpr: sr_item_sk is not null (type: boolean) Statistics: Num rows: 57591150 Data size: 4462194832 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: sr_item_sk (type: int), sr_ticket_number (type: int) - outputColumnNames: _col0, _col1 + Filter Operator + predicate: sr_item_sk is not null (type: boolean) Statistics: Num rows: 57591150 Data size: 4462194832 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: int), _col1 (type: int) - sort order: ++ - Map-reduce partition columns: _col0 (type: int), _col1 (type: int) + Select Operator + expressions: sr_item_sk (type: int), sr_ticket_number (type: int) + outputColumnNames: _col0, _col1 Statistics: Num rows: 57591150 Data size: 4462194832 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: int), _col1 (type: int) + Statistics: Num rows: 57591150 Data size: 4462194832 Basic stats: COMPLETE Column stats: NONE Execution mode: vectorized Reducer 11 Reduce Operator Tree: @@ -324,16 +351,19 @@ STAGE PLANS: mode: mergepartial outputColumnNames: _col0, _col1, _col2, _col3, _col4 Statistics: Num rows: 43560808 Data size: 5923010147 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: _col1 (type: int), _col0 (type: int), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) - outputColumnNames: _col0, _col1, _col2, _col3, _col4 - Statistics: Num rows: 43560808 Data size: 5923010147 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col1 (type: int), _col0 (type: int) - sort order: ++ - Map-reduce partition columns: _col1 (type: int), _col0 (type: int) - Statistics: Num rows: 43560808 Data size: 5923010147 Basic stats: COMPLETE Column stats: NONE - value expressions: _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) + Filter Operator + predicate: (_col2 > 0L) (type: boolean) + Statistics: Num rows: 14520269 Data size: 1974336670 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: int), _col0 (type: int), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 14520269 Data size: 1974336670 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col1 (type: int), _col0 (type: int) + sort order: ++ + Map-reduce partition columns: _col1 (type: int), _col0 (type: int) + Statistics: Num rows: 14520269 Data size: 1974336670 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) Reducer 14 Reduce Operator Tree: Join Operator @@ -390,14 +420,21 @@ STAGE PLANS: Statistics: Num rows: 43558464 Data size: 5898691072 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) - outputColumnNames: _col0, _col1, _col2, _col3 + outputColumnNames: _col1, _col2, _col3, _col4 Statistics: Num rows: 43558464 Data size: 5898691072 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: int) - sort order: + - Map-reduce partition columns: _col0 (type: int) - Statistics: Num rows: 43558464 Data size: 5898691072 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: bigint), _col2 (type: decimal(17,2)), _col3 (type: decimal(17,2)) + Filter Operator + predicate: (_col2 > 0L) (type: boolean) + Statistics: Num rows: 14519488 Data size: 1966230357 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col1 (type: int), _col2 (type: bigint), CASE WHEN (_col2 is not null) THEN (_col2) ELSE (0) END (type: bigint), CASE WHEN (_col3 is not null) THEN (_col3) ELSE (0) END (type: decimal(17,2)), CASE WHEN (_col4 is not null) THEN (_col4) ELSE (0) END (type: decimal(17,2)) + outputColumnNames: _col0, _col1, _col2, _col3, _col4 + Statistics: Num rows: 14519488 Data size: 1966230357 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 14519488 Data size: 1966230357 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: bigint), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)) Reducer 2 Reduce Operator Tree: Join Operator @@ -466,50 +503,44 @@ STAGE PLANS: Reduce Operator Tree: Join Operator condition map: - Left Outer Join 0 to 1 + Inner Join 0 to 1 keys: 0 _col1 (type: int), _col0 (type: int) 1 _col1 (type: int), _col0 (type: int) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col7, _col8, _col9 Statistics: Num rows: 191662559 Data size: 16908526668 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: CASE WHEN (_col7 is not null) THEN ((_col7 > 0L)) ELSE (false) END (type: boolean) - Statistics: Num rows: 95831279 Data size: 8454263289 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col1 (type: int) - sort order: + - Map-reduce partition columns: _col1 (type: int) - Statistics: Num rows: 95831279 Data size: 8454263289 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: int), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col7 (type: bigint), _col8 (type: decimal(17,2)), _col9 (type: decimal(17,2)) + Reduce Output Operator + key expressions: _col1 (type: int) + sort order: + + Map-reduce partition columns: _col1 (type: int) + Statistics: Num rows: 191662559 Data size: 16908526668 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), _col7 (type: bigint), _col8 (type: decimal(17,2)), _col9 (type: decimal(17,2)) Reducer 5 Reduce Operator Tree: Join Operator condition map: - Left Outer Join 0 to 1 + Inner Join 0 to 1 keys: 0 _col1 (type: int) 1 _col0 (type: int) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col7, _col8, _col9, _col11, _col12, _col13 - Statistics: Num rows: 105414409 Data size: 9299689819 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: CASE WHEN (_col11 is not null) THEN ((_col11 > 0L)) ELSE (false) END (type: boolean) - Statistics: Num rows: 52707204 Data size: 4649844865 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: _col0 (type: int), _col1 (type: int), (CASE WHEN (_col7 is not null) THEN (_col7) ELSE (0) END + CASE WHEN (_col11 is not null) THEN (_col11) ELSE (0) END) (type: bigint), (CASE WHEN (_col8 is not null) THEN (_col8) ELSE (0) END + CASE WHEN (_col12 is not null) THEN (_col12) ELSE (0) END) (type: decimal(18,2)), (CASE WHEN (_col9 is not null) THEN (_col9) ELSE (0) END + CASE WHEN (_col13 is not null) THEN (_col13) ELSE (0) END) (type: decimal(18,2)), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), round((UDFToDouble(_col2) / UDFToDouble(CASE WHEN ((_col7 is not null and _col11 is not null)) THEN ((_col7 + _col11)) ELSE (1) END)), 2) (type: double) - outputColumnNames: _col0, _col1, _col6, _col7, _col8, _col9, _col10, _col11, _col12 - Statistics: Num rows: 52707204 Data size: 4649844865 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: int), _col1 (type: int), _col9 (type: bigint), _col10 (type: decimal(17,2)), _col11 (type: decimal(17,2)), _col6 (type: bigint), _col7 (type: decimal(18,2)), _col8 (type: decimal(18,2)), _col12 (type: double) - sort order: ++---++++ - Statistics: Num rows: 52707204 Data size: 4649844865 Basic stats: COMPLETE Column stats: NONE - TopN Hash Memory Usage: 0.1 + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col7, _col8, _col9, _col11, _col12, _col13, _col14 + Statistics: Num rows: 210828819 Data size: 18599379737 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col0 (type: int), _col1 (type: int), (CASE WHEN (_col7 is not null) THEN (_col7) ELSE (0) END + _col12) (type: bigint), (CASE WHEN (_col8 is not null) THEN (_col8) ELSE (0) END + _col13) (type: decimal(18,2)), (CASE WHEN (_col9 is not null) THEN (_col9) ELSE (0) END + _col14) (type: decimal(18,2)), _col2 (type: bigint), _col3 (type: decimal(17,2)), _col4 (type: decimal(17,2)), round((UDFToDouble(_col2) / UDFToDouble(CASE WHEN ((_col7 + _col11) is not null) THEN ((_col7 + _col11)) ELSE (1) END)), 2) (type: double) + outputColumnNames: _col0, _col1, _col6, _col7, _col8, _col9, _col10, _col11, _col12 + Statistics: Num rows: 210828819 Data size: 18599379737 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int), _col1 (type: int), _col9 (type: bigint), _col10 (type: decimal(17,2)), _col11 (type: decimal(17,2)), _col6 (type: bigint), _col7 (type: decimal(18,2)), _col8 (type: decimal(18,2)), _col12 (type: double) + sort order: ++---++++ + Statistics: Num rows: 210828819 Data size: 18599379737 Basic stats: COMPLETE Column stats: NONE + TopN Hash Memory Usage: 0.1 Reducer 6 Execution mode: vectorized Reduce Operator Tree: Select Operator expressions: 2000 (type: int), KEY.reducesinkkey0 (type: int), KEY.reducesinkkey1 (type: int), KEY.reducesinkkey8 (type: double), KEY.reducesinkkey2 (type: bigint), KEY.reducesinkkey3 (type: decimal(17,2)), KEY.reducesinkkey4 (type: decimal(17,2)), KEY.reducesinkkey5 (type: bigint), KEY.reducesinkkey6 (type: decimal(18,2)), KEY.reducesinkkey7 (type: decimal(18,2)) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9 - Statistics: Num rows: 52707204 Data size: 4649844865 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 210828819 Data size: 18599379737 Basic stats: COMPLETE Column stats: NONE Limit Number of rows: 100 Statistics: Num rows: 100 Data size: 8800 Basic stats: COMPLETE Column stats: NONE diff --git ql/src/test/results/clientpositive/perf/spark/query85.q.out ql/src/test/results/clientpositive/perf/spark/query85.q.out index de1bf24eff..bba4102152 100644 --- ql/src/test/results/clientpositive/perf/spark/query85.q.out +++ ql/src/test/results/clientpositive/perf/spark/query85.q.out @@ -253,10 +253,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: web_sales - filterExpr: (((ws_sales_price >= 100) or (ws_sales_price <= 150) or ws_sales_price is not null or (ws_sales_price <= 200)) and ((ws_net_profit >= 100) or (ws_net_profit <= 200) or ws_net_profit is not null or (ws_net_profit <= 300) or (ws_net_profit <= 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) + filterExpr: (((ws_sales_price >= 100) or (ws_sales_price <= 150) or (ws_sales_price >= 50) or (ws_sales_price <= 100) or (ws_sales_price >= 150) or (ws_sales_price <= 200)) and ((ws_net_profit >= 100) or (ws_net_profit <= 200) or (ws_net_profit >= 150) or (ws_net_profit <= 300) or (ws_net_profit >= 50) or (ws_net_profit <= 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: 144002668 Data size: 19580198212 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ws_net_profit >= 100) or (ws_net_profit <= 200) or ws_net_profit is not null or (ws_net_profit <= 300) or (ws_net_profit <= 250)) and ((ws_sales_price >= 100) or (ws_sales_price <= 150) or ws_sales_price is not null or (ws_sales_price <= 200)) and ws_item_sk is not null and ws_order_number is not null and ws_sold_date_sk is not null and ws_web_page_sk is not null) (type: boolean) + predicate: (((ws_net_profit >= 100) or (ws_net_profit <= 200) or (ws_net_profit >= 150) or (ws_net_profit <= 300) or (ws_net_profit >= 50) or (ws_net_profit <= 250)) and ((ws_sales_price >= 100) or (ws_sales_price <= 150) or (ws_sales_price >= 50) or (ws_sales_price <= 100) or (ws_sales_price >= 150) or (ws_sales_price <= 200)) and ws_item_sk is not null and ws_order_number is not null and ws_sold_date_sk is not null and ws_web_page_sk is not null) (type: boolean) Statistics: Num rows: 144002668 Data size: 19580198212 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ws_sold_date_sk (type: int), ws_item_sk (type: int), ws_web_page_sk (type: int), ws_order_number (type: int), ws_quantity (type: int), ws_net_profit BETWEEN 100 AND 200 (type: boolean), ws_net_profit BETWEEN 150 AND 300 (type: boolean), ws_net_profit BETWEEN 50 AND 250 (type: boolean), ws_sales_price BETWEEN 100 AND 150 (type: boolean), ws_sales_price BETWEEN 50 AND 100 (type: boolean), ws_sales_price BETWEEN 150 AND 200 (type: boolean) diff --git ql/src/test/results/clientpositive/perf/spark/query86.q.out ql/src/test/results/clientpositive/perf/spark/query86.q.out index 835ac5c9ad..9a4a690591 100644 --- ql/src/test/results/clientpositive/perf/spark/query86.q.out +++ ql/src/test/results/clientpositive/perf/spark/query86.q.out @@ -186,9 +186,9 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 261364852 Data size: 35538061226 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: (grouping(_col3, 1) + grouping(_col3, 0)) (type: bigint), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END (type: string), _col2 (type: decimal(17,2)) + key expressions: (grouping(_col3, 1) + grouping(_col3, 0)) (type: bigint), CASE WHEN ((grouping(_col3, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END (type: string), _col2 (type: decimal(17,2)) sort order: ++- - Map-reduce partition columns: (grouping(_col3, 1) + grouping(_col3, 0)) (type: bigint), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END (type: string) + Map-reduce partition columns: (grouping(_col3, 1) + grouping(_col3, 0)) (type: bigint), CASE WHEN ((grouping(_col3, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END (type: string) Statistics: Num rows: 261364852 Data size: 35538061226 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: string), _col1 (type: string), _col3 (type: bigint) Reducer 5 @@ -208,7 +208,7 @@ STAGE PLANS: input alias: ptf_1 name: windowingtablefunction order by: _col2 DESC NULLS LAST - partition by: (grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END + partition by: (grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END raw input shape: window functions: window function definition diff --git ql/src/test/results/clientpositive/perf/spark/query88.q.out ql/src/test/results/clientpositive/perf/spark/query88.q.out index 029da524d0..87c319583a 100644 --- ql/src/test/results/clientpositive/perf/spark/query88.q.out +++ ql/src/test/results/clientpositive/perf/spark/query88.q.out @@ -235,15 +235,15 @@ STAGE PLANS: Map Operator Tree: TableScan alias: household_demographics - filterExpr: ((hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and (((hd_dep_count = 3) and hd_vehicle_count is not null) 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) + filterExpr: ((hd_dep_count) IN (3, 0, 1) and ((hd_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (((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: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((((hd_dep_count = 3) and hd_vehicle_count is not null) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and (hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and hd_demo_sk is not null) (type: boolean) - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + 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_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (hd_dep_count) IN (3, 0, 1) and hd_demo_sk is not null) (type: boolean) + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hd_demo_sk (type: int) outputColumnNames: _col0 - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Spark HashTable Sink Operator keys: 0 _col1 (type: int) @@ -811,15 +811,15 @@ STAGE PLANS: Map Operator Tree: TableScan alias: household_demographics - filterExpr: ((hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and (((hd_dep_count = 3) and hd_vehicle_count is not null) 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) + filterExpr: ((hd_dep_count) IN (3, 0, 1) and ((hd_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (((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: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((((hd_dep_count = 3) and hd_vehicle_count is not null) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and (hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and hd_demo_sk is not null) (type: boolean) - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + 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_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (hd_dep_count) IN (3, 0, 1) and hd_demo_sk is not null) (type: boolean) + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hd_demo_sk (type: int) outputColumnNames: _col0 - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Spark HashTable Sink Operator keys: 0 _col1 (type: int) @@ -986,15 +986,15 @@ STAGE PLANS: Map Operator Tree: TableScan alias: household_demographics - filterExpr: ((hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and (((hd_dep_count = 3) and hd_vehicle_count is not null) 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) + filterExpr: ((hd_dep_count) IN (3, 0, 1) and ((hd_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (((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: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((((hd_dep_count = 3) and hd_vehicle_count is not null) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and (hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and hd_demo_sk is not null) (type: boolean) - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + 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_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (hd_dep_count) IN (3, 0, 1) and hd_demo_sk is not null) (type: boolean) + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hd_demo_sk (type: int) outputColumnNames: _col0 - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Spark HashTable Sink Operator keys: 0 _col1 (type: int) @@ -1051,15 +1051,15 @@ STAGE PLANS: Map Operator Tree: TableScan alias: household_demographics - filterExpr: ((hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and (((hd_dep_count = 3) and hd_vehicle_count is not null) 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) + filterExpr: ((hd_dep_count) IN (3, 0, 1) and ((hd_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (((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: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((((hd_dep_count = 3) and hd_vehicle_count is not null) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and (hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and hd_demo_sk is not null) (type: boolean) - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + 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_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (hd_dep_count) IN (3, 0, 1) and hd_demo_sk is not null) (type: boolean) + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hd_demo_sk (type: int) outputColumnNames: _col0 - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Spark HashTable Sink Operator keys: 0 _col1 (type: int) @@ -1116,15 +1116,15 @@ STAGE PLANS: Map Operator Tree: TableScan alias: household_demographics - filterExpr: ((hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and (((hd_dep_count = 3) and hd_vehicle_count is not null) 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) + filterExpr: ((hd_dep_count) IN (3, 0, 1) and ((hd_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (((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: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((((hd_dep_count = 3) and hd_vehicle_count is not null) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and (hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and hd_demo_sk is not null) (type: boolean) - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + 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_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (hd_dep_count) IN (3, 0, 1) and hd_demo_sk is not null) (type: boolean) + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hd_demo_sk (type: int) outputColumnNames: _col0 - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Spark HashTable Sink Operator keys: 0 _col1 (type: int) @@ -1181,15 +1181,15 @@ STAGE PLANS: Map Operator Tree: TableScan alias: household_demographics - filterExpr: ((hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and (((hd_dep_count = 3) and hd_vehicle_count is not null) 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) + filterExpr: ((hd_dep_count) IN (3, 0, 1) and ((hd_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (((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: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((((hd_dep_count = 3) and hd_vehicle_count is not null) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and (hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and hd_demo_sk is not null) (type: boolean) - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + 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_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (hd_dep_count) IN (3, 0, 1) and hd_demo_sk is not null) (type: boolean) + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hd_demo_sk (type: int) outputColumnNames: _col0 - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Spark HashTable Sink Operator keys: 0 _col1 (type: int) @@ -1246,15 +1246,15 @@ STAGE PLANS: Map Operator Tree: TableScan alias: household_demographics - filterExpr: ((hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and (((hd_dep_count = 3) and hd_vehicle_count is not null) 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) + filterExpr: ((hd_dep_count) IN (3, 0, 1) and ((hd_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (((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: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((((hd_dep_count = 3) and hd_vehicle_count is not null) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and (hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and hd_demo_sk is not null) (type: boolean) - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + 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_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (hd_dep_count) IN (3, 0, 1) and hd_demo_sk is not null) (type: boolean) + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hd_demo_sk (type: int) outputColumnNames: _col0 - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Spark HashTable Sink Operator keys: 0 _col1 (type: int) @@ -1311,15 +1311,15 @@ STAGE PLANS: Map Operator Tree: TableScan alias: household_demographics - filterExpr: ((hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and (((hd_dep_count = 3) and hd_vehicle_count is not null) 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) + filterExpr: ((hd_dep_count) IN (3, 0, 1) and ((hd_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (((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: 7200 Data size: 770400 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((((hd_dep_count = 3) and hd_vehicle_count is not null) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and (hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and hd_demo_sk is not null) (type: boolean) - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + 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_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (hd_dep_count) IN (3, 0, 1) and hd_demo_sk is not null) (type: boolean) + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hd_demo_sk (type: int) outputColumnNames: _col0 - Statistics: Num rows: 2000 Data size: 214000 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 3600 Data size: 385200 Basic stats: COMPLETE Column stats: NONE Spark HashTable Sink Operator keys: 0 _col1 (type: int) diff --git ql/src/test/results/clientpositive/perf/spark/query89.q.out ql/src/test/results/clientpositive/perf/spark/query89.q.out index 40a698aadf..00e78635ae 100644 --- ql/src/test/results/clientpositive/perf/spark/query89.q.out +++ ql/src/test/results/clientpositive/perf/spark/query89.q.out @@ -260,7 +260,7 @@ STAGE PLANS: outputColumnNames: avg_window_0, _col0, _col1, _col2, _col3, _col4, _col5, _col6 Statistics: Num rows: 383325119 Data size: 33817053293 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((avg_window_0 <> 0)) THEN (((abs((_col6 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (null) END (type: boolean) + predicate: CASE WHEN ((avg_window_0 <> 0)) THEN (((abs((_col6 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (false) END (type: boolean) Statistics: Num rows: 191662559 Data size: 16908526602 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col2 (type: string), _col1 (type: string), _col0 (type: string), _col4 (type: string), _col5 (type: string), _col3 (type: int), _col6 (type: decimal(17,2)), avg_window_0 (type: decimal(21,6)), (_col6 - avg_window_0) (type: decimal(22,6)) diff --git ql/src/test/results/clientpositive/perf/spark/query97.q.out ql/src/test/results/clientpositive/perf/spark/query97.q.out index 1ace8e8ff5..0861fc4f79 100644 --- ql/src/test/results/clientpositive/perf/spark/query97.q.out +++ ql/src/test/results/clientpositive/perf/spark/query97.q.out @@ -192,7 +192,7 @@ STAGE PLANS: outputColumnNames: _col0, _col2 Statistics: Num rows: 348477374 Data size: 30742775095 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: CASE WHEN ((_col0 is not null and _col2 is null)) THEN (1) ELSE (0) END (type: int), CASE WHEN ((_col0 is null and _col2 is not null)) THEN (1) ELSE (0) END (type: int), CASE WHEN ((_col0 is not null and _col2 is not null)) THEN (1) ELSE (0) END (type: int) + expressions: CASE WHEN ((_col2 is null and _col0 is not null)) THEN (1) ELSE (0) END (type: int), CASE WHEN ((_col0 is null and _col2 is not null)) THEN (1) ELSE (0) END (type: int), CASE WHEN ((_col0 is not null and _col2 is not null)) THEN (1) ELSE (0) END (type: int) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 348477374 Data size: 30742775095 Basic stats: COMPLETE Column stats: NONE Group By Operator diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query11.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query11.q.out index de0783be16..cc5ed15224 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query11.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query11.q.out @@ -159,7 +159,7 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100]) HiveProject(c_preferred_cust_flag=[$1]) - HiveJoin(condition=[AND(=($0, $5), CASE(CAST(IS NOT NULL($6)):BOOLEAN, CASE($9, >(/($4, $8), /($2, $6)), >(null, /($2, $6))), CASE($9, >(/($4, $8), null), null)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[AND(=($0, $5), CASE(CAST(IS NOT NULL($6)):BOOLEAN, CASE($9, >(/($4, $8), /($2, $6)), null), null))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f4=[$3], $f9=[$7]) HiveAggregate(group=[{1, 2, 3, 4, 5, 6, 7}], agg#0=[sum($10)]) HiveJoin(condition=[=($0, $9)], joinType=[inner], algorithm=[none], cost=[not available]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query13.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query13.q.out index 412cc67334..92fbe7724a 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query13.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query13.q.out @@ -114,21 +114,21 @@ POSTHOOK: Input: default@store_sales POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveProject($f0=[/(CAST($0):DOUBLE, $1)], $f1=[/($2, $3)], $f2=[/($4, $5)], $f3=[CAST($4):DECIMAL(17, 2)]) - HiveAggregate(group=[{}], agg#0=[sum($5)], agg#1=[count($5)], agg#2=[sum($6)], agg#3=[count($6)], agg#4=[sum($7)], agg#5=[count($7)]) - HiveJoin(condition=[=($29, $4)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveJoin(condition=[AND(=($2, $26), OR(AND($20, $21, $11, $27), AND($22, $23, $12, $28), AND($24, $25, $13, $28)))], joinType=[inner], algorithm=[none], cost=[not available]) - HiveJoin(condition=[=($19, $1)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveJoin(condition=[AND(=($3, $15), OR(AND($16, $8), AND($17, $9), AND($18, $10)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveAggregate(group=[{}], agg#0=[sum($9)], agg#1=[count($9)], agg#2=[sum($10)], agg#3=[count($10)], agg#4=[sum($11)], agg#5=[count($11)]) + HiveJoin(condition=[=($29, $8)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[AND(=($6, $26), OR(AND($20, $21, $15, $27), AND($22, $23, $16, $28), AND($24, $25, $17, $28)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[=($19, $5)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[AND(=($7, $0), OR(AND($1, $12), AND($2, $13), AND($3, $14)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(ca_address_sk=[$0], IN=[IN($8, _UTF-16LE'KY', _UTF-16LE'GA', _UTF-16LE'NM')], IN2=[IN($8, _UTF-16LE'MT', _UTF-16LE'OR', _UTF-16LE'IN')], IN3=[IN($8, _UTF-16LE'WI', _UTF-16LE'MO', _UTF-16LE'WV')]) + HiveFilter(condition=[AND(IN($8, _UTF-16LE'KY', _UTF-16LE'GA', _UTF-16LE'NM', _UTF-16LE'MT', _UTF-16LE'OR', _UTF-16LE'IN', _UTF-16LE'WI', _UTF-16LE'MO', _UTF-16LE'WV'), =($10, _UTF-16LE'United States'), IS NOT NULL($0))]) + HiveTableScan(table=[[default, customer_address]], table:alias=[customer_address]) HiveJoin(condition=[=($0, $14)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ss_sold_date_sk=[$0], ss_cdemo_sk=[$4], ss_hdemo_sk=[$5], ss_addr_sk=[$6], ss_store_sk=[$7], ss_quantity=[$10], ss_ext_sales_price=[$15], ss_ext_wholesale_cost=[$16], BETWEEN=[BETWEEN(false, $22, 100, 200)], BETWEEN9=[BETWEEN(false, $22, 150, 300)], BETWEEN10=[BETWEEN(false, $22, 50, 250)], BETWEEN11=[BETWEEN(false, $13, 100, 150)], BETWEEN12=[BETWEEN(false, $13, 50, 100)], BETWEEN13=[BETWEEN(false, $13, 150, 200)]) - HiveFilter(condition=[AND(OR(<=(100, $13), <=($13, 150), IS NOT NULL($13), <=($13, 200)), OR(<=(100, $22), <=($22, 200), IS NOT NULL($22), <=($22, 300), <=($22, 250)), IS NOT NULL($7), IS NOT NULL($4), IS NOT NULL($5), IS NOT NULL($6), IS NOT NULL($0))]) + HiveFilter(condition=[AND(OR(<=(100, $13), <=($13, 150), <=(50, $13), <=($13, 100), <=(150, $13), <=($13, 200)), OR(<=(100, $22), <=($22, 200), <=(150, $22), <=($22, 300), <=(50, $22), <=($22, 250)), IS NOT NULL($7), IS NOT NULL($4), IS NOT NULL($5), IS NOT NULL($6), IS NOT NULL($0))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(d_date_sk=[$0]) HiveFilter(condition=[AND(=($6, 2001), IS NOT NULL($0))]) HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject(ca_address_sk=[$0], IN=[IN($8, _UTF-16LE'KY', _UTF-16LE'GA', _UTF-16LE'NM')], IN2=[IN($8, _UTF-16LE'MT', _UTF-16LE'OR', _UTF-16LE'IN')], IN3=[IN($8, _UTF-16LE'WI', _UTF-16LE'MO', _UTF-16LE'WV')]) - HiveFilter(condition=[AND(IN($8, _UTF-16LE'KY', _UTF-16LE'GA', _UTF-16LE'NM', _UTF-16LE'MT', _UTF-16LE'OR', _UTF-16LE'IN', _UTF-16LE'WI', _UTF-16LE'MO', _UTF-16LE'WV'), =($10, _UTF-16LE'United States'), IS NOT NULL($0))]) - HiveTableScan(table=[[default, customer_address]], table:alias=[customer_address]) HiveProject(cd_demo_sk=[$0], ==[=($2, _UTF-16LE'M')], =2=[=($3, _UTF-16LE'4 yr Degree')], =3=[=($2, _UTF-16LE'D')], =4=[=($3, _UTF-16LE'Primary')], =5=[=($2, _UTF-16LE'U')], =6=[=($3, _UTF-16LE'Advanced Degree')]) HiveFilter(condition=[AND(IN($2, _UTF-16LE'M', _UTF-16LE'D', _UTF-16LE'U'), IN($3, _UTF-16LE'4 yr Degree', _UTF-16LE'Primary', _UTF-16LE'Advanced Degree'), IS NOT NULL($0))]) HiveTableScan(table=[[default, customer_demographics]], table:alias=[customer_demographics]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query31.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query31.q.out index 8907b8d6cd..a275e868dc 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query31.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query31.q.out @@ -112,7 +112,7 @@ POSTHOOK: Input: default@web_sales POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveProject(ca_county=[$8], d_year=[CAST(2000):INTEGER], web_q1_q2_increase=[/($6, $1)], store_q1_q2_increase=[/($9, $11)], web_q2_q3_increase=[/($4, $6)], store_q2_q3_increase=[/($13, $9)]) - HiveJoin(condition=[AND(AND(=($8, $0), CASE(>($11, 0), CASE($2, >(/($6, $1), /($9, $11)), >(null, /($9, $11))), CASE($2, >(/($6, $1), null), null))), CASE(>($9, 0), CASE($7, >(/($4, $6), /($13, $9)), >(null, /($13, $9))), CASE($7, >(/($4, $6), null), null)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[AND(AND(=($8, $0), CASE(>($11, 0), CASE($2, >(/($6, $1), /($9, $11)), null), null)), CASE(>($9, 0), CASE($7, >(/($4, $6), /($13, $9)), null), null))], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($0, $5)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($0, $3)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f3=[$1], >=[>($1, 0)]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query36.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query36.q.out index 9a74bed470..be191124a4 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query36.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query36.q.out @@ -69,7 +69,7 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveProject(gross_margin=[$0], i_category=[$1], i_class=[$2], lochierarchy=[$3], rank_within_parent=[$4]) HiveSortLimit(sort0=[$3], sort1=[$5], sort2=[$4], dir0=[DESC-nulls-last], dir1=[ASC], dir2=[ASC], fetch=[100]) - HiveProject(gross_margin=[/($2, $3)], i_category=[$0], i_class=[$1], lochierarchy=[+(grouping($4, 1), grouping($4, 0))], rank_within_parent=[rank() OVER (PARTITION BY +(grouping($4, 1), grouping($4, 0)), CASE(=(grouping($4, 0), 0), $0, null) ORDER BY /($2, $3) NULLS FIRST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)], (tok_function when (= (tok_table_or_col lochierarchy) 0) (tok_table_or_col i_category))=[CASE(=(+(grouping($4, 1), grouping($4, 0)), 0), $0, null)]) + HiveProject(gross_margin=[/($2, $3)], i_category=[$0], i_class=[$1], lochierarchy=[+(grouping($4, 1), grouping($4, 0))], rank_within_parent=[rank() OVER (PARTITION BY +(grouping($4, 1), grouping($4, 0)), CASE(=(grouping($4, 0), CAST(0):BIGINT), $0, null) ORDER BY /($2, $3) NULLS FIRST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)], (tok_function when (= (tok_table_or_col lochierarchy) 0) (tok_table_or_col i_category))=[CASE(=(+(grouping($4, 1), grouping($4, 0)), 0), $0, null)]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], GROUPING__ID=[$4]) HiveAggregate(group=[{0, 1}], groups=[[{0, 1}, {0}, {}]], agg#0=[sum($2)], agg#1=[sum($3)], GROUPING__ID=[GROUPING__ID()]) HiveProject($f0=[$9], $f1=[$8], $f2=[$4], $f3=[$3]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query4.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query4.q.out index 4b388653ae..524575bf7f 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query4.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query4.q.out @@ -229,7 +229,7 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100]) HiveProject(customer_preferred_cust_flag=[$1]) - HiveJoin(condition=[AND(=($0, $7), CASE(CAST(IS NOT NULL($8)):BOOLEAN, CASE($14, >(/($4, $13), /($2, $8)), >(null, /($2, $8))), CASE($14, >(/($4, $13), null), null)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[AND(=($0, $7), CASE(CAST(IS NOT NULL($8)):BOOLEAN, CASE($14, >(/($4, $13), /($2, $8)), null), null))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f3=[$3], $f8=[$7]) HiveAggregate(group=[{1, 2, 3, 4, 5, 6, 7}], agg#0=[sum($10)]) HiveJoin(condition=[=($0, $9)], joinType=[inner], algorithm=[none], cost=[not available]) @@ -243,7 +243,7 @@ HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100]) HiveProject(d_date_sk=[$0]) HiveFilter(condition=[AND(=($6, 2002), IS NOT NULL($0))]) HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveJoin(condition=[AND(=($4, $0), CASE($8, CASE($11, >(/($1, $10), /($3, $7)), >(null, /($3, $7))), CASE($11, >(/($1, $10), null), null)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[AND(=($4, $0), CASE($8, CASE($11, >(/($1, $10), /($3, $7)), null), null))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f8=[$7]) HiveAggregate(group=[{1, 2, 3, 4, 5, 6, 7}], agg#0=[sum($10)]) HiveJoin(condition=[=($0, $9)], joinType=[inner], algorithm=[none], cost=[not available]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query48.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query48.q.out index 22b051d06a..b0c15f3f0e 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query48.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query48.q.out @@ -156,7 +156,7 @@ HiveAggregate(group=[{}], agg#0=[sum($10)]) HiveTableScan(table=[[default, customer_demographics]], table:alias=[customer_demographics]) HiveJoin(condition=[=($0, $8)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ss_sold_date_sk=[$0], ss_cdemo_sk=[$4], ss_addr_sk=[$6], ss_store_sk=[$7], ss_quantity=[$10], BETWEEN=[BETWEEN(false, $22, 0, 2000)], BETWEEN6=[BETWEEN(false, $22, 150, 3000)], BETWEEN7=[BETWEEN(false, $22, 50, 25000)]) - HiveFilter(condition=[AND(OR(<=(100, $13), <=($13, 150), IS NOT NULL($13), <=($13, 200)), OR(<=(0, $22), <=($22, 2000), IS NOT NULL($22), <=($22, 3000), <=($22, 25000)), OR(BETWEEN(false, $13, 100, 150), BETWEEN(false, $13, 50, 100), BETWEEN(false, $13, 150, 200)), IS NOT NULL($7), IS NOT NULL($4), IS NOT NULL($6), IS NOT NULL($0))]) + HiveFilter(condition=[AND(OR(<=(100, $13), <=($13, 150), <=(50, $13), <=($13, 100), <=(150, $13), <=($13, 200)), OR(<=(0, $22), <=($22, 2000), <=(150, $22), <=($22, 3000), <=(50, $22), <=($22, 25000)), OR(BETWEEN(false, $13, 100, 150), BETWEEN(false, $13, 50, 100), BETWEEN(false, $13, 150, 200)), IS NOT NULL($7), IS NOT NULL($4), IS NOT NULL($6), IS NOT NULL($0))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(d_date_sk=[$0]) HiveFilter(condition=[AND(=($6, 1998), IS NOT NULL($0))]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query53.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query53.q.out index 9b42428097..e90a0ee169 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query53.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query53.q.out @@ -65,7 +65,7 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$2], sort1=[$1], sort2=[$0], dir0=[ASC], dir1=[ASC], dir2=[ASC], fetch=[100]) HiveProject((tok_table_or_col i_manufact_id)=[$0], (tok_function sum (tok_table_or_col ss_sales_price))=[$1], avg_window_0=[$2]) - HiveFilter(condition=[CASE(>($2, 0), >(/(ABS(-($1, $2)), $2), 0.1), null)]) + HiveFilter(condition=[CASE(>($2, 0), >(/(ABS(-($1, $2)), $2), 0.1), false)]) HiveProject((tok_table_or_col i_manufact_id)=[$0], (tok_function sum (tok_table_or_col ss_sales_price))=[$2], avg_window_0=[avg($2) OVER (PARTITION BY $0 ORDER BY $0 NULLS FIRST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)]) HiveProject(i_manufact_id=[$0], d_qoy=[$1], $f2=[$2]) HiveAggregate(group=[{6, 8}], agg#0=[sum($4)]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query6.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query6.q.out index f502c004cf..dbd946f22d 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query6.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query6.q.out @@ -94,7 +94,7 @@ HiveSortLimit(sort0=[$1], dir0=[ASC], fetch=[100]) HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($12))]) HiveTableScan(table=[[default, item]], table:alias=[i]) HiveJoin(condition=[true], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(i_category=[$0], *=[*(1.2, CAST(/($1, $2)):DECIMAL(16, 6))]) + HiveProject(i_category=[$0], *=[*(1.2, CASE(false, null, /($1, $2)))]) HiveAggregate(group=[{12}], agg#0=[sum($5)], agg#1=[count($5)]) HiveFilter(condition=[IS NOT NULL($12)]) HiveTableScan(table=[[default, item]], table:alias=[j]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query63.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query63.q.out index 78c9b13111..3152a13ef2 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query63.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query63.q.out @@ -67,7 +67,7 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$0], sort1=[$2], sort2=[$1], dir0=[ASC], dir1=[ASC], dir2=[ASC], fetch=[100]) HiveProject((tok_table_or_col i_manager_id)=[$0], (tok_function sum (tok_table_or_col ss_sales_price))=[$1], avg_window_0=[$2]) - HiveFilter(condition=[CASE(>($2, 0), >(/(ABS(-($1, $2)), $2), 0.1), null)]) + HiveFilter(condition=[CASE(>($2, 0), >(/(ABS(-($1, $2)), $2), 0.1), false)]) HiveProject((tok_table_or_col i_manager_id)=[$0], (tok_function sum (tok_table_or_col ss_sales_price))=[$2], avg_window_0=[avg($2) OVER (PARTITION BY $0 ORDER BY $0 NULLS FIRST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)]) HiveProject(i_manager_id=[$0], d_moy=[$1], $f2=[$2]) HiveAggregate(group=[{6, 8}], agg#0=[sum($4)]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query64.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query64.q.out index 356778b4a7..b363e30ce8 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query64.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query64.q.out @@ -337,7 +337,7 @@ HiveProject(product_name=[$0], store_name=[$1], store_zip=[$2], b_street_number= HiveFilter(condition=[AND(=($6, 2000), IS NOT NULL($0))]) HiveTableScan(table=[[default, date_dim]], table:alias=[d1]) HiveProject($f0=[$0]) - HiveFilter(condition=[>($1, *(2, $2))]) + HiveFilter(condition=[>($1, *(CAST(2):DECIMAL(10, 0), $2))]) HiveAggregate(group=[{0}], agg#0=[sum($2)], agg#1=[sum($5)]) HiveJoin(condition=[AND(=($0, $3), =($1, $4))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(cs_item_sk=[$15], cs_order_number=[$17], cs_ext_list_price=[$25]) @@ -419,7 +419,7 @@ HiveProject(product_name=[$0], store_name=[$1], store_zip=[$2], b_street_number= HiveFilter(condition=[AND(=($6, 2001), IS NOT NULL($0))]) HiveTableScan(table=[[default, date_dim]], table:alias=[d1]) HiveProject($f0=[$0]) - HiveFilter(condition=[>($1, *(2, $2))]) + HiveFilter(condition=[>($1, *(CAST(2):DECIMAL(10, 0), $2))]) HiveAggregate(group=[{0}], agg#0=[sum($2)], agg#1=[sum($5)]) HiveJoin(condition=[AND(=($0, $3), =($1, $4))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(cs_item_sk=[$15], cs_order_number=[$17], cs_ext_list_price=[$25]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query72.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query72.q.out index e49b44bf32..f7a718e84c 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query72.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query72.q.out @@ -110,7 +110,7 @@ HiveSortLimit(sort0=[$5], sort1=[$0], sort2=[$1], sort3=[$2], dir0=[DESC-nulls-l HiveProject(cs_sold_date_sk=[$0], cs_ship_date_sk=[$2], cs_bill_cdemo_sk=[$4], cs_bill_hdemo_sk=[$5], cs_item_sk=[$15], cs_promo_sk=[$16], cs_order_number=[$17], cs_quantity=[$18]) HiveFilter(condition=[AND(IS NOT NULL($15), IS NOT NULL($4), IS NOT NULL($5), IS NOT NULL($0), IS NOT NULL($2))]) HiveTableScan(table=[[default, catalog_sales]], table:alias=[catalog_sales]) - HiveProject(d_date_sk=[$0], d_week_seq=[$4], +=[+(CAST($2):DOUBLE, 5)]) + HiveProject(d_date_sk=[$0], d_week_seq=[$4], +=[+(CAST($2):DOUBLE, CAST(5):DOUBLE)]) HiveFilter(condition=[AND(=($6, 2001), IS NOT NULL($0), IS NOT NULL($4))]) HiveTableScan(table=[[default, date_dim]], table:alias=[d1]) HiveProject(cd_demo_sk=[$0]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query74.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query74.q.out index 4a9a1127b3..8d4d4f984d 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query74.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query74.q.out @@ -131,7 +131,7 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$1], sort1=[$0], sort2=[$2], dir0=[ASC], dir1=[ASC], dir2=[ASC], fetch=[100]) HiveProject(customer_id=[$0], customer_first_name=[$1], customer_last_name=[$2]) - HiveJoin(condition=[AND(=($0, $6), CASE(CAST(IS NOT NULL($7)):BOOLEAN, CASE($10, >(/($5, $9), /($3, $7)), >(null, /($3, $7))), CASE($10, >(/($5, $9), null), null)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[AND(=($0, $6), CASE(CAST(IS NOT NULL($7)):BOOLEAN, CASE($10, >(/($5, $9), /($3, $7)), null), null))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(c_customer_id=[$0], c_first_name=[$1], c_last_name=[$2], $f3=[$3]) HiveAggregate(group=[{1, 2, 3}], agg#0=[max($6)]) HiveJoin(condition=[=($0, $5)], joinType=[inner], algorithm=[none], cost=[not available]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query78.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query78.q.out index 02635826f0..805760e28e 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query78.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query78.q.out @@ -132,52 +132,54 @@ CBO PLAN: HiveSortLimit(fetch=[100]) HiveProject(ss_sold_year=[CAST(2000):INTEGER], ss_item_sk=[$0], ss_customer_sk=[$1], ratio=[$2], store_qty=[$3], store_wholesale_cost=[$4], store_sales_price=[$5], other_chan_qty=[$6], other_chan_wholesale_cost=[$7], other_chan_sales_price=[$8]) HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$9], sort3=[$10], sort4=[$11], sort5=[$6], sort6=[$7], sort7=[$8], sort8=[$12], dir0=[ASC], dir1=[ASC], dir2=[DESC-nulls-last], dir3=[DESC-nulls-last], dir4=[DESC-nulls-last], dir5=[ASC], dir6=[ASC], dir7=[ASC], dir8=[ASC]) - HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], ratio=[round(/(CAST($2):DOUBLE, CAST(CASE(AND(IS NOT NULL($7), IS NOT NULL($11)), +($7, $11), 1)):DOUBLE), 2)], store_qty=[$2], store_wholesale_cost=[$3], store_sales_price=[$4], other_chan_qty=[+(CASE(IS NOT NULL($7), $7, 0), CASE(IS NOT NULL($11), $11, 0))], other_chan_wholesale_cost=[+(CASE(IS NOT NULL($8), $8, 0), CASE(IS NOT NULL($12), $12, 0))], other_chan_sales_price=[+(CASE(IS NOT NULL($9), $9, 0), CASE(IS NOT NULL($13), $13, 0))], ss_qty=[$2], ss_wc=[$3], ss_sp=[$4], (tok_function round (/ (tok_table_or_col ss_qty) (tok_function coalesce (+ (tok_table_or_col ws_qty) (tok_table_or_col cs_qty)) 1)) 2)=[round(/(CAST($2):DOUBLE, CAST(CASE(AND(IS NOT NULL($7), IS NOT NULL($11)), +($7, $11), 1)):DOUBLE), 2)]) - HiveFilter(condition=[CASE(IS NOT NULL($11), >($11, 0), false)]) - HiveJoin(condition=[=($10, $1)], joinType=[left], algorithm=[none], cost=[not available]) - HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], $f2=[$2], $f3=[$3], $f4=[$4], ws_item_sk=[$5], ws_bill_customer_sk=[$6], $f20=[$7], $f30=[$8], $f40=[$9]) - HiveFilter(condition=[CASE(IS NOT NULL($7), >($7, 0), false)]) - HiveJoin(condition=[AND(=($5, $0), =($6, $1))], joinType=[left], algorithm=[none], cost=[not available]) - HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) - HiveAggregate(group=[{2, 3}], agg#0=[sum($4)], agg#1=[sum($5)], agg#2=[sum($6)]) - HiveJoin(condition=[=($1, $0)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(d_date_sk=[$0]) - HiveFilter(condition=[AND(=($6, 2000), IS NOT NULL($0))]) - HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$1], ss_customer_sk=[$2], ss_quantity=[$4], ss_wholesale_cost=[$5], ss_sales_price=[$6]) - HiveFilter(condition=[IS NULL($8)]) - HiveJoin(condition=[AND(=($8, $3), =($1, $7))], joinType=[left], algorithm=[none], cost=[not available]) - HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_customer_sk=[$3], ss_ticket_number=[$9], ss_quantity=[$10], ss_wholesale_cost=[$11], ss_sales_price=[$13]) - HiveFilter(condition=[IS NOT NULL($0)]) - HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) - HiveProject(sr_item_sk=[$2], sr_ticket_number=[$9]) - HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns]) - HiveProject(ws_item_sk=[$0], ws_bill_customer_sk=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) - HiveAggregate(group=[{2, 3}], agg#0=[sum($4)], agg#1=[sum($5)], agg#2=[sum($6)]) - HiveJoin(condition=[=($1, $0)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(d_date_sk=[$0]) - HiveFilter(condition=[AND(=($6, 2000), IS NOT NULL($0))]) - HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject(ws_sold_date_sk=[$0], ws_item_sk=[$1], ws_bill_customer_sk=[$2], ws_quantity=[$4], ws_wholesale_cost=[$5], ws_sales_price=[$6]) - HiveFilter(condition=[IS NULL($8)]) - HiveJoin(condition=[AND(=($8, $3), =($1, $7))], joinType=[left], algorithm=[none], cost=[not available]) - HiveProject(ws_sold_date_sk=[$0], ws_item_sk=[$3], ws_bill_customer_sk=[$4], ws_order_number=[$17], ws_quantity=[$18], ws_wholesale_cost=[$19], ws_sales_price=[$21]) - HiveFilter(condition=[IS NOT NULL($0)]) - HiveTableScan(table=[[default, web_sales]], table:alias=[web_sales]) - HiveProject(wr_item_sk=[$2], wr_order_number=[$13]) - HiveTableScan(table=[[default, web_returns]], table:alias=[web_returns]) - HiveProject($f2=[$0], $f3=[$2], $f4=[$3], $f5=[$4]) + HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], ratio=[round(/(CAST($2):DOUBLE, CAST(CASE(IS NOT NULL(+($7, $11)), +($7, $11), 1)):DOUBLE), 2)], store_qty=[$2], store_wholesale_cost=[$3], store_sales_price=[$4], other_chan_qty=[+(CASE(IS NOT NULL($7), $7, 0), $12)], other_chan_wholesale_cost=[+(CASE(IS NOT NULL($8), $8, 0), $13)], other_chan_sales_price=[+(CASE(IS NOT NULL($9), $9, 0), $14)], ss_qty=[$2], ss_wc=[$3], ss_sp=[$4], (tok_function round (/ (tok_table_or_col ss_qty) (tok_function coalesce (+ (tok_table_or_col ws_qty) (tok_table_or_col cs_qty)) 1)) 2)=[round(/(CAST($2):DOUBLE, CAST(CASE(IS NOT NULL(+($7, $11)), +($7, $11), 1)):DOUBLE), 2)]) + HiveJoin(condition=[=($10, $1)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[AND(=($5, $0), =($6, $1))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) HiveAggregate(group=[{2, 3}], agg#0=[sum($4)], agg#1=[sum($5)], agg#2=[sum($6)]) HiveJoin(condition=[=($1, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(d_date_sk=[$0]) HiveFilter(condition=[AND(=($6, 2000), IS NOT NULL($0))]) HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject(cs_sold_date_sk=[$0], cs_bill_customer_sk=[$1], cs_item_sk=[$2], cs_quantity=[$4], cs_wholesale_cost=[$5], cs_sales_price=[$6]) + HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$1], ss_customer_sk=[$2], ss_quantity=[$4], ss_wholesale_cost=[$5], ss_sales_price=[$6]) HiveFilter(condition=[IS NULL($8)]) - HiveJoin(condition=[AND(=($8, $3), =($2, $7))], joinType=[left], algorithm=[none], cost=[not available]) - HiveProject(cs_sold_date_sk=[$0], cs_bill_customer_sk=[$3], cs_item_sk=[$15], cs_order_number=[$17], cs_quantity=[$18], cs_wholesale_cost=[$19], cs_sales_price=[$21]) - HiveFilter(condition=[AND(=($15, $15), IS NOT NULL($0))]) - HiveTableScan(table=[[default, catalog_sales]], table:alias=[catalog_sales]) - HiveProject(cr_item_sk=[$2], cr_order_number=[$16]) - HiveTableScan(table=[[default, catalog_returns]], table:alias=[catalog_returns]) + HiveJoin(condition=[AND(=($8, $3), =($1, $7))], joinType=[left], algorithm=[none], cost=[not available]) + HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_customer_sk=[$3], ss_ticket_number=[$9], ss_quantity=[$10], ss_wholesale_cost=[$11], ss_sales_price=[$13]) + HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($2), IS NOT NULL($3))]) + HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) + HiveProject(sr_item_sk=[$2], sr_ticket_number=[$9]) + HiveFilter(condition=[IS NOT NULL($2)]) + HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns]) + HiveProject(ws_item_sk=[$0], ws_bill_customer_sk=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) + HiveFilter(condition=[>($2, 0)]) + HiveAggregate(group=[{2, 3}], agg#0=[sum($4)], agg#1=[sum($5)], agg#2=[sum($6)]) + HiveJoin(condition=[=($1, $0)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(d_date_sk=[$0]) + HiveFilter(condition=[AND(=($6, 2000), IS NOT NULL($0))]) + HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) + HiveProject(ws_sold_date_sk=[$0], ws_item_sk=[$1], ws_bill_customer_sk=[$2], ws_quantity=[$4], ws_wholesale_cost=[$5], ws_sales_price=[$6]) + HiveFilter(condition=[IS NULL($8)]) + HiveJoin(condition=[AND(=($8, $3), =($1, $7))], joinType=[left], algorithm=[none], cost=[not available]) + HiveProject(ws_sold_date_sk=[$0], ws_item_sk=[$3], ws_bill_customer_sk=[$4], ws_order_number=[$17], ws_quantity=[$18], ws_wholesale_cost=[$19], ws_sales_price=[$21]) + HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($3), IS NOT NULL($4))]) + HiveTableScan(table=[[default, web_sales]], table:alias=[web_sales]) + HiveProject(wr_item_sk=[$2], wr_order_number=[$13]) + HiveFilter(condition=[IS NOT NULL($2)]) + HiveTableScan(table=[[default, web_returns]], table:alias=[web_returns]) + HiveProject($f2=[$1], $f3=[$2], CASE=[CASE(IS NOT NULL($2), $2, 0)], CASE6=[CASE(IS NOT NULL($3), $3, 0)], CASE7=[CASE(IS NOT NULL($4), $4, 0)]) + HiveFilter(condition=[>($2, 0)]) + HiveProject(cs_item_sk=[$1], cs_bill_customer_sk=[$0], $f2=[$2], $f3=[$3], $f4=[$4]) + HiveAggregate(group=[{2, 3}], agg#0=[sum($4)], agg#1=[sum($5)], agg#2=[sum($6)]) + HiveJoin(condition=[=($1, $0)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(d_date_sk=[$0]) + HiveFilter(condition=[AND(=($6, 2000), IS NOT NULL($0))]) + HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) + HiveProject(cs_sold_date_sk=[$0], cs_bill_customer_sk=[$1], cs_item_sk=[$2], cs_quantity=[$4], cs_wholesale_cost=[$5], cs_sales_price=[$6]) + HiveFilter(condition=[IS NULL($8)]) + HiveJoin(condition=[AND(=($8, $3), =($2, $7))], joinType=[left], algorithm=[none], cost=[not available]) + HiveProject(cs_sold_date_sk=[$0], cs_bill_customer_sk=[$3], cs_item_sk=[$15], cs_order_number=[$17], cs_quantity=[$18], cs_wholesale_cost=[$19], cs_sales_price=[$21]) + HiveFilter(condition=[AND(=($15, $15), IS NOT NULL($0), IS NOT NULL($3))]) + HiveTableScan(table=[[default, catalog_sales]], table:alias=[catalog_sales]) + HiveProject(cr_item_sk=[$2], cr_order_number=[$16]) + HiveTableScan(table=[[default, catalog_returns]], table:alias=[catalog_returns]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query85.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query85.q.out index 0963936768..0167dcb677 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query85.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query85.q.out @@ -189,7 +189,7 @@ HiveProject(_o__c0=[$0], _o__c1=[$1], _o__c2=[$2], _o__c3=[$3]) HiveJoin(condition=[AND(AND(AND(=($1, $21), =($3, $26)), OR(AND($15, $16, $8), AND($17, $18, $9), AND($19, $20, $10))), OR(AND($30, $5), AND($31, $6), AND($32, $7)))], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($0, $11)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ws_sold_date_sk=[$0], ws_item_sk=[$3], ws_web_page_sk=[$12], ws_order_number=[$17], ws_quantity=[$18], BETWEEN=[BETWEEN(false, $33, 100, 200)], BETWEEN6=[BETWEEN(false, $33, 150, 300)], BETWEEN7=[BETWEEN(false, $33, 50, 250)], BETWEEN8=[BETWEEN(false, $21, 100, 150)], BETWEEN9=[BETWEEN(false, $21, 50, 100)], BETWEEN10=[BETWEEN(false, $21, 150, 200)]) - HiveFilter(condition=[AND(OR(<=(100, $21), <=($21, 150), IS NOT NULL($21), <=($21, 200)), OR(<=(100, $33), <=($33, 200), IS NOT NULL($33), <=($33, 300), <=($33, 250)), IS NOT NULL($3), IS NOT NULL($17), IS NOT NULL($12), IS NOT NULL($0))]) + HiveFilter(condition=[AND(OR(<=(100, $21), <=($21, 150), <=(50, $21), <=($21, 100), <=(150, $21), <=($21, 200)), OR(<=(100, $33), <=($33, 200), <=(150, $33), <=($33, 300), <=(50, $33), <=($33, 250)), IS NOT NULL($3), IS NOT NULL($17), IS NOT NULL($12), IS NOT NULL($0))]) HiveTableScan(table=[[default, web_sales]], table:alias=[web_sales]) HiveProject(d_date_sk=[$0]) HiveFilter(condition=[AND(=($6, 1998), IS NOT NULL($0))]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query88.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query88.q.out index 1f4471e8ae..5dbc2bcfc6 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query88.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query88.q.out @@ -217,7 +217,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 8), >=($4, 30), IS NOT NULL($0))]) @@ -234,7 +234,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 12), <($4, 30), IS NOT NULL($0))]) @@ -251,7 +251,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 11), >=($4, 30), IS NOT NULL($0))]) @@ -268,7 +268,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 11), <($4, 30), IS NOT NULL($0))]) @@ -285,7 +285,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 10), >=($4, 30), IS NOT NULL($0))]) @@ -302,7 +302,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 10), <($4, 30), IS NOT NULL($0))]) @@ -319,7 +319,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 9), >=($4, 30), IS NOT NULL($0))]) @@ -336,7 +336,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))), IS NOT NULL($0))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 9), <($4, 30), IS NOT NULL($0))]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query89.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query89.q.out index 7cfb3ecdec..5b77d1db9b 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query89.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query89.q.out @@ -66,7 +66,7 @@ CBO PLAN: HiveProject(i_category=[$0], i_class=[$1], i_brand=[$2], s_store_name=[$3], s_company_name=[$4], d_moy=[$5], sum_sales=[$6], avg_monthly_sales=[$7]) HiveSortLimit(sort0=[$8], sort1=[$3], dir0=[ASC], dir1=[ASC], fetch=[100]) HiveProject(i_category=[$0], i_class=[$1], i_brand=[$2], s_store_name=[$3], s_company_name=[$4], d_moy=[$5], sum_sales=[$6], avg_monthly_sales=[$7], (- (tok_table_or_col sum_sales) (tok_table_or_col avg_monthly_sales))=[-($6, $7)]) - HiveFilter(condition=[CASE(<>($7, 0), >(/(ABS(-($6, $7)), $7), 0.1), null)]) + HiveFilter(condition=[CASE(<>($7, 0), >(/(ABS(-($6, $7)), $7), 0.1), false)]) HiveProject((tok_table_or_col i_category)=[$2], (tok_table_or_col i_class)=[$1], (tok_table_or_col i_brand)=[$0], (tok_table_or_col s_store_name)=[$4], (tok_table_or_col s_company_name)=[$5], (tok_table_or_col d_moy)=[$3], (tok_function sum (tok_table_or_col ss_sales_price))=[$6], avg_window_0=[avg($6) OVER (PARTITION BY $2, $0, $4, $5 ORDER BY $2 NULLS FIRST, $0 NULLS FIRST, $4 NULLS FIRST, $5 NULLS FIRST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)]) HiveProject(i_brand=[$0], i_class=[$1], i_category=[$2], d_moy=[$3], s_store_name=[$4], s_company_name=[$5], $f6=[$6]) HiveAggregate(group=[{5, 6, 7, 9, 11, 12}], agg#0=[sum($3)]) diff --git ql/src/test/results/clientpositive/perf/tez/cbo_query97.q.out ql/src/test/results/clientpositive/perf/tez/cbo_query97.q.out index f79dffbdc8..b1b88ab47b 100644 --- ql/src/test/results/clientpositive/perf/tez/cbo_query97.q.out +++ ql/src/test/results/clientpositive/perf/tez/cbo_query97.q.out @@ -58,7 +58,7 @@ CBO PLAN: HiveSortLimit(fetch=[100]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2]) HiveAggregate(group=[{}], agg#0=[sum($0)], agg#1=[sum($1)], agg#2=[sum($2)]) - HiveProject($f0=[CASE(AND(IS NOT NULL($0), IS NULL($2)), 1, 0)], $f1=[CASE(AND(IS NULL($0), IS NOT NULL($2)), 1, 0)], $f2=[CASE(AND(IS NOT NULL($0), IS NOT NULL($2)), 1, 0)]) + HiveProject($f0=[CAST(CASE(AND(IS NULL($2), IS NOT NULL($0)), 1, 0)):INTEGER], $f1=[CASE(AND(IS NULL($0), IS NOT NULL($2)), 1, 0)], $f2=[CASE(AND(IS NOT NULL($0), IS NOT NULL($2)), 1, 0)]) HiveJoin(condition=[AND(=($0, $2), =($1, $3))], joinType=[full], algorithm=[none], cost=[not available]) HiveProject(ss_customer_sk=[$1], ss_item_sk=[$0]) HiveAggregate(group=[{1, 2}]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_ext_query1.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_ext_query1.q.out index 255261bdaa..4d3ba45bd7 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_ext_query1.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_ext_query1.q.out @@ -59,10 +59,10 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### HiveProject(c_customer_id=[$1]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveJoin(condition=[AND(=($3, $7), >($4, $6))], joinType=[inner], algorithm=[none], cost=[not available]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveJoin(condition=[=($2, $0)], joinType=[inner], algorithm=[none], cost=[not available]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveProject(c_customer_sk=[$0], c_customer_id=[$1]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveTableScan(table=[[default, customer]], table:alias=[customer]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveJoin(condition=[=($2, $0)], joinType=[inner], algorithm=[none], cost=[not available]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveProject(c_customer_sk=[$0], c_customer_id=[$1]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveTableScan(table=[[default, customer]], table:alias=[customer]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveJoin(condition=[AND(=($1, $5), >($2, $4))], joinType=[inner], algorithm=[none], cost=[not available]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### HiveJoin(condition=[=($3, $1)], joinType=[inner], algorithm=[none], cost=[not available]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### HiveProject(sr_customer_sk=[$0], sr_store_sk=[$1], $f2=[$2]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### HiveAggregate(group=[{1, 2}], agg#0=[sum($3)]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### @@ -76,17 +76,17 @@ HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100]): rowcount = ###Masked###, cum HiveProject(s_store_sk=[$0]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### HiveFilter(condition=[=($24, _UTF-16LE'NM')]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### HiveTableScan(table=[[default, store]], table:alias=[store]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveProject(_o__c0=[*(/($1, $2), 1.2)], ctr_store_sk=[$0]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveAggregate(group=[{1}], agg#0=[sum($2)], agg#1=[count($2)]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveProject(sr_customer_sk=[$0], sr_store_sk=[$1], $f2=[$2]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveAggregate(group=[{1, 2}], agg#0=[sum($3)]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveJoin(condition=[=($0, $4)], joinType=[inner], algorithm=[none], cost=[not available]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveProject(sr_returned_date_sk=[$0], sr_customer_sk=[$3], sr_store_sk=[$7], sr_fee=[$14]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7))]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveProject(d_date_sk=[$0]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveFilter(condition=[=($6, 2000)]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveProject(_o__c0=[*(/($1, $2), 1.2)], ctr_store_sk=[$0]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveAggregate(group=[{1}], agg#0=[sum($2)], agg#1=[count($2)]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveProject(sr_customer_sk=[$0], sr_store_sk=[$1], $f2=[$2]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveAggregate(group=[{1, 2}], agg#0=[sum($3)]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveJoin(condition=[=($0, $4)], joinType=[inner], algorithm=[none], cost=[not available]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveProject(sr_returned_date_sk=[$0], sr_customer_sk=[$3], sr_store_sk=[$7], sr_fee=[$14]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7))]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveProject(d_date_sk=[$0]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveFilter(condition=[=($6, 2000)]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### PREHOOK: query: explain cbo joincost with customer_total_return as @@ -149,10 +149,10 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### HiveProject(c_customer_id=[$1]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveJoin(condition=[AND(=($3, $7), >($4, $6))], joinType=[inner], algorithm=[none], cost=[{415687.382770037 rows, 0.0 cpu, 0.0 io}]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveJoin(condition=[=($2, $0)], joinType=[inner], algorithm=[none], cost=[{8.00093932086143E7 rows, 0.0 cpu, 0.0 io}]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveProject(c_customer_sk=[$0], c_customer_id=[$1]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveTableScan(table=[[default, customer]], table:alias=[customer]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveJoin(condition=[=($2, $0)], joinType=[inner], algorithm=[none], cost=[{8.041115324461429E7 rows, 0.0 cpu, 0.0 io}]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveProject(c_customer_sk=[$0], c_customer_id=[$1]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveTableScan(table=[[default, customer]], table:alias=[customer]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveJoin(condition=[AND(=($1, $5), >($2, $4))], joinType=[inner], algorithm=[none], cost=[{415687.382770037 rows, 0.0 cpu, 0.0 io}]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### HiveJoin(condition=[=($3, $1)], joinType=[inner], algorithm=[none], cost=[{460301.9976112889 rows, 0.0 cpu, 0.0 io}]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### HiveProject(sr_customer_sk=[$0], sr_store_sk=[$1], $f2=[$2]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### HiveAggregate(group=[{1, 2}], agg#0=[sum($3)]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### @@ -166,15 +166,15 @@ HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100]): rowcount = ###Masked###, cum HiveProject(s_store_sk=[$0]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### HiveFilter(condition=[=($24, _UTF-16LE'NM')]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### HiveTableScan(table=[[default, store]], table:alias=[store]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveProject(_o__c0=[*(/($1, $2), 1.2)], ctr_store_sk=[$0]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveAggregate(group=[{1}], agg#0=[sum($2)], agg#1=[count($2)]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveProject(sr_customer_sk=[$0], sr_store_sk=[$1], $f2=[$2]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveAggregate(group=[{1, 2}], agg#0=[sum($3)]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveJoin(condition=[=($0, $4)], joinType=[inner], algorithm=[none], cost=[{5.3635511784936875E7 rows, 0.0 cpu, 0.0 io}]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveProject(sr_returned_date_sk=[$0], sr_customer_sk=[$3], sr_store_sk=[$7], sr_fee=[$14]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7))]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveProject(d_date_sk=[$0]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveFilter(condition=[=($6, 2000)]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### - HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveProject(_o__c0=[*(/($1, $2), 1.2)], ctr_store_sk=[$0]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveAggregate(group=[{1}], agg#0=[sum($2)], agg#1=[count($2)]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveProject(sr_customer_sk=[$0], sr_store_sk=[$1], $f2=[$2]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveAggregate(group=[{1, 2}], agg#0=[sum($3)]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveJoin(condition=[=($0, $4)], joinType=[inner], algorithm=[none], cost=[{5.3635511784936875E7 rows, 0.0 cpu, 0.0 io}]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveProject(sr_returned_date_sk=[$0], sr_customer_sk=[$3], sr_store_sk=[$7], sr_fee=[$14]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7))]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveProject(d_date_sk=[$0]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveFilter(condition=[=($6, 2000)]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### + HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]): rowcount = ###Masked###, cumulative cost = ###Masked###, id = ###Masked### diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query1.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query1.q.out index 13801ffc6c..92b40c95e0 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query1.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query1.q.out @@ -59,10 +59,10 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100]) HiveProject(c_customer_id=[$1]) - HiveJoin(condition=[AND(=($3, $7), >($4, $6))], joinType=[inner], algorithm=[none], cost=[not available]) - HiveJoin(condition=[=($2, $0)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(c_customer_sk=[$0], c_customer_id=[$1]) - HiveTableScan(table=[[default, customer]], table:alias=[customer]) + HiveJoin(condition=[=($2, $0)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(c_customer_sk=[$0], c_customer_id=[$1]) + HiveTableScan(table=[[default, customer]], table:alias=[customer]) + HiveJoin(condition=[AND(=($1, $5), >($2, $4))], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($3, $1)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(sr_customer_sk=[$0], sr_store_sk=[$1], $f2=[$2]) HiveAggregate(group=[{1, 2}], agg#0=[sum($3)]) @@ -76,15 +76,15 @@ HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100]) HiveProject(s_store_sk=[$0]) HiveFilter(condition=[=($24, _UTF-16LE'NM')]) HiveTableScan(table=[[default, store]], table:alias=[store]) - HiveProject(_o__c0=[*(/($1, $2), 1.2)], ctr_store_sk=[$0]) - HiveAggregate(group=[{1}], agg#0=[sum($2)], agg#1=[count($2)]) - HiveProject(sr_customer_sk=[$0], sr_store_sk=[$1], $f2=[$2]) - HiveAggregate(group=[{1, 2}], agg#0=[sum($3)]) - HiveJoin(condition=[=($0, $4)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(sr_returned_date_sk=[$0], sr_customer_sk=[$3], sr_store_sk=[$7], sr_fee=[$14]) - HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7))]) - HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns]) - HiveProject(d_date_sk=[$0]) - HiveFilter(condition=[=($6, 2000)]) - HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) + HiveProject(_o__c0=[*(/($1, $2), 1.2)], ctr_store_sk=[$0]) + HiveAggregate(group=[{1}], agg#0=[sum($2)], agg#1=[count($2)]) + HiveProject(sr_customer_sk=[$0], sr_store_sk=[$1], $f2=[$2]) + HiveAggregate(group=[{1, 2}], agg#0=[sum($3)]) + HiveJoin(condition=[=($0, $4)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(sr_returned_date_sk=[$0], sr_customer_sk=[$3], sr_store_sk=[$7], sr_fee=[$14]) + HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7))]) + HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns]) + HiveProject(d_date_sk=[$0]) + HiveFilter(condition=[=($6, 2000)]) + HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query11.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query11.q.out index f315e3c455..cec4cfad1f 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query11.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query11.q.out @@ -159,7 +159,7 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100]) HiveProject(c_preferred_cust_flag=[$1]) - HiveJoin(condition=[AND(=($0, $8), CASE(CAST(IS NOT NULL($9)):BOOLEAN, CASE($7, >(/($4, $6), /($2, $9)), >(null, /($2, $9))), CASE($7, >(/($4, $6), null), null)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[AND(=($0, $8), CASE(CAST(IS NOT NULL($9)):BOOLEAN, CASE($7, >(/($4, $6), /($2, $9)), null), null))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f4=[$3], $f9=[$7]) HiveAggregate(group=[{1, 2, 3, 4, 5, 6, 7}], agg#0=[sum($10)]) HiveJoin(condition=[=($0, $9)], joinType=[inner], algorithm=[none], cost=[not available]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query13.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query13.q.out index a08c5a4be1..13a8a49c8c 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query13.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query13.q.out @@ -114,23 +114,23 @@ POSTHOOK: Input: default@store_sales POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveProject($f0=[/(CAST($0):DOUBLE, $1)], $f1=[/($2, $3)], $f2=[/($4, $5)], $f3=[CAST($4):DECIMAL(17, 2)]) - HiveAggregate(group=[{}], agg#0=[sum($11)], agg#1=[count($11)], agg#2=[sum($12)], agg#3=[count($12)], agg#4=[sum($13)], agg#5=[count($13)]) - HiveJoin(condition=[AND(=($9, $25), OR(AND($1, $2, $17, $26), AND($3, $4, $18, $27), AND($5, $6, $19, $27)))], joinType=[inner], algorithm=[none], cost=[not available]) - HiveJoin(condition=[=($0, $8)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveAggregate(group=[{}], agg#0=[sum($15)], agg#1=[count($15)], agg#2=[sum($16)], agg#3=[count($16)], agg#4=[sum($17)], agg#5=[count($17)]) + HiveJoin(condition=[AND(=($13, $25), OR(AND($1, $2, $21, $26), AND($3, $4, $22, $27), AND($5, $6, $23, $27)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[=($0, $12)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(cd_demo_sk=[$0], ==[=($2, _UTF-16LE'M')], =2=[=($3, _UTF-16LE'4 yr Degree')], =3=[=($2, _UTF-16LE'D')], =4=[=($3, _UTF-16LE'Primary')], =5=[=($2, _UTF-16LE'U')], =6=[=($3, _UTF-16LE'Advanced Degree')]) HiveFilter(condition=[AND(IN($2, _UTF-16LE'M', _UTF-16LE'D', _UTF-16LE'U'), IN($3, _UTF-16LE'4 yr Degree', _UTF-16LE'Primary', _UTF-16LE'Advanced Degree'))]) HiveTableScan(table=[[default, customer_demographics]], table:alias=[customer_demographics]) - HiveJoin(condition=[AND(=($3, $14), OR(AND($15, $7), AND($16, $8), AND($17, $9)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[AND(=($7, $0), OR(AND($1, $11), AND($2, $12), AND($3, $13)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(ca_address_sk=[$0], IN=[IN($8, _UTF-16LE'KY', _UTF-16LE'GA', _UTF-16LE'NM')], IN2=[IN($8, _UTF-16LE'MT', _UTF-16LE'OR', _UTF-16LE'IN')], IN3=[IN($8, _UTF-16LE'WI', _UTF-16LE'MO', _UTF-16LE'WV')]) + HiveFilter(condition=[AND(IN($8, _UTF-16LE'KY', _UTF-16LE'GA', _UTF-16LE'NM', _UTF-16LE'MT', _UTF-16LE'OR', _UTF-16LE'IN', _UTF-16LE'WI', _UTF-16LE'MO', _UTF-16LE'WV'), =($10, _UTF-16LE'United States'))]) + HiveTableScan(table=[[default, customer_address]], table:alias=[customer_address]) HiveJoin(condition=[=($0, $13)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ss_sold_date_sk=[$0], ss_cdemo_sk=[$4], ss_hdemo_sk=[$5], ss_addr_sk=[$6], ss_quantity=[$10], ss_ext_sales_price=[$15], ss_ext_wholesale_cost=[$16], BETWEEN=[BETWEEN(false, $22, 100, 200)], BETWEEN9=[BETWEEN(false, $22, 150, 300)], BETWEEN10=[BETWEEN(false, $22, 50, 250)], BETWEEN11=[BETWEEN(false, $13, 100, 150)], BETWEEN12=[BETWEEN(false, $13, 50, 100)], BETWEEN13=[BETWEEN(false, $13, 150, 200)]) - HiveFilter(condition=[AND(OR(<=(100, $13), <=($13, 150), IS NOT NULL($13), <=($13, 200)), OR(<=(100, $22), <=($22, 200), IS NOT NULL($22), <=($22, 300), <=($22, 250)), IS NOT NULL($7), IS NOT NULL($4), IS NOT NULL($5), IS NOT NULL($6), IS NOT NULL($0))]) + HiveFilter(condition=[AND(OR(<=(100, $13), <=($13, 150), <=(50, $13), <=($13, 100), <=(150, $13), <=($13, 200)), OR(<=(100, $22), <=($22, 200), <=(150, $22), <=($22, 300), <=(50, $22), <=($22, 250)), IS NOT NULL($7), IS NOT NULL($4), IS NOT NULL($5), IS NOT NULL($6), IS NOT NULL($0))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(d_date_sk=[$0]) HiveFilter(condition=[=($6, 2001)]) HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject(ca_address_sk=[$0], IN=[IN($8, _UTF-16LE'KY', _UTF-16LE'GA', _UTF-16LE'NM')], IN2=[IN($8, _UTF-16LE'MT', _UTF-16LE'OR', _UTF-16LE'IN')], IN3=[IN($8, _UTF-16LE'WI', _UTF-16LE'MO', _UTF-16LE'WV')]) - HiveFilter(condition=[AND(IN($8, _UTF-16LE'KY', _UTF-16LE'GA', _UTF-16LE'NM', _UTF-16LE'MT', _UTF-16LE'OR', _UTF-16LE'IN', _UTF-16LE'WI', _UTF-16LE'MO', _UTF-16LE'WV'), =($10, _UTF-16LE'United States'))]) - HiveTableScan(table=[[default, customer_address]], table:alias=[customer_address]) HiveProject(hd_demo_sk=[$0], ==[=($3, 3)], =2=[=($3, 1)]) HiveFilter(condition=[IN($3, 3, 1)]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query31.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query31.q.out index f8e31a23aa..98e1bf5972 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query31.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query31.q.out @@ -112,7 +112,7 @@ POSTHOOK: Input: default@web_sales POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveProject(ca_county=[$8], d_year=[CAST(2000):INTEGER], web_q1_q2_increase=[/($6, $1)], store_q1_q2_increase=[/($9, $11)], web_q2_q3_increase=[/($4, $6)], store_q2_q3_increase=[/($13, $9)]) - HiveJoin(condition=[AND(AND(=($8, $0), CASE(>($11, 0), CASE($2, >(/($6, $1), /($9, $11)), >(null, /($9, $11))), CASE($2, >(/($6, $1), null), null))), CASE(>($9, 0), CASE($7, >(/($4, $6), /($13, $9)), >(null, /($13, $9))), CASE($7, >(/($4, $6), null), null)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[AND(AND(=($8, $0), CASE(>($11, 0), CASE($2, >(/($6, $1), /($9, $11)), null), null)), CASE(>($9, 0), CASE($7, >(/($4, $6), /($13, $9)), null), null))], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($0, $5)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($0, $3)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f3=[$1], >=[>($1, 0)]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query36.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query36.q.out index d4031261c7..d2f9280da5 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query36.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query36.q.out @@ -69,7 +69,7 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveProject(gross_margin=[$0], i_category=[$1], i_class=[$2], lochierarchy=[$3], rank_within_parent=[$4]) HiveSortLimit(sort0=[$3], sort1=[$5], sort2=[$4], dir0=[DESC-nulls-last], dir1=[ASC], dir2=[ASC], fetch=[100]) - HiveProject(gross_margin=[/($2, $3)], i_category=[$0], i_class=[$1], lochierarchy=[+(grouping($4, 1), grouping($4, 0))], rank_within_parent=[rank() OVER (PARTITION BY +(grouping($4, 1), grouping($4, 0)), CASE(=(grouping($4, 0), 0), $0, null) ORDER BY /($2, $3) NULLS FIRST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)], (tok_function when (= (tok_table_or_col lochierarchy) 0) (tok_table_or_col i_category))=[CASE(=(+(grouping($4, 1), grouping($4, 0)), 0), $0, null)]) + HiveProject(gross_margin=[/($2, $3)], i_category=[$0], i_class=[$1], lochierarchy=[+(grouping($4, 1), grouping($4, 0))], rank_within_parent=[rank() OVER (PARTITION BY +(grouping($4, 1), grouping($4, 0)), CASE(=(grouping($4, 0), CAST(0):BIGINT), $0, null) ORDER BY /($2, $3) NULLS FIRST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)], (tok_function when (= (tok_table_or_col lochierarchy) 0) (tok_table_or_col i_category))=[CASE(=(+(grouping($4, 1), grouping($4, 0)), 0), $0, null)]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2], $f3=[$3], GROUPING__ID=[$4]) HiveAggregate(group=[{0, 1}], groups=[[{0, 1}, {0}, {}]], agg#0=[sum($2)], agg#1=[sum($3)], GROUPING__ID=[GROUPING__ID()]) HiveProject($f0=[$9], $f1=[$8], $f2=[$4], $f3=[$3]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query4.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query4.q.out index 9668e0f4a1..fa88895ecd 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query4.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query4.q.out @@ -229,7 +229,7 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100]) HiveProject(customer_preferred_cust_flag=[$1]) - HiveJoin(condition=[AND(=($0, $10), CASE(CAST(IS NOT NULL($11)):BOOLEAN, CASE($14, >(/($6, $13), /($2, $11)), >(null, /($2, $11))), CASE($14, >(/($6, $13), null), null)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[AND(=($0, $10), CASE(CAST(IS NOT NULL($11)):BOOLEAN, CASE($14, >(/($6, $13), /($2, $11)), null), null))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f3=[$3], $f8=[$7]) HiveAggregate(group=[{1, 2, 3, 4, 5, 6, 7}], agg#0=[sum($10)]) HiveJoin(condition=[=($0, $9)], joinType=[inner], algorithm=[none], cost=[not available]) @@ -242,7 +242,7 @@ HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100]) HiveProject(d_date_sk=[$0]) HiveFilter(condition=[=($6, 2002)]) HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveJoin(condition=[AND(=($7, $0), CASE($6, CASE($11, >(/($3, $10), /($1, $5)), >(null, /($1, $5))), CASE($11, >(/($3, $10), null), null)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[AND(=($7, $0), CASE($6, CASE($11, >(/($3, $10), /($1, $5)), null), null))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject($f0=[$0], $f8=[$7]) HiveAggregate(group=[{1, 2, 3, 4, 5, 6, 7}], agg#0=[sum($10)]) HiveJoin(condition=[=($0, $9)], joinType=[inner], algorithm=[none], cost=[not available]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query46.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query46.q.out index 9d21449b65..df36f9ba14 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query46.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query46.q.out @@ -82,32 +82,32 @@ POSTHOOK: Input: default@store_sales POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$2], sort3=[$3], sort4=[$4], dir0=[ASC], dir1=[ASC], dir2=[ASC], dir3=[ASC], dir4=[ASC], fetch=[100]) - HiveProject(c_last_name=[$5], c_first_name=[$4], ca_city=[$1], bought_city=[$8], ss_ticket_number=[$6], amt=[$9], profit=[$10]) - HiveJoin(condition=[AND(=($3, $0), <>($1, $8))], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(ca_address_sk=[$0], ca_city=[$6]) - HiveTableScan(table=[[default, customer_address]], table:alias=[current_addr]) - HiveJoin(condition=[=($5, $0)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(c_last_name=[$3], c_first_name=[$2], ca_city=[$5], bought_city=[$8], ss_ticket_number=[$6], amt=[$9], profit=[$10]) + HiveJoin(condition=[AND(<>($5, $8), =($7, $0))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[=($1, $4)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(c_customer_sk=[$0], c_current_addr_sk=[$4], c_first_name=[$8], c_last_name=[$9]) HiveFilter(condition=[IS NOT NULL($4)]) HiveTableScan(table=[[default, customer]], table:alias=[customer]) - HiveProject(ss_ticket_number=[$3], ss_customer_sk=[$1], bought_city=[$0], amt=[$4], profit=[$5]) - HiveAggregate(group=[{1, 3, 5, 7}], agg#0=[sum($8)], agg#1=[sum($9)]) - HiveJoin(condition=[=($5, $0)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(ca_address_sk=[$0], ca_city=[$6]) - HiveTableScan(table=[[default, customer_address]], table:alias=[customer_address]) - HiveJoin(condition=[=($2, $10)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveJoin(condition=[=($4, $9)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveJoin(condition=[=($0, $8)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(ss_sold_date_sk=[$0], ss_customer_sk=[$3], ss_hdemo_sk=[$5], ss_addr_sk=[$6], ss_store_sk=[$7], ss_ticket_number=[$9], ss_coupon_amt=[$19], ss_net_profit=[$22]) - HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7), IS NOT NULL($5), IS NOT NULL($6), IS NOT NULL($3))]) - HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) - HiveProject(d_date_sk=[$0]) - HiveFilter(condition=[AND(IN($7, 6, 0), IN($6, 1998, 1999, 2000))]) - HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject(s_store_sk=[$0]) - HiveFilter(condition=[IN($22, _UTF-16LE'Cedar Grove', _UTF-16LE'Wildwood', _UTF-16LE'Union', _UTF-16LE'Salem', _UTF-16LE'Highland Park')]) - HiveTableScan(table=[[default, store]], table:alias=[store]) - HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[OR(=($3, 2), =($4, 1))]) - HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) + HiveProject(ca_address_sk=[$0], ca_city=[$6]) + HiveTableScan(table=[[default, customer_address]], table:alias=[current_addr]) + HiveProject(ss_ticket_number=[$3], ss_customer_sk=[$1], bought_city=[$0], amt=[$4], profit=[$5]) + HiveAggregate(group=[{1, 3, 5, 7}], agg#0=[sum($8)], agg#1=[sum($9)]) + HiveJoin(condition=[=($5, $0)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(ca_address_sk=[$0], ca_city=[$6]) + HiveTableScan(table=[[default, customer_address]], table:alias=[customer_address]) + HiveJoin(condition=[=($2, $10)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[=($4, $9)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[=($0, $8)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(ss_sold_date_sk=[$0], ss_customer_sk=[$3], ss_hdemo_sk=[$5], ss_addr_sk=[$6], ss_store_sk=[$7], ss_ticket_number=[$9], ss_coupon_amt=[$19], ss_net_profit=[$22]) + HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7), IS NOT NULL($5), IS NOT NULL($6), IS NOT NULL($3))]) + HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) + HiveProject(d_date_sk=[$0]) + HiveFilter(condition=[AND(IN($7, 6, 0), IN($6, 1998, 1999, 2000))]) + HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) + HiveProject(s_store_sk=[$0]) + HiveFilter(condition=[IN($22, _UTF-16LE'Cedar Grove', _UTF-16LE'Wildwood', _UTF-16LE'Union', _UTF-16LE'Salem', _UTF-16LE'Highland Park')]) + HiveTableScan(table=[[default, store]], table:alias=[store]) + HiveProject(hd_demo_sk=[$0]) + HiveFilter(condition=[OR(=($3, 2), =($4, 1))]) + HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query48.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query48.q.out index 3188d82f28..ab7efd6adc 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query48.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query48.q.out @@ -152,7 +152,7 @@ HiveAggregate(group=[{}], agg#0=[sum($8)]) HiveTableScan(table=[[default, customer_demographics]], table:alias=[customer_demographics]) HiveJoin(condition=[=($0, $7)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ss_sold_date_sk=[$0], ss_cdemo_sk=[$4], ss_addr_sk=[$6], ss_quantity=[$10], BETWEEN=[BETWEEN(false, $22, 0, 2000)], BETWEEN6=[BETWEEN(false, $22, 150, 3000)], BETWEEN7=[BETWEEN(false, $22, 50, 25000)]) - HiveFilter(condition=[AND(OR(<=(100, $13), <=($13, 150), IS NOT NULL($13), <=($13, 200)), OR(<=(0, $22), <=($22, 2000), IS NOT NULL($22), <=($22, 3000), <=($22, 25000)), OR(BETWEEN(false, $13, 100, 150), BETWEEN(false, $13, 50, 100), BETWEEN(false, $13, 150, 200)), IS NOT NULL($7), IS NOT NULL($4), IS NOT NULL($6), IS NOT NULL($0))]) + HiveFilter(condition=[AND(OR(<=(100, $13), <=($13, 150), <=(50, $13), <=($13, 100), <=(150, $13), <=($13, 200)), OR(<=(0, $22), <=($22, 2000), <=(150, $22), <=($22, 3000), <=(50, $22), <=($22, 25000)), OR(BETWEEN(false, $13, 100, 150), BETWEEN(false, $13, 50, 100), BETWEEN(false, $13, 150, 200)), IS NOT NULL($7), IS NOT NULL($4), IS NOT NULL($6), IS NOT NULL($0))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(d_date_sk=[$0]) HiveFilter(condition=[=($6, 1998)]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query53.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query53.q.out index bac3f77538..930025f0b5 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query53.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query53.q.out @@ -65,7 +65,7 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$2], sort1=[$1], sort2=[$0], dir0=[ASC], dir1=[ASC], dir2=[ASC], fetch=[100]) HiveProject((tok_table_or_col i_manufact_id)=[$0], (tok_function sum (tok_table_or_col ss_sales_price))=[$1], avg_window_0=[$2]) - HiveFilter(condition=[CASE(>($2, 0), >(/(ABS(-($1, $2)), $2), 0.1), null)]) + HiveFilter(condition=[CASE(>($2, 0), >(/(ABS(-($1, $2)), $2), 0.1), false)]) HiveProject((tok_table_or_col i_manufact_id)=[$0], (tok_function sum (tok_table_or_col ss_sales_price))=[$2], avg_window_0=[avg($2) OVER (PARTITION BY $0 ORDER BY $0 NULLS FIRST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)]) HiveProject(i_manufact_id=[$0], d_qoy=[$1], $f2=[$2]) HiveAggregate(group=[{4, 6}], agg#0=[sum($2)]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query6.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query6.q.out index 5e3deb3eb9..d34b7ab6b8 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query6.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query6.q.out @@ -1,4 +1,4 @@ -Warning: Map Join MAPJOIN[170][bigTable=?] in task 'Map 11' is a cross product +Warning: Map Join MAPJOIN[168][bigTable=?] in task 'Map 1' is a cross product PREHOOK: query: explain cbo select a.ca_state state, count(*) cnt from customer_address a @@ -65,43 +65,43 @@ CBO PLAN: HiveSortLimit(sort0=[$1], dir0=[ASC], fetch=[100]) HiveProject(ca_state=[$0], $f1=[$1]) HiveFilter(condition=[>=($1, 10)]) - HiveAggregate(group=[{10}], agg#0=[count()]) - HiveJoin(condition=[=($1, $11)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveJoin(condition=[=($6, $2)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveJoin(condition=[=($0, $3)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_customer_sk=[$3]) - HiveFilter(condition=[AND(IS NOT NULL($3), IS NOT NULL($0))]) - HiveTableScan(table=[[default, store_sales]], table:alias=[s]) - HiveJoin(condition=[=($1, $2)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(d_date_sk=[$0], d_month_seq=[$3]) - HiveFilter(condition=[IS NOT NULL($3)]) - HiveTableScan(table=[[default, date_dim]], table:alias=[d]) - HiveProject(d_month_seq=[$0]) - HiveAggregate(group=[{3}]) - HiveFilter(condition=[AND(=($6, 2000), =($8, 2), IS NOT NULL($3))]) - HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject(c_customer_sk=[$0], c_current_addr_sk=[$1], cnt=[$2], ca_address_sk=[$3], ca_state=[$4]) - HiveJoin(condition=[=($3, $1)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveJoin(condition=[true], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(c_customer_sk=[$0], c_current_addr_sk=[$4]) - HiveFilter(condition=[IS NOT NULL($4)]) - HiveTableScan(table=[[default, customer]], table:alias=[c]) - HiveProject(cnt=[$0]) - HiveFilter(condition=[<=(sq_count_check($0), 1)]) - HiveProject(cnt=[$0]) - HiveAggregate(group=[{}], cnt=[COUNT()]) - HiveProject(d_month_seq=[$0]) - HiveAggregate(group=[{3}]) - HiveFilter(condition=[AND(=($6, 2000), =($8, 2))]) - HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject(ca_address_sk=[$0], ca_state=[$8]) - HiveTableScan(table=[[default, customer_address]], table:alias=[a]) + HiveAggregate(group=[{4}], agg#0=[count()]) + HiveJoin(condition=[=($6, $11)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[=($0, $7)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[=($3, $1)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[true], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(c_customer_sk=[$0], c_current_addr_sk=[$4]) + HiveFilter(condition=[IS NOT NULL($4)]) + HiveTableScan(table=[[default, customer]], table:alias=[c]) + HiveProject(cnt=[$0]) + HiveFilter(condition=[<=(sq_count_check($0), 1)]) + HiveProject(cnt=[$0]) + HiveAggregate(group=[{}], cnt=[COUNT()]) + HiveProject(d_month_seq=[$0]) + HiveAggregate(group=[{3}]) + HiveFilter(condition=[AND(=($6, 2000), =($8, 2))]) + HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) + HiveProject(ca_address_sk=[$0], ca_state=[$8]) + HiveTableScan(table=[[default, customer_address]], table:alias=[a]) + HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$1], ss_customer_sk=[$2], d_date_sk=[$3], d_month_seq=[$4], d_month_seq0=[$5]) + HiveJoin(condition=[=($0, $3)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_customer_sk=[$3]) + HiveFilter(condition=[AND(IS NOT NULL($3), IS NOT NULL($0))]) + HiveTableScan(table=[[default, store_sales]], table:alias=[s]) + HiveJoin(condition=[=($1, $2)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(d_date_sk=[$0], d_month_seq=[$3]) + HiveFilter(condition=[IS NOT NULL($3)]) + HiveTableScan(table=[[default, date_dim]], table:alias=[d]) + HiveProject(d_month_seq=[$0]) + HiveAggregate(group=[{3}]) + HiveFilter(condition=[AND(=($6, 2000), =($8, 2), IS NOT NULL($3))]) + HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) HiveProject(i_item_sk=[$0], i_current_price=[$1], i_category=[$2], i_category0=[$3], *=[$4]) HiveJoin(condition=[AND(=($3, $2), >($1, $4))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(i_item_sk=[$0], i_current_price=[$5], i_category=[$12]) HiveFilter(condition=[IS NOT NULL($12)]) HiveTableScan(table=[[default, item]], table:alias=[i]) - HiveProject(i_category=[$0], *=[*(1.2, CAST(/($1, $2)):DECIMAL(16, 6))]) + HiveProject(i_category=[$0], *=[*(1.2, CASE(false, null, /($1, $2)))]) HiveAggregate(group=[{12}], agg#0=[sum($5)], agg#1=[count($5)]) HiveFilter(condition=[IS NOT NULL($12)]) HiveTableScan(table=[[default, item]], table:alias=[j]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query63.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query63.q.out index e22d812f78..c820e7f207 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query63.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query63.q.out @@ -67,7 +67,7 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$0], sort1=[$2], sort2=[$1], dir0=[ASC], dir1=[ASC], dir2=[ASC], fetch=[100]) HiveProject((tok_table_or_col i_manager_id)=[$0], (tok_function sum (tok_table_or_col ss_sales_price))=[$1], avg_window_0=[$2]) - HiveFilter(condition=[CASE(>($2, 0), >(/(ABS(-($1, $2)), $2), 0.1), null)]) + HiveFilter(condition=[CASE(>($2, 0), >(/(ABS(-($1, $2)), $2), 0.1), false)]) HiveProject((tok_table_or_col i_manager_id)=[$0], (tok_function sum (tok_table_or_col ss_sales_price))=[$2], avg_window_0=[avg($2) OVER (PARTITION BY $0 ORDER BY $0 NULLS FIRST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)]) HiveProject(i_manager_id=[$0], d_moy=[$1], $f2=[$2]) HiveAggregate(group=[{4, 6}], agg#0=[sum($2)]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query64.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query64.q.out index 75e69cd566..6e8fb29ff9 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query64.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query64.q.out @@ -298,7 +298,7 @@ HiveProject(product_name=[$0], store_name=[$1], store_zip=[$2], b_street_number= HiveFilter(condition=[=($6, 2000)]) HiveTableScan(table=[[default, date_dim]], table:alias=[d1]) HiveProject(cs_item_sk=[$0]) - HiveFilter(condition=[>($1, *(2, $2))]) + HiveFilter(condition=[>($1, *(CAST(2):DECIMAL(10, 0), $2))]) HiveAggregate(group=[{0}], agg#0=[sum($2)], agg#1=[sum($5)]) HiveJoin(condition=[AND(=($0, $3), =($1, $4))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(cs_item_sk=[$15], cs_order_number=[$17], cs_ext_list_price=[$25]) @@ -357,7 +357,7 @@ HiveProject(product_name=[$0], store_name=[$1], store_zip=[$2], b_street_number= HiveFilter(condition=[=($6, 2001)]) HiveTableScan(table=[[default, date_dim]], table:alias=[d1]) HiveProject(cs_item_sk=[$0]) - HiveFilter(condition=[>($1, *(2, $2))]) + HiveFilter(condition=[>($1, *(CAST(2):DECIMAL(10, 0), $2))]) HiveAggregate(group=[{0}], agg#0=[sum($2)], agg#1=[sum($5)]) HiveJoin(condition=[AND(=($0, $3), =($1, $4))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(cs_item_sk=[$15], cs_order_number=[$17], cs_ext_list_price=[$25]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query65.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query65.q.out index 3e906b73b0..88b64f29d1 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query65.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query65.q.out @@ -66,10 +66,8 @@ POSTHOOK: Input: default@store_sales POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[100]) - HiveProject(s_store_name=[$11], i_item_desc=[$1], revenue=[$7], i_current_price=[$2], i_wholesale_cost=[$3], i_brand=[$4]) - HiveJoin(condition=[=($0, $6)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(i_item_sk=[$0], i_item_desc=[$4], i_current_price=[$5], i_wholesale_cost=[$6], i_brand=[$8]) - HiveTableScan(table=[[default, item]], table:alias=[item]) + HiveProject(s_store_name=[$6], i_item_desc=[$8], revenue=[$2], i_current_price=[$9], i_wholesale_cost=[$10], i_brand=[$11]) + HiveJoin(condition=[=($7, $1)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($5, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[AND(=($3, $0), <=($2, $4))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ss_store_sk=[$1], ss_item_sk=[$0], $f2=[$2]) @@ -94,4 +92,6 @@ HiveSortLimit(sort0=[$0], sort1=[$1], dir0=[ASC], dir1=[ASC], fetch=[100]) HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) HiveProject(s_store_sk=[$0], s_store_name=[$5]) HiveTableScan(table=[[default, store]], table:alias=[store]) + HiveProject(i_item_sk=[$0], i_item_desc=[$4], i_current_price=[$5], i_wholesale_cost=[$6], i_brand=[$8]) + HiveTableScan(table=[[default, item]], table:alias=[item]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query68.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query68.q.out index 1b25235c8a..e5c182273b 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query68.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query68.q.out @@ -96,32 +96,32 @@ POSTHOOK: Input: default@store_sales POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$0], sort1=[$4], dir0=[ASC], dir1=[ASC], fetch=[100]) - HiveProject(c_last_name=[$5], c_first_name=[$4], ca_city=[$1], bought_city=[$8], ss_ticket_number=[$6], extended_price=[$9], extended_tax=[$11], list_price=[$10]) - HiveJoin(condition=[AND(=($3, $0), <>($1, $8))], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(ca_address_sk=[$0], ca_city=[$6]) - HiveTableScan(table=[[default, customer_address]], table:alias=[current_addr]) - HiveJoin(condition=[=($5, $0)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(c_last_name=[$3], c_first_name=[$2], ca_city=[$5], bought_city=[$8], ss_ticket_number=[$6], extended_price=[$9], extended_tax=[$11], list_price=[$10]) + HiveJoin(condition=[AND(<>($5, $8), =($7, $0))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[=($1, $4)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(c_customer_sk=[$0], c_current_addr_sk=[$4], c_first_name=[$8], c_last_name=[$9]) HiveFilter(condition=[IS NOT NULL($4)]) HiveTableScan(table=[[default, customer]], table:alias=[customer]) - HiveProject(ss_ticket_number=[$3], ss_customer_sk=[$1], bought_city=[$0], extended_price=[$4], list_price=[$5], extended_tax=[$6]) - HiveAggregate(group=[{1, 3, 5, 7}], agg#0=[sum($8)], agg#1=[sum($9)], agg#2=[sum($10)]) - HiveJoin(condition=[=($5, $0)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(ca_address_sk=[$0], ca_city=[$6]) - HiveTableScan(table=[[default, customer_address]], table:alias=[customer_address]) - HiveJoin(condition=[=($2, $11)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveJoin(condition=[=($4, $10)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveJoin(condition=[=($0, $9)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(ss_sold_date_sk=[$0], ss_customer_sk=[$3], ss_hdemo_sk=[$5], ss_addr_sk=[$6], ss_store_sk=[$7], ss_ticket_number=[$9], ss_ext_sales_price=[$15], ss_ext_list_price=[$17], ss_ext_tax=[$18]) - HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7), IS NOT NULL($5), IS NOT NULL($6), IS NOT NULL($3))]) - HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) - HiveProject(d_date_sk=[$0]) - HiveFilter(condition=[AND(IN($6, 1998, 1999, 2000), BETWEEN(false, $9, 1, 2))]) - HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject(s_store_sk=[$0]) - HiveFilter(condition=[IN($22, _UTF-16LE'Cedar Grove', _UTF-16LE'Wildwood')]) - HiveTableScan(table=[[default, store]], table:alias=[store]) - HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[OR(=($3, 2), =($4, 1))]) - HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) + HiveProject(ca_address_sk=[$0], ca_city=[$6]) + HiveTableScan(table=[[default, customer_address]], table:alias=[current_addr]) + HiveProject(ss_ticket_number=[$3], ss_customer_sk=[$1], bought_city=[$0], extended_price=[$4], list_price=[$5], extended_tax=[$6]) + HiveAggregate(group=[{1, 3, 5, 7}], agg#0=[sum($8)], agg#1=[sum($9)], agg#2=[sum($10)]) + HiveJoin(condition=[=($5, $0)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(ca_address_sk=[$0], ca_city=[$6]) + HiveTableScan(table=[[default, customer_address]], table:alias=[customer_address]) + HiveJoin(condition=[=($2, $11)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[=($4, $10)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[=($0, $9)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(ss_sold_date_sk=[$0], ss_customer_sk=[$3], ss_hdemo_sk=[$5], ss_addr_sk=[$6], ss_store_sk=[$7], ss_ticket_number=[$9], ss_ext_sales_price=[$15], ss_ext_list_price=[$17], ss_ext_tax=[$18]) + HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($7), IS NOT NULL($5), IS NOT NULL($6), IS NOT NULL($3))]) + HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) + HiveProject(d_date_sk=[$0]) + HiveFilter(condition=[AND(IN($6, 1998, 1999, 2000), BETWEEN(false, $9, 1, 2))]) + HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) + HiveProject(s_store_sk=[$0]) + HiveFilter(condition=[IN($22, _UTF-16LE'Cedar Grove', _UTF-16LE'Wildwood')]) + HiveTableScan(table=[[default, store]], table:alias=[store]) + HiveProject(hd_demo_sk=[$0]) + HiveFilter(condition=[OR(=($3, 2), =($4, 1))]) + HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query72.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query72.q.out index 206b0f1972..1bec46e549 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query72.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query72.q.out @@ -84,10 +84,10 @@ HiveSortLimit(sort0=[$5], sort1=[$0], sort2=[$1], sort3=[$2], dir0=[DESC-nulls-l HiveAggregate(group=[{0, 1, 2}], agg#0=[count($3)], agg#1=[count($4)], agg#2=[count()]) HiveProject($f0=[$15], $f1=[$13], $f2=[$19], $f3=[CASE(IS NULL($25), 1, 0)], $f4=[CASE(IS NOT NULL($25), 1, 0)]) HiveJoin(condition=[AND(=($26, $4), =($27, $6))], joinType=[left], algorithm=[none], cost=[not available]) - HiveProject(cs_sold_date_sk=[$4], cs_ship_date_sk=[$5], cs_bill_cdemo_sk=[$6], cs_bill_hdemo_sk=[$7], cs_item_sk=[$8], cs_promo_sk=[$9], cs_order_number=[$10], cs_quantity=[$11], inv_date_sk=[$0], inv_item_sk=[$1], inv_warehouse_sk=[$2], inv_quantity_on_hand=[$3], w_warehouse_sk=[$19], w_warehouse_name=[$20], i_item_sk=[$23], i_item_desc=[$24], cd_demo_sk=[$12], hd_demo_sk=[$13], d_date_sk=[$16], d_week_seq=[$17], +=[$18], d_date_sk0=[$14], d_week_seq0=[$15], d_date_sk1=[$21], CAST=[$22], p_promo_sk=[$25]) - HiveJoin(condition=[=($9, $25)], joinType=[left], algorithm=[none], cost=[not available]) - HiveJoin(condition=[=($23, $8)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveJoin(condition=[AND(=($5, $21), >($22, $18))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(cs_sold_date_sk=[$4], cs_ship_date_sk=[$5], cs_bill_cdemo_sk=[$6], cs_bill_hdemo_sk=[$7], cs_item_sk=[$8], cs_promo_sk=[$9], cs_order_number=[$10], cs_quantity=[$11], inv_date_sk=[$0], inv_item_sk=[$1], inv_warehouse_sk=[$2], inv_quantity_on_hand=[$3], w_warehouse_sk=[$19], w_warehouse_name=[$20], i_item_sk=[$24], i_item_desc=[$25], cd_demo_sk=[$12], hd_demo_sk=[$13], d_date_sk=[$16], d_week_seq=[$17], +=[$18], d_date_sk0=[$14], d_week_seq0=[$15], d_date_sk1=[$22], CAST=[$23], p_promo_sk=[$21]) + HiveJoin(condition=[=($24, $8)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[AND(=($5, $22), >($23, $18))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[=($9, $21)], joinType=[left], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($19, $2)], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[AND(AND(=($0, $14), =($8, $1)), <($3, $11))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(inv_date_sk=[$0], inv_item_sk=[$1], inv_warehouse_sk=[$2], inv_quantity_on_hand=[$3]) @@ -109,17 +109,17 @@ HiveSortLimit(sort0=[$5], sort1=[$0], sort2=[$1], sort3=[$2], dir0=[DESC-nulls-l HiveProject(d_date_sk=[$0], d_week_seq=[$4]) HiveFilter(condition=[IS NOT NULL($4)]) HiveTableScan(table=[[default, date_dim]], table:alias=[d2]) - HiveProject(d_date_sk=[$0], d_week_seq=[$4], +=[+(CAST($2):DOUBLE, 5)]) + HiveProject(d_date_sk=[$0], d_week_seq=[$4], +=[+(CAST($2):DOUBLE, CAST(5):DOUBLE)]) HiveFilter(condition=[AND(=($6, 2001), IS NOT NULL($4))]) HiveTableScan(table=[[default, date_dim]], table:alias=[d1]) HiveProject(w_warehouse_sk=[$0], w_warehouse_name=[$2]) HiveTableScan(table=[[default, warehouse]], table:alias=[warehouse]) - HiveProject(d_date_sk=[$0], CAST=[CAST($2):DOUBLE]) - HiveTableScan(table=[[default, date_dim]], table:alias=[d3]) - HiveProject(i_item_sk=[$0], i_item_desc=[$4]) - HiveTableScan(table=[[default, item]], table:alias=[item]) - HiveProject(p_promo_sk=[$0]) - HiveTableScan(table=[[default, promotion]], table:alias=[promotion]) + HiveProject(p_promo_sk=[$0]) + HiveTableScan(table=[[default, promotion]], table:alias=[promotion]) + HiveProject(d_date_sk=[$0], CAST=[CAST($2):DOUBLE]) + HiveTableScan(table=[[default, date_dim]], table:alias=[d3]) + HiveProject(i_item_sk=[$0], i_item_desc=[$4]) + HiveTableScan(table=[[default, item]], table:alias=[item]) HiveProject(cr_item_sk=[$2], cr_order_number=[$16]) HiveTableScan(table=[[default, catalog_returns]], table:alias=[catalog_returns]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query74.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query74.q.out index 4a8f0b88f0..2d74539b25 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query74.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query74.q.out @@ -131,7 +131,7 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### CBO PLAN: HiveSortLimit(sort0=[$1], sort1=[$0], sort2=[$2], dir0=[ASC], dir1=[ASC], dir2=[ASC], fetch=[100]) HiveProject(customer_id=[$0], customer_first_name=[$1], customer_last_name=[$2]) - HiveJoin(condition=[AND(=($0, $9), CASE(CAST(IS NOT NULL($10)):BOOLEAN, CASE($8, >(/($5, $7), /($3, $10)), >(null, /($3, $10))), CASE($8, >(/($5, $7), null), null)))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[AND(=($0, $9), CASE(CAST(IS NOT NULL($10)):BOOLEAN, CASE($8, >(/($5, $7), /($3, $10)), null), null))], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(c_customer_id=[$0], c_first_name=[$1], c_last_name=[$2], $f3=[$3]) HiveAggregate(group=[{1, 2, 3}], agg#0=[max($6)]) HiveJoin(condition=[=($0, $5)], joinType=[inner], algorithm=[none], cost=[not available]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query78.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query78.q.out index de1b133006..2f5184dd39 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query78.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query78.q.out @@ -132,52 +132,52 @@ CBO PLAN: HiveSortLimit(fetch=[100]) HiveProject(ss_sold_year=[CAST(2000):INTEGER], ss_item_sk=[$0], ss_customer_sk=[$1], ratio=[$2], store_qty=[$3], store_wholesale_cost=[$4], store_sales_price=[$5], other_chan_qty=[$6], other_chan_wholesale_cost=[$7], other_chan_sales_price=[$8]) HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$9], sort3=[$10], sort4=[$11], sort5=[$6], sort6=[$7], sort7=[$8], sort8=[$12], dir0=[ASC], dir1=[ASC], dir2=[DESC-nulls-last], dir3=[DESC-nulls-last], dir4=[DESC-nulls-last], dir5=[ASC], dir6=[ASC], dir7=[ASC], dir8=[ASC]) - HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], ratio=[round(/(CAST($2):DOUBLE, CAST(CASE(AND(IS NOT NULL($7), IS NOT NULL($11)), +($7, $11), 1)):DOUBLE), 2)], store_qty=[$2], store_wholesale_cost=[$3], store_sales_price=[$4], other_chan_qty=[+(CASE(IS NOT NULL($7), $7, 0), CASE(IS NOT NULL($11), $11, 0))], other_chan_wholesale_cost=[+(CASE(IS NOT NULL($8), $8, 0), CASE(IS NOT NULL($12), $12, 0))], other_chan_sales_price=[+(CASE(IS NOT NULL($9), $9, 0), CASE(IS NOT NULL($13), $13, 0))], ss_qty=[$2], ss_wc=[$3], ss_sp=[$4], (tok_function round (/ (tok_table_or_col ss_qty) (tok_function coalesce (+ (tok_table_or_col ws_qty) (tok_table_or_col cs_qty)) 1)) 2)=[round(/(CAST($2):DOUBLE, CAST(CASE(AND(IS NOT NULL($7), IS NOT NULL($11)), +($7, $11), 1)):DOUBLE), 2)]) - HiveFilter(condition=[CASE(IS NOT NULL($11), >($11, 0), false)]) - HiveJoin(condition=[=($10, $1)], joinType=[left], algorithm=[none], cost=[not available]) - HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], $f2=[$2], $f3=[$3], $f4=[$4], ws_item_sk=[$5], ws_bill_customer_sk=[$6], $f20=[$7], $f30=[$8], $f40=[$9]) - HiveFilter(condition=[CASE(IS NOT NULL($7), >($7, 0), false)]) - HiveJoin(condition=[AND(=($5, $0), =($6, $1))], joinType=[left], algorithm=[none], cost=[not available]) - HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) - HiveAggregate(group=[{2, 3}], agg#0=[sum($4)], agg#1=[sum($5)], agg#2=[sum($6)]) - HiveJoin(condition=[=($1, $0)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(d_date_sk=[$0]) - HiveFilter(condition=[=($6, 2000)]) - HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$1], ss_customer_sk=[$2], ss_quantity=[$4], ss_wholesale_cost=[$5], ss_sales_price=[$6]) - HiveFilter(condition=[IS NULL($8)]) - HiveJoin(condition=[AND(=($8, $3), =($1, $7))], joinType=[left], algorithm=[none], cost=[not available]) - HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_customer_sk=[$3], ss_ticket_number=[$9], ss_quantity=[$10], ss_wholesale_cost=[$11], ss_sales_price=[$13]) - HiveFilter(condition=[IS NOT NULL($0)]) - HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) - HiveProject(sr_item_sk=[$2], sr_ticket_number=[$9]) - HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns]) - HiveProject(ws_item_sk=[$0], ws_bill_customer_sk=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) - HiveAggregate(group=[{2, 3}], agg#0=[sum($4)], agg#1=[sum($5)], agg#2=[sum($6)]) - HiveJoin(condition=[=($1, $0)], joinType=[inner], algorithm=[none], cost=[not available]) - HiveProject(d_date_sk=[$0]) - HiveFilter(condition=[=($6, 2000)]) - HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject(ws_sold_date_sk=[$0], ws_item_sk=[$1], ws_bill_customer_sk=[$2], ws_quantity=[$4], ws_wholesale_cost=[$5], ws_sales_price=[$6]) - HiveFilter(condition=[IS NULL($8)]) - HiveJoin(condition=[AND(=($8, $3), =($1, $7))], joinType=[left], algorithm=[none], cost=[not available]) - HiveProject(ws_sold_date_sk=[$0], ws_item_sk=[$3], ws_bill_customer_sk=[$4], ws_order_number=[$17], ws_quantity=[$18], ws_wholesale_cost=[$19], ws_sales_price=[$21]) - HiveFilter(condition=[IS NOT NULL($0)]) - HiveTableScan(table=[[default, web_sales]], table:alias=[web_sales]) - HiveProject(wr_item_sk=[$2], wr_order_number=[$13]) - HiveTableScan(table=[[default, web_returns]], table:alias=[web_returns]) - HiveProject($f2=[$0], $f3=[$2], $f4=[$3], $f5=[$4]) + HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], ratio=[round(/(CAST($2):DOUBLE, CAST(CASE(IS NOT NULL(+($11, $6)), +($11, $6), 1)):DOUBLE), 2)], store_qty=[$2], store_wholesale_cost=[$3], store_sales_price=[$4], other_chan_qty=[+(CASE(IS NOT NULL($11), $11, 0), CASE(IS NOT NULL($6), $6, 0))], other_chan_wholesale_cost=[+(CASE(IS NOT NULL($12), $12, 0), CASE(IS NOT NULL($7), $7, 0))], other_chan_sales_price=[+(CASE(IS NOT NULL($13), $13, 0), CASE(IS NOT NULL($8), $8, 0))], ss_qty=[$2], ss_wc=[$3], ss_sp=[$4], (tok_function round (/ (tok_table_or_col ss_qty) (tok_function coalesce (+ (tok_table_or_col ws_qty) (tok_table_or_col cs_qty)) 1)) 2)=[round(/(CAST($2):DOUBLE, CAST(CASE(IS NOT NULL(+($11, $6)), +($11, $6), 1)):DOUBLE), 2)]) + HiveJoin(condition=[AND(=($9, $0), =($10, $1))], joinType=[inner], algorithm=[none], cost=[not available]) + HiveJoin(condition=[=($5, $1)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(ss_item_sk=[$0], ss_customer_sk=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) HiveAggregate(group=[{2, 3}], agg#0=[sum($4)], agg#1=[sum($5)], agg#2=[sum($6)]) HiveJoin(condition=[=($1, $0)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(d_date_sk=[$0]) HiveFilter(condition=[=($6, 2000)]) HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) - HiveProject(cs_sold_date_sk=[$0], cs_bill_customer_sk=[$1], cs_item_sk=[$2], cs_quantity=[$4], cs_wholesale_cost=[$5], cs_sales_price=[$6]) + HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$1], ss_customer_sk=[$2], ss_quantity=[$4], ss_wholesale_cost=[$5], ss_sales_price=[$6]) HiveFilter(condition=[IS NULL($8)]) - HiveJoin(condition=[AND(=($8, $3), =($2, $7))], joinType=[left], algorithm=[none], cost=[not available]) - HiveProject(cs_sold_date_sk=[$0], cs_bill_customer_sk=[$3], cs_item_sk=[$15], cs_order_number=[$17], cs_quantity=[$18], cs_wholesale_cost=[$19], cs_sales_price=[$21]) - HiveFilter(condition=[IS NOT NULL($0)]) - HiveTableScan(table=[[default, catalog_sales]], table:alias=[catalog_sales]) - HiveProject(cr_item_sk=[$2], cr_order_number=[$16]) - HiveTableScan(table=[[default, catalog_returns]], table:alias=[catalog_returns]) + HiveJoin(condition=[AND(=($8, $3), =($1, $7))], joinType=[left], algorithm=[none], cost=[not available]) + HiveProject(ss_sold_date_sk=[$0], ss_item_sk=[$2], ss_customer_sk=[$3], ss_ticket_number=[$9], ss_quantity=[$10], ss_wholesale_cost=[$11], ss_sales_price=[$13]) + HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($3))]) + HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) + HiveProject(sr_item_sk=[$2], sr_ticket_number=[$9]) + HiveTableScan(table=[[default, store_returns]], table:alias=[store_returns]) + HiveProject($f2=[$1], $f3=[$2], $f4=[$3], $f5=[$4]) + HiveFilter(condition=[>($2, 0)]) + HiveProject(cs_item_sk=[$1], cs_bill_customer_sk=[$0], $f2=[$2], $f3=[$3], $f4=[$4]) + HiveAggregate(group=[{2, 3}], agg#0=[sum($4)], agg#1=[sum($5)], agg#2=[sum($6)]) + HiveJoin(condition=[=($1, $0)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(d_date_sk=[$0]) + HiveFilter(condition=[=($6, 2000)]) + HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) + HiveProject(cs_sold_date_sk=[$0], cs_bill_customer_sk=[$1], cs_item_sk=[$2], cs_quantity=[$4], cs_wholesale_cost=[$5], cs_sales_price=[$6]) + HiveFilter(condition=[IS NULL($8)]) + HiveJoin(condition=[AND(=($8, $3), =($2, $7))], joinType=[left], algorithm=[none], cost=[not available]) + HiveProject(cs_sold_date_sk=[$0], cs_bill_customer_sk=[$3], cs_item_sk=[$15], cs_order_number=[$17], cs_quantity=[$18], cs_wholesale_cost=[$19], cs_sales_price=[$21]) + HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($3))]) + HiveTableScan(table=[[default, catalog_sales]], table:alias=[catalog_sales]) + HiveProject(cr_item_sk=[$2], cr_order_number=[$16]) + HiveTableScan(table=[[default, catalog_returns]], table:alias=[catalog_returns]) + HiveProject(ws_item_sk=[$0], ws_bill_customer_sk=[$1], $f2=[$2], $f3=[$3], $f4=[$4]) + HiveFilter(condition=[>($2, 0)]) + HiveAggregate(group=[{2, 3}], agg#0=[sum($4)], agg#1=[sum($5)], agg#2=[sum($6)]) + HiveJoin(condition=[=($1, $0)], joinType=[inner], algorithm=[none], cost=[not available]) + HiveProject(d_date_sk=[$0]) + HiveFilter(condition=[=($6, 2000)]) + HiveTableScan(table=[[default, date_dim]], table:alias=[date_dim]) + HiveProject(ws_sold_date_sk=[$0], ws_item_sk=[$1], ws_bill_customer_sk=[$2], ws_quantity=[$4], ws_wholesale_cost=[$5], ws_sales_price=[$6]) + HiveFilter(condition=[IS NULL($8)]) + HiveJoin(condition=[AND(=($8, $3), =($1, $7))], joinType=[left], algorithm=[none], cost=[not available]) + HiveProject(ws_sold_date_sk=[$0], ws_item_sk=[$3], ws_bill_customer_sk=[$4], ws_order_number=[$17], ws_quantity=[$18], ws_wholesale_cost=[$19], ws_sales_price=[$21]) + HiveFilter(condition=[AND(IS NOT NULL($0), IS NOT NULL($4))]) + HiveTableScan(table=[[default, web_sales]], table:alias=[web_sales]) + HiveProject(wr_item_sk=[$2], wr_order_number=[$13]) + HiveTableScan(table=[[default, web_returns]], table:alias=[web_returns]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query85.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query85.q.out index 91aad930ba..399e12c808 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query85.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query85.q.out @@ -191,7 +191,7 @@ HiveProject(_o__c0=[$0], _o__c1=[$1], _o__c2=[$2], _o__c3=[$3]) HiveJoin(condition=[AND(AND(AND(=($1, $20), =($2, $25)), OR(AND($14, $15, $7), AND($16, $17, $8), AND($18, $19, $9))), OR(AND($29, $4), AND($30, $5), AND($31, $6)))], joinType=[inner], algorithm=[none], cost=[not available]) HiveJoin(condition=[=($0, $10)], joinType=[inner], algorithm=[none], cost=[not available]) HiveProject(ws_sold_date_sk=[$0], ws_item_sk=[$3], ws_order_number=[$17], ws_quantity=[$18], BETWEEN=[BETWEEN(false, $33, 100, 200)], BETWEEN6=[BETWEEN(false, $33, 150, 300)], BETWEEN7=[BETWEEN(false, $33, 50, 250)], BETWEEN8=[BETWEEN(false, $21, 100, 150)], BETWEEN9=[BETWEEN(false, $21, 50, 100)], BETWEEN10=[BETWEEN(false, $21, 150, 200)]) - HiveFilter(condition=[AND(OR(<=(100, $21), <=($21, 150), IS NOT NULL($21), <=($21, 200)), OR(<=(100, $33), <=($33, 200), IS NOT NULL($33), <=($33, 300), <=($33, 250)), IS NOT NULL($12), IS NOT NULL($0))]) + HiveFilter(condition=[AND(OR(<=(100, $21), <=($21, 150), <=(50, $21), <=($21, 100), <=(150, $21), <=($21, 200)), OR(<=(100, $33), <=($33, 200), <=(150, $33), <=($33, 300), <=(50, $33), <=($33, 250)), IS NOT NULL($12), IS NOT NULL($0))]) HiveTableScan(table=[[default, web_sales]], table:alias=[web_sales]) HiveProject(d_date_sk=[$0]) HiveFilter(condition=[=($6, 1998)]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query88.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query88.q.out index 1ac8fe2dcd..421d3c2d0f 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query88.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query88.q.out @@ -217,7 +217,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 8), >=($4, 30))]) @@ -234,7 +234,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 12), <($4, 30))]) @@ -251,7 +251,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 11), >=($4, 30))]) @@ -268,7 +268,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 11), <($4, 30))]) @@ -285,7 +285,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 10), >=($4, 30))]) @@ -302,7 +302,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 10), <($4, 30))]) @@ -319,7 +319,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 9), >=($4, 30))]) @@ -336,7 +336,7 @@ HiveProject($f0=[$0], $f00=[$7], $f01=[$6], $f02=[$5], $f03=[$4], $f04=[$3], $f0 HiveFilter(condition=[AND(IS NOT NULL($5), IS NOT NULL($1), IS NOT NULL($7))]) HiveTableScan(table=[[default, store_sales]], table:alias=[store_sales]) HiveProject(hd_demo_sk=[$0]) - HiveFilter(condition=[AND(IN($3, 3, 0, 1), <=($4, 5), OR(AND(=($3, 3), IS NOT NULL($4)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) + HiveFilter(condition=[AND(IN($3, 3, 0, 1), OR(<=($4, 5), <=($4, 2), <=($4, 3)), OR(AND(=($3, 3), <=($4, 5)), AND(=($3, 0), <=($4, 2)), AND(=($3, 1), <=($4, 3))))]) HiveTableScan(table=[[default, household_demographics]], table:alias=[household_demographics]) HiveProject(t_time_sk=[$0]) HiveFilter(condition=[AND(=($3, 9), <($4, 30))]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query89.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query89.q.out index d9c7d42b9f..68de432130 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query89.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query89.q.out @@ -66,7 +66,7 @@ CBO PLAN: HiveProject(i_category=[$0], i_class=[$1], i_brand=[$2], s_store_name=[$3], s_company_name=[$4], d_moy=[$5], sum_sales=[$6], avg_monthly_sales=[$7]) HiveSortLimit(sort0=[$8], sort1=[$3], dir0=[ASC], dir1=[ASC], fetch=[100]) HiveProject(i_category=[$0], i_class=[$1], i_brand=[$2], s_store_name=[$3], s_company_name=[$4], d_moy=[$5], sum_sales=[$6], avg_monthly_sales=[$7], (- (tok_table_or_col sum_sales) (tok_table_or_col avg_monthly_sales))=[-($6, $7)]) - HiveFilter(condition=[CASE(<>($7, 0), >(/(ABS(-($6, $7)), $7), 0.1), null)]) + HiveFilter(condition=[CASE(<>($7, 0), >(/(ABS(-($6, $7)), $7), 0.1), false)]) HiveProject((tok_table_or_col i_category)=[$2], (tok_table_or_col i_class)=[$1], (tok_table_or_col i_brand)=[$0], (tok_table_or_col s_store_name)=[$4], (tok_table_or_col s_company_name)=[$5], (tok_table_or_col d_moy)=[$3], (tok_function sum (tok_table_or_col ss_sales_price))=[$6], avg_window_0=[avg($6) OVER (PARTITION BY $2, $0, $4, $5 ORDER BY $2 NULLS FIRST, $0 NULLS FIRST, $4 NULLS FIRST, $5 NULLS FIRST ROWS BETWEEN 2147483647 FOLLOWING AND 2147483647 PRECEDING)]) HiveProject(i_brand=[$0], i_class=[$1], i_category=[$2], d_moy=[$3], s_store_name=[$4], s_company_name=[$5], $f6=[$6]) HiveAggregate(group=[{5, 6, 7, 9, 11, 12}], agg#0=[sum($3)]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query97.q.out ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query97.q.out index 6151627c83..f5e24c58ae 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query97.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query97.q.out @@ -58,7 +58,7 @@ CBO PLAN: HiveSortLimit(fetch=[100]) HiveProject($f0=[$0], $f1=[$1], $f2=[$2]) HiveAggregate(group=[{}], agg#0=[sum($0)], agg#1=[sum($1)], agg#2=[sum($2)]) - HiveProject($f0=[CASE(AND(IS NOT NULL($0), IS NULL($2)), 1, 0)], $f1=[CASE(AND(IS NULL($0), IS NOT NULL($2)), 1, 0)], $f2=[CASE(AND(IS NOT NULL($0), IS NOT NULL($2)), 1, 0)]) + HiveProject($f0=[CAST(CASE(AND(IS NULL($2), IS NOT NULL($0)), 1, 0)):INTEGER], $f1=[CASE(AND(IS NULL($0), IS NOT NULL($2)), 1, 0)], $f2=[CASE(AND(IS NOT NULL($0), IS NOT NULL($2)), 1, 0)]) HiveJoin(condition=[AND(=($0, $2), =($1, $3))], joinType=[full], algorithm=[none], cost=[not available]) HiveProject(ss_customer_sk=[$1], ss_item_sk=[$0]) HiveAggregate(group=[{1, 2}]) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/mv_query44.q.out ql/src/test/results/clientpositive/perf/tez/constraints/mv_query44.q.out index db9acc93cb..7ba03a1644 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/mv_query44.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/mv_query44.q.out @@ -19,7 +19,7 @@ POSTHOOK: type: CREATE_MATERIALIZED_VIEW POSTHOOK: Input: default@store_sales POSTHOOK: Output: database:default POSTHOOK: Output: default@mv_store_sales_item_customer -Warning: Shuffle Join MERGEJOIN[101][tables = [$hdt$_1, $hdt$_2]] in Stage 'Reducer 8' is a cross product +Warning: Shuffle Join MERGEJOIN[103][tables = [$hdt$_1, $hdt$_2]] in Stage 'Reducer 3' is a cross product PREHOOK: query: explain select asceding.rnk, i1.i_product_name best_performing, i2.i_product_name worst_performing from(select * @@ -97,118 +97,118 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### Plan optimized by CBO. Vertex dependency in root stage -Reducer 10 <- Reducer 8 (SIMPLE_EDGE) -Reducer 12 <- Map 11 (SIMPLE_EDGE) -Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE) -Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE) +Reducer 11 <- Map 10 (SIMPLE_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 11 (CUSTOM_SIMPLE_EDGE), Reducer 2 (CUSTOM_SIMPLE_EDGE) Reducer 4 <- Reducer 3 (SIMPLE_EDGE) -Reducer 5 <- Map 1 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE) -Reducer 7 <- Map 6 (SIMPLE_EDGE) -Reducer 8 <- Reducer 12 (CUSTOM_SIMPLE_EDGE), Reducer 7 (CUSTOM_SIMPLE_EDGE) -Reducer 9 <- Reducer 8 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE) +Reducer 6 <- Map 12 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE) +Reducer 7 <- Map 12 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE) +Reducer 8 <- Reducer 7 (SIMPLE_EDGE) +Reducer 9 <- Reducer 3 (SIMPLE_EDGE) Stage-0 Fetch Operator limit:100 Stage-1 - Reducer 4 vectorized - File Output Operator [FS_135] - Limit [LIM_134] (rows=100 width=218) + Reducer 8 vectorized + File Output Operator [FS_137] + Limit [LIM_136] (rows=100 width=218) Number of rows:100 - Select Operator [SEL_133] (rows=6951 width=218) + Select Operator [SEL_135] (rows=6951 width=218) Output:["_col0","_col1","_col2"] - <-Reducer 3 [SIMPLE_EDGE] - SHUFFLE [RS_67] - Select Operator [SEL_66] (rows=6951 width=218) + <-Reducer 7 [SIMPLE_EDGE] + SHUFFLE [RS_66] + Select Operator [SEL_65] (rows=6951 width=218) Output:["_col0","_col1","_col2"] - Merge Join Operator [MERGEJOIN_105] (rows=6951 width=218) - Conds:RS_63._col3=RS_64._col3(Inner),Output:["_col1","_col3","_col5"] - <-Reducer 2 [SIMPLE_EDGE] - SHUFFLE [RS_63] - PartitionCols:_col3 - Merge Join Operator [MERGEJOIN_102] (rows=6951 width=111) - Conds:RS_107._col0=RS_127._col0(Inner),Output:["_col1","_col3"] - <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_107] + Merge Join Operator [MERGEJOIN_107] (rows=6951 width=218) + Conds:RS_62._col2=RS_134._col0(Inner),Output:["_col1","_col5","_col7"] + <-Map 12 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_134] + PartitionCols:_col0 + Select Operator [SEL_132] (rows=462000 width=111) + Output:["_col0","_col1"] + TableScan [TS_52] (rows=462000 width=111) + default@item,i1,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_product_name"] + <-Reducer 6 [SIMPLE_EDGE] + SHUFFLE [RS_62] + PartitionCols:_col2 + Merge Join Operator [MERGEJOIN_106] (rows=6951 width=115) + Conds:RS_59._col0=RS_133._col0(Inner),Output:["_col1","_col2","_col5"] + <-Map 12 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_133] PartitionCols:_col0 - Select Operator [SEL_106] (rows=462000 width=111) - Output:["_col0","_col1"] - TableScan [TS_0] (rows=462000 width=111) - default@item,i1,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_product_name"] - <-Reducer 9 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_127] + Please refer to the previous Select Operator [SEL_132] + <-Reducer 5 [SIMPLE_EDGE] + SHUFFLE [RS_59] PartitionCols:_col0 - Select Operator [SEL_126] (rows=6951 width=8) - Output:["_col0","_col1"] - Filter Operator [FIL_125] (rows=6951 width=116) - predicate:(rank_window_0 < 11) - PTF Operator [PTF_124] (rows=20854 width=116) - Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"0"}] - Select Operator [SEL_123] (rows=20854 width=116) - Output:["_col0","_col1"] - <-Reducer 8 [SIMPLE_EDGE] - SHUFFLE [RS_21] - PartitionCols:0 - Filter Operator [FIL_20] (rows=20854 width=228) - predicate:(_col1 > (0.9 * _col2)) - Merge Join Operator [MERGEJOIN_101] (rows=62562 width=228) - Conds:(Inner),Output:["_col0","_col1","_col2"] - <-Reducer 12 [CUSTOM_SIMPLE_EDGE] vectorized - PARTITION_ONLY_SHUFFLE [RS_122] - Select Operator [SEL_121] (rows=1 width=112) - Output:["_col0"] - Group By Operator [GBY_120] (rows=1 width=124) - Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0 - <-Map 11 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_119] - PartitionCols:_col0 - Group By Operator [GBY_118] (rows=258 width=124) - Output:["_col0","_col1","_col2"],aggregations:["sum(_col1)","count(_col1)"],keys:true - Select Operator [SEL_117] (rows=287946 width=114) - Output:["_col1"] - Filter Operator [FIL_116] (rows=287946 width=114) - predicate:((ss_store_sk = 410) and ss_hdemo_sk is null) - TableScan [TS_9] (rows=575995635 width=114) - default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_hdemo_sk","ss_store_sk","ss_net_profit"] - <-Reducer 7 [CUSTOM_SIMPLE_EDGE] vectorized - PARTITION_ONLY_SHUFFLE [RS_115] - Select Operator [SEL_114] (rows=62562 width=116) - Output:["_col0","_col1"] - Group By Operator [GBY_113] (rows=62562 width=124) - Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0 - <-Map 6 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_112] - PartitionCols:_col0 - Group By Operator [GBY_111] (rows=3199976 width=124) - Output:["_col0","_col1","_col2"],aggregations:["sum(ss_net_profit)","count(ss_net_profit)"],keys:ss_item_sk - Select Operator [SEL_110] (rows=6399952 width=114) - Output:["ss_item_sk","ss_net_profit"] - Filter Operator [FIL_109] (rows=6399952 width=114) - predicate:(ss_store_sk = 410) - TableScan [TS_2] (rows=575995635 width=114) - default@store_sales,ss1,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_item_sk","ss_store_sk","ss_net_profit"] - <-Reducer 5 [SIMPLE_EDGE] - SHUFFLE [RS_64] - PartitionCols:_col3 - Merge Join Operator [MERGEJOIN_104] (rows=6951 width=111) - Conds:RS_108._col0=RS_132._col0(Inner),Output:["_col1","_col3"] - <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_108] - PartitionCols:_col0 - Please refer to the previous Select Operator [SEL_106] - <-Reducer 10 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_132] - PartitionCols:_col0 - Select Operator [SEL_131] (rows=6951 width=8) - Output:["_col0","_col1"] - Filter Operator [FIL_130] (rows=6951 width=116) - predicate:(rank_window_0 < 11) - PTF Operator [PTF_129] (rows=20854 width=116) - Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 DESC NULLS LAST","partition by:":"0"}] - Select Operator [SEL_128] (rows=20854 width=116) - Output:["_col0","_col1"] - <-Reducer 8 [SIMPLE_EDGE] - SHUFFLE [RS_49] - PartitionCols:0 - Please refer to the previous Filter Operator [FIL_20] + Merge Join Operator [MERGEJOIN_105] (rows=6951 width=12) + Conds:RS_126._col1=RS_131._col1(Inner),Output:["_col0","_col1","_col2"] + <-Reducer 4 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_126] + PartitionCols:_col1 + Select Operator [SEL_125] (rows=6951 width=8) + Output:["_col0","_col1"] + Filter Operator [FIL_124] (rows=6951 width=116) + predicate:(rank_window_0 < 11) + PTF Operator [PTF_123] (rows=20854 width=116) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"0"}] + Select Operator [SEL_122] (rows=20854 width=116) + Output:["_col0","_col1"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_19] + PartitionCols:0 + Filter Operator [FIL_18] (rows=20854 width=228) + predicate:(_col1 > (0.9 * _col2)) + Merge Join Operator [MERGEJOIN_103] (rows=62562 width=228) + Conds:(Inner),Output:["_col0","_col1","_col2"] + <-Reducer 11 [CUSTOM_SIMPLE_EDGE] vectorized + PARTITION_ONLY_SHUFFLE [RS_121] + Select Operator [SEL_120] (rows=1 width=112) + Output:["_col0"] + Group By Operator [GBY_119] (rows=1 width=124) + Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0 + <-Map 10 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_118] + PartitionCols:_col0 + Group By Operator [GBY_117] (rows=258 width=124) + Output:["_col0","_col1","_col2"],aggregations:["sum(_col1)","count(_col1)"],keys:true + Select Operator [SEL_116] (rows=287946 width=114) + Output:["_col1"] + Filter Operator [FIL_115] (rows=287946 width=114) + predicate:((ss_store_sk = 410) and ss_hdemo_sk is null) + TableScan [TS_7] (rows=575995635 width=114) + default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_hdemo_sk","ss_store_sk","ss_net_profit"] + <-Reducer 2 [CUSTOM_SIMPLE_EDGE] vectorized + PARTITION_ONLY_SHUFFLE [RS_114] + Select Operator [SEL_113] (rows=62562 width=116) + Output:["_col0","_col1"] + Group By Operator [GBY_112] (rows=62562 width=124) + Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0 + <-Map 1 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_111] + PartitionCols:_col0 + Group By Operator [GBY_110] (rows=3199976 width=124) + Output:["_col0","_col1","_col2"],aggregations:["sum(ss_net_profit)","count(ss_net_profit)"],keys:ss_item_sk + Select Operator [SEL_109] (rows=6399952 width=114) + Output:["ss_item_sk","ss_net_profit"] + Filter Operator [FIL_108] (rows=6399952 width=114) + predicate:(ss_store_sk = 410) + TableScan [TS_0] (rows=575995635 width=114) + default@store_sales,ss1,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_item_sk","ss_store_sk","ss_net_profit"] + <-Reducer 9 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_131] + PartitionCols:_col1 + Select Operator [SEL_130] (rows=6951 width=8) + Output:["_col0","_col1"] + Filter Operator [FIL_129] (rows=6951 width=116) + predicate:(rank_window_0 < 11) + PTF Operator [PTF_128] (rows=20854 width=116) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 DESC NULLS LAST","partition by:":"0"}] + Select Operator [SEL_127] (rows=20854 width=116) + Output:["_col0","_col1"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_45] + PartitionCols:0 + Please refer to the previous Filter Operator [FIL_18] diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query1.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query1.q.out index 69f93290d9..d1fd7a5eb8 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query1.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query1.q.out @@ -62,8 +62,8 @@ Vertex dependency in root stage Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 10 (SIMPLE_EDGE) Reducer 3 <- 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 <- Reducer 5 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (ONE_TO_ONE_EDGE), Reducer 9 (SIMPLE_EDGE) +Reducer 6 <- Map 12 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE) Reducer 7 <- Reducer 6 (SIMPLE_EDGE) Reducer 8 <- Map 1 (SIMPLE_EDGE), Map 10 (SIMPLE_EDGE) Reducer 9 <- Reducer 8 (SIMPLE_EDGE) @@ -73,105 +73,105 @@ Stage-0 limit:100 Stage-1 Reducer 7 vectorized - File Output Operator [FS_159] - Limit [LIM_158] (rows=100 width=100) + File Output Operator [FS_160] + Limit [LIM_159] (rows=100 width=100) Number of rows:100 - Select Operator [SEL_157] (rows=816091 width=100) + Select Operator [SEL_158] (rows=816091 width=100) Output:["_col0"] <-Reducer 6 [SIMPLE_EDGE] SHUFFLE [RS_49] Select Operator [SEL_48] (rows=816091 width=100) Output:["_col0"] - Filter Operator [FIL_47] (rows=816091 width=324) - predicate:(_col2 > _col6) - Merge Join Operator [MERGEJOIN_133] (rows=2448274 width=324) - Conds:RS_44._col1=RS_156._col1(Inner),Output:["_col2","_col5","_col6"] - <-Reducer 5 [SIMPLE_EDGE] - SHUFFLE [RS_44] - PartitionCols:_col1 - Merge Join Operator [MERGEJOIN_131] (rows=2369298 width=213) - Conds:RS_41._col0=RS_151._col0(Inner),Output:["_col1","_col2","_col5"] - <-Map 12 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_151] - PartitionCols:_col0 - Select Operator [SEL_150] (rows=80000000 width=104) - Output:["_col0","_col1"] - TableScan [TS_17] (rows=80000000 width=104) - default@customer,customer,Tbl:COMPLETE,Col:COMPLETE,Output:["c_customer_sk","c_customer_id"] - <-Reducer 4 [SIMPLE_EDGE] - SHUFFLE [RS_41] - PartitionCols:_col0 - Merge Join Operator [MERGEJOIN_130] (rows=2369298 width=114) - Conds:RS_146._col1=RS_149._col0(Inner),Output:["_col0","_col1","_col2"] + Merge Join Operator [MERGEJOIN_134] (rows=816091 width=100) + Conds:RS_45._col0=RS_157._col0(Inner),Output:["_col7"] + <-Map 12 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_157] + PartitionCols:_col0 + Select Operator [SEL_156] (rows=80000000 width=104) + Output:["_col0","_col1"] + TableScan [TS_36] (rows=80000000 width=104) + default@customer,customer,Tbl:COMPLETE,Col:COMPLETE,Output:["c_customer_sk","c_customer_id"] + <-Reducer 5 [SIMPLE_EDGE] + SHUFFLE [RS_45] + PartitionCols:_col0 + Filter Operator [FIL_44] (rows=816091 width=225) + predicate:(_col2 > _col4) + Merge Join Operator [MERGEJOIN_133] (rows=2448274 width=225) + Conds:RS_41._col1=RS_155._col1(Inner),Output:["_col0","_col2","_col4"] + <-Reducer 4 [ONE_TO_ONE_EDGE] + FORWARD [RS_41] + PartitionCols:_col1 + Merge Join Operator [MERGEJOIN_131] (rows=2369298 width=114) + Conds:RS_147._col1=RS_150._col0(Inner),Output:["_col0","_col1","_col2"] <-Map 11 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_149] + SHUFFLE [RS_150] PartitionCols:_col0 - Select Operator [SEL_148] (rows=35 width=4) + Select Operator [SEL_149] (rows=35 width=4) Output:["_col0"] - Filter Operator [FIL_147] (rows=35 width=90) + Filter Operator [FIL_148] (rows=35 width=90) predicate:(s_state = 'NM') TableScan [TS_14] (rows=1704 width=90) default@store,store,Tbl:COMPLETE,Col:COMPLETE,Output:["s_store_sk","s_state"] <-Reducer 3 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_146] + SHUFFLE [RS_147] PartitionCols:_col1 - Select Operator [SEL_145] (rows=14291868 width=119) + Select Operator [SEL_146] (rows=14291868 width=119) Output:["_col0","_col1","_col2"] - Group By Operator [GBY_144] (rows=14291868 width=119) + Group By Operator [GBY_145] (rows=14291868 width=119) Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1 <-Reducer 2 [SIMPLE_EDGE] SHUFFLE [RS_11] PartitionCols:_col0, _col1 Group By Operator [GBY_10] (rows=16855704 width=119) Output:["_col0","_col1","_col2"],aggregations:["sum(_col3)"],keys:_col2, _col1 - Merge Join Operator [MERGEJOIN_129] (rows=16855704 width=107) - Conds:RS_138._col0=RS_142._col0(Inner),Output:["_col1","_col2","_col3"] + Merge Join Operator [MERGEJOIN_130] (rows=16855704 width=107) + Conds:RS_139._col0=RS_143._col0(Inner),Output:["_col1","_col2","_col3"] <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_138] + SHUFFLE [RS_139] PartitionCols:_col0 - Select Operator [SEL_136] (rows=51757026 width=119) + Select Operator [SEL_137] (rows=51757026 width=119) Output:["_col0","_col1","_col2","_col3"] - Filter Operator [FIL_134] (rows=51757026 width=119) + Filter Operator [FIL_135] (rows=51757026 width=119) predicate:(sr_customer_sk is not null and sr_returned_date_sk is not null and sr_store_sk is not null) TableScan [TS_0] (rows=57591150 width=119) default@store_returns,store_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["sr_returned_date_sk","sr_customer_sk","sr_store_sk","sr_fee"] <-Map 10 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_142] + SHUFFLE [RS_143] PartitionCols:_col0 - Select Operator [SEL_141] (rows=652 width=4) + Select Operator [SEL_142] (rows=652 width=4) Output:["_col0"] - Filter Operator [FIL_140] (rows=652 width=8) + Filter Operator [FIL_141] (rows=652 width=8) predicate:(d_year = 2000) TableScan [TS_3] (rows=73049 width=8) default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year"] - <-Reducer 9 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_156] - PartitionCols:_col1 - Select Operator [SEL_155] (rows=31 width=115) - Output:["_col0","_col1"] - Group By Operator [GBY_154] (rows=31 width=123) - Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","count(_col2)"],keys:_col1 - Select Operator [SEL_153] (rows=14291868 width=119) - Output:["_col1","_col2"] - Group By Operator [GBY_152] (rows=14291868 width=119) - Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1 - <-Reducer 8 [SIMPLE_EDGE] - SHUFFLE [RS_30] - PartitionCols:_col0 - Group By Operator [GBY_29] (rows=17467258 width=119) - Output:["_col0","_col1","_col2"],aggregations:["sum(_col3)"],keys:_col2, _col1 - Merge Join Operator [MERGEJOIN_132] (rows=17467258 width=107) - Conds:RS_139._col0=RS_143._col0(Inner),Output:["_col1","_col2","_col3"] - <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_139] - PartitionCols:_col0 - Select Operator [SEL_137] (rows=53634860 width=119) - Output:["_col0","_col1","_col2","_col3"] - Filter Operator [FIL_135] (rows=53634860 width=119) - predicate:(sr_returned_date_sk is not null and sr_store_sk is not null) - Please refer to the previous TableScan [TS_0] - <-Map 10 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_143] - PartitionCols:_col0 - Please refer to the previous Select Operator [SEL_141] + <-Reducer 9 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_155] + PartitionCols:_col1 + Select Operator [SEL_154] (rows=31 width=115) + Output:["_col0","_col1"] + Group By Operator [GBY_153] (rows=31 width=123) + Output:["_col0","_col1","_col2"],aggregations:["sum(_col2)","count(_col2)"],keys:_col1 + Select Operator [SEL_152] (rows=14291868 width=119) + Output:["_col1","_col2"] + Group By Operator [GBY_151] (rows=14291868 width=119) + Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1 + <-Reducer 8 [SIMPLE_EDGE] + SHUFFLE [RS_28] + PartitionCols:_col0 + Group By Operator [GBY_27] (rows=17467258 width=119) + Output:["_col0","_col1","_col2"],aggregations:["sum(_col3)"],keys:_col2, _col1 + Merge Join Operator [MERGEJOIN_132] (rows=17467258 width=107) + Conds:RS_140._col0=RS_144._col0(Inner),Output:["_col1","_col2","_col3"] + <-Map 1 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_140] + PartitionCols:_col0 + Select Operator [SEL_138] (rows=53634860 width=119) + Output:["_col0","_col1","_col2","_col3"] + Filter Operator [FIL_136] (rows=53634860 width=119) + predicate:(sr_returned_date_sk is not null and sr_store_sk is not null) + Please refer to the previous TableScan [TS_0] + <-Map 10 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_144] + PartitionCols:_col0 + Please refer to the previous Select Operator [SEL_142] diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query11.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query11.q.out index 7e0582e164..18ccbeb9dd 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query11.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query11.q.out @@ -199,7 +199,7 @@ Stage-0 Select Operator [SEL_88] (rows=12248094 width=85) Output:["_col0"] Filter Operator [FIL_87] (rows=12248094 width=537) - predicate:CASE WHEN (_col4 is not null) THEN (CASE WHEN (_col2) THEN (((_col6 / _col1) > (_col9 / _col4))) ELSE ((null > (_col9 / _col4))) END) ELSE (CASE WHEN (_col2) THEN (((_col6 / _col1) > null)) ELSE (null) END) END + predicate:CASE WHEN (_col4 is not null) THEN (CASE WHEN (_col2) THEN (((_col6 / _col1) > (_col9 / _col4))) ELSE (null) END) ELSE (null) END Merge Join Operator [MERGEJOIN_283] (rows=24496188 width=537) Conds:RS_84._col3=RS_346._col0(Inner),Output:["_col1","_col2","_col4","_col6","_col8","_col9"] <-Reducer 20 [SIMPLE_EDGE] vectorized diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query13.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query13.q.out index 616ed6bcde..3165da9c14 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query13.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query13.q.out @@ -202,7 +202,7 @@ Stage-0 Select Operator [SEL_107] (rows=457561292 width=257) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12"] Filter Operator [FIL_106] (rows=457561292 width=450) - predicate:(((ss_net_profit >= 100) or (ss_net_profit <= 200) or ss_net_profit is not null or (ss_net_profit <= 300) or (ss_net_profit <= 250)) and ((ss_sales_price >= 100) or (ss_sales_price <= 150) or ss_sales_price is not null or (ss_sales_price <= 200)) and (ss_sold_date_sk BETWEEN DynamicValue(RS_16_date_dim_d_date_sk_min) AND DynamicValue(RS_16_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_16_date_dim_d_date_sk_bloom_filter))) and ss_addr_sk is not null and ss_cdemo_sk is not null and ss_hdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) + predicate:(((ss_net_profit >= 100) or (ss_net_profit <= 200) or (ss_net_profit >= 150) or (ss_net_profit <= 300) or (ss_net_profit >= 50) or (ss_net_profit <= 250)) and ((ss_sales_price >= 100) or (ss_sales_price <= 150) or (ss_sales_price >= 50) or (ss_sales_price <= 100) or (ss_sales_price >= 150) or (ss_sales_price <= 200)) and (ss_sold_date_sk BETWEEN DynamicValue(RS_16_date_dim_d_date_sk_min) AND DynamicValue(RS_16_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_16_date_dim_d_date_sk_bloom_filter))) and ss_addr_sk is not null and ss_cdemo_sk is not null and ss_hdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) TableScan [TS_0] (rows=575995635 width=450) default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_cdemo_sk","ss_hdemo_sk","ss_addr_sk","ss_store_sk","ss_quantity","ss_sales_price","ss_ext_sales_price","ss_ext_wholesale_cost","ss_net_profit"] <-Reducer 8 [BROADCAST_EDGE] vectorized diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query31.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query31.q.out index 8e0de0ffe2..4fc0c77352 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query31.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query31.q.out @@ -158,7 +158,7 @@ Stage-0 Select Operator [SEL_138] (rows=110 width=550) Output:["_col0","_col1","_col2","_col3","_col4","_col5"] Filter Operator [FIL_136] (rows=110 width=778) - predicate:(CASE WHEN ((_col11 > 0)) THEN (CASE WHEN (_col2) THEN (((_col6 / _col1) > (_col9 / _col11))) ELSE ((null > (_col9 / _col11))) END) ELSE (CASE WHEN (_col2) THEN (((_col6 / _col1) > null)) ELSE (null) END) END and CASE WHEN ((_col9 > 0)) THEN (CASE WHEN (_col7) THEN (((_col4 / _col6) > (_col13 / _col9))) ELSE ((null > (_col13 / _col9))) END) ELSE (CASE WHEN (_col7) THEN (((_col4 / _col6) > null)) ELSE (null) END) END) + predicate:(CASE WHEN ((_col11 > 0)) THEN (CASE WHEN (_col2) THEN (((_col6 / _col1) > (_col9 / _col11))) ELSE (null) END) ELSE (null) END and CASE WHEN ((_col9 > 0)) THEN (CASE WHEN (_col7) THEN (((_col4 / _col6) > (_col13 / _col9))) ELSE (null) END) ELSE (null) END) Merge Join Operator [MERGEJOIN_450] (rows=440 width=778) Conds:RS_133._col0=RS_134._col0(Inner),Output:["_col1","_col2","_col4","_col6","_col7","_col8","_col9","_col11","_col13"] <-Reducer 22 [ONE_TO_ONE_EDGE] diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query36.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query36.q.out index 8158608354..90466fe0e5 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query36.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query36.q.out @@ -93,12 +93,12 @@ Stage-0 Select Operator [SEL_103] (rows=3060 width=490) Output:["_col0","_col1","_col2","_col3","_col4","_col5"] PTF Operator [PTF_102] (rows=3060 width=414) - Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(_col2 / _col3) ASC NULLS FIRST","partition by:":"(grouping(_col4, 1) + grouping(_col4, 0)), CASE WHEN ((grouping(_col4, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END"}] + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(_col2 / _col3) ASC NULLS FIRST","partition by:":"(grouping(_col4, 1) + grouping(_col4, 0)), CASE WHEN ((grouping(_col4, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END"}] Select Operator [SEL_101] (rows=3060 width=414) Output:["_col0","_col1","_col2","_col3","_col4"] <-Reducer 5 [SIMPLE_EDGE] vectorized SHUFFLE [RS_100] - PartitionCols:(grouping(_col4, 1) + grouping(_col4, 0)), CASE WHEN ((grouping(_col4, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END + PartitionCols:(grouping(_col4, 1) + grouping(_col4, 0)), CASE WHEN ((grouping(_col4, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END Select Operator [SEL_99] (rows=3060 width=414) Output:["_col0","_col1","_col2","_col3","_col4"] Group By Operator [GBY_98] (rows=3060 width=414) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query4.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query4.q.out index e6558e99a9..f52ac789df 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query4.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query4.q.out @@ -281,7 +281,7 @@ Stage-0 Select Operator [SEL_134] (rows=7323197 width=85) Output:["_col0"] Filter Operator [FIL_133] (rows=7323197 width=537) - predicate:CASE WHEN (_col4 is not null) THEN (CASE WHEN (_col7) THEN (((_col9 / _col6) > (_col14 / _col4))) ELSE ((null > (_col14 / _col4))) END) ELSE (CASE WHEN (_col7) THEN (((_col9 / _col6) > null)) ELSE (null) END) END + predicate:CASE WHEN (_col4 is not null) THEN (CASE WHEN (_col7) THEN (((_col9 / _col6) > (_col14 / _col4))) ELSE (null) END) ELSE (null) END Merge Join Operator [MERGEJOIN_466] (rows=14646395 width=537) Conds:RS_130._col3=RS_547._col0(Inner),Output:["_col4","_col6","_col7","_col9","_col13","_col14"] <-Reducer 30 [SIMPLE_EDGE] vectorized @@ -343,7 +343,7 @@ Stage-0 FORWARD [RS_130] PartitionCols:_col3 Filter Operator [FIL_129] (rows=12248093 width=668) - predicate:CASE WHEN (_col2) THEN (CASE WHEN (_col7) THEN (((_col9 / _col6) > (_col11 / _col1))) ELSE ((null > (_col11 / _col1))) END) ELSE (CASE WHEN (_col7) THEN (((_col9 / _col6) > null)) ELSE (null) END) END + predicate:CASE WHEN (_col2) THEN (CASE WHEN (_col7) THEN (((_col9 / _col6) > (_col11 / _col1))) ELSE (null) END) ELSE (null) END Merge Join Operator [MERGEJOIN_465] (rows=24496187 width=668) Conds:RS_126._col3=RS_541._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col9","_col11"] <-Reducer 26 [SIMPLE_EDGE] vectorized diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query44.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query44.q.out index 3fd361a9f9..4e6c083f5b 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query44.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query44.q.out @@ -1,4 +1,4 @@ -Warning: Shuffle Join MERGEJOIN[101][tables = [$hdt$_1, $hdt$_2]] in Stage 'Reducer 8' is a cross product +Warning: Shuffle Join MERGEJOIN[103][tables = [$hdt$_1, $hdt$_2]] in Stage 'Reducer 3' is a cross product PREHOOK: query: explain select asceding.rnk, i1.i_product_name best_performing, i2.i_product_name worst_performing from(select * @@ -76,118 +76,118 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### Plan optimized by CBO. Vertex dependency in root stage -Reducer 10 <- Reducer 8 (SIMPLE_EDGE) -Reducer 12 <- Map 11 (SIMPLE_EDGE) -Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE) -Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE) +Reducer 11 <- Map 10 (SIMPLE_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE) +Reducer 3 <- Reducer 11 (CUSTOM_SIMPLE_EDGE), Reducer 2 (CUSTOM_SIMPLE_EDGE) Reducer 4 <- Reducer 3 (SIMPLE_EDGE) -Reducer 5 <- Map 1 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE) -Reducer 7 <- Map 6 (SIMPLE_EDGE) -Reducer 8 <- Reducer 12 (CUSTOM_SIMPLE_EDGE), Reducer 7 (CUSTOM_SIMPLE_EDGE) -Reducer 9 <- Reducer 8 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE) +Reducer 6 <- Map 12 (SIMPLE_EDGE), Reducer 5 (SIMPLE_EDGE) +Reducer 7 <- Map 12 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE) +Reducer 8 <- Reducer 7 (SIMPLE_EDGE) +Reducer 9 <- Reducer 3 (SIMPLE_EDGE) Stage-0 Fetch Operator limit:100 Stage-1 - Reducer 4 vectorized - File Output Operator [FS_135] - Limit [LIM_134] (rows=100 width=218) + Reducer 8 vectorized + File Output Operator [FS_137] + Limit [LIM_136] (rows=100 width=218) Number of rows:100 - Select Operator [SEL_133] (rows=6951 width=218) + Select Operator [SEL_135] (rows=6951 width=218) Output:["_col0","_col1","_col2"] - <-Reducer 3 [SIMPLE_EDGE] - SHUFFLE [RS_67] - Select Operator [SEL_66] (rows=6951 width=218) + <-Reducer 7 [SIMPLE_EDGE] + SHUFFLE [RS_66] + Select Operator [SEL_65] (rows=6951 width=218) Output:["_col0","_col1","_col2"] - Merge Join Operator [MERGEJOIN_105] (rows=6951 width=218) - Conds:RS_63._col3=RS_64._col3(Inner),Output:["_col1","_col3","_col5"] - <-Reducer 2 [SIMPLE_EDGE] - SHUFFLE [RS_63] - PartitionCols:_col3 - Merge Join Operator [MERGEJOIN_102] (rows=6951 width=111) - Conds:RS_107._col0=RS_127._col0(Inner),Output:["_col1","_col3"] - <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_107] + Merge Join Operator [MERGEJOIN_107] (rows=6951 width=218) + Conds:RS_62._col2=RS_134._col0(Inner),Output:["_col1","_col5","_col7"] + <-Map 12 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_134] + PartitionCols:_col0 + Select Operator [SEL_132] (rows=462000 width=111) + Output:["_col0","_col1"] + TableScan [TS_52] (rows=462000 width=111) + default@item,i1,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_product_name"] + <-Reducer 6 [SIMPLE_EDGE] + SHUFFLE [RS_62] + PartitionCols:_col2 + Merge Join Operator [MERGEJOIN_106] (rows=6951 width=115) + Conds:RS_59._col0=RS_133._col0(Inner),Output:["_col1","_col2","_col5"] + <-Map 12 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_133] PartitionCols:_col0 - Select Operator [SEL_106] (rows=462000 width=111) - Output:["_col0","_col1"] - TableScan [TS_0] (rows=462000 width=111) - default@item,i1,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_product_name"] - <-Reducer 9 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_127] + Please refer to the previous Select Operator [SEL_132] + <-Reducer 5 [SIMPLE_EDGE] + SHUFFLE [RS_59] PartitionCols:_col0 - Select Operator [SEL_126] (rows=6951 width=8) - Output:["_col0","_col1"] - Filter Operator [FIL_125] (rows=6951 width=116) - predicate:(rank_window_0 < 11) - PTF Operator [PTF_124] (rows=20854 width=116) - Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"0"}] - Select Operator [SEL_123] (rows=20854 width=116) - Output:["_col0","_col1"] - <-Reducer 8 [SIMPLE_EDGE] - SHUFFLE [RS_21] - PartitionCols:0 - Filter Operator [FIL_20] (rows=20854 width=228) - predicate:(_col1 > (0.9 * _col2)) - Merge Join Operator [MERGEJOIN_101] (rows=62562 width=228) - Conds:(Inner),Output:["_col0","_col1","_col2"] - <-Reducer 12 [CUSTOM_SIMPLE_EDGE] vectorized - PARTITION_ONLY_SHUFFLE [RS_122] - Select Operator [SEL_121] (rows=1 width=112) - Output:["_col0"] - Group By Operator [GBY_120] (rows=1 width=124) - Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0 - <-Map 11 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_119] - PartitionCols:_col0 - Group By Operator [GBY_118] (rows=258 width=124) - Output:["_col0","_col1","_col2"],aggregations:["sum(_col1)","count(_col1)"],keys:true - Select Operator [SEL_117] (rows=287946 width=114) - Output:["_col1"] - Filter Operator [FIL_116] (rows=287946 width=114) - predicate:((ss_store_sk = 410) and ss_hdemo_sk is null) - TableScan [TS_9] (rows=575995635 width=114) - default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_hdemo_sk","ss_store_sk","ss_net_profit"] - <-Reducer 7 [CUSTOM_SIMPLE_EDGE] vectorized - PARTITION_ONLY_SHUFFLE [RS_115] - Select Operator [SEL_114] (rows=62562 width=116) - Output:["_col0","_col1"] - Group By Operator [GBY_113] (rows=62562 width=124) - Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0 - <-Map 6 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_112] - PartitionCols:_col0 - Group By Operator [GBY_111] (rows=3199976 width=124) - Output:["_col0","_col1","_col2"],aggregations:["sum(ss_net_profit)","count(ss_net_profit)"],keys:ss_item_sk - Select Operator [SEL_110] (rows=6399952 width=114) - Output:["ss_item_sk","ss_net_profit"] - Filter Operator [FIL_109] (rows=6399952 width=114) - predicate:(ss_store_sk = 410) - TableScan [TS_2] (rows=575995635 width=114) - default@store_sales,ss1,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_item_sk","ss_store_sk","ss_net_profit"] - <-Reducer 5 [SIMPLE_EDGE] - SHUFFLE [RS_64] - PartitionCols:_col3 - Merge Join Operator [MERGEJOIN_104] (rows=6951 width=111) - Conds:RS_108._col0=RS_132._col0(Inner),Output:["_col1","_col3"] - <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_108] - PartitionCols:_col0 - Please refer to the previous Select Operator [SEL_106] - <-Reducer 10 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_132] - PartitionCols:_col0 - Select Operator [SEL_131] (rows=6951 width=8) - Output:["_col0","_col1"] - Filter Operator [FIL_130] (rows=6951 width=116) - predicate:(rank_window_0 < 11) - PTF Operator [PTF_129] (rows=20854 width=116) - Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 DESC NULLS LAST","partition by:":"0"}] - Select Operator [SEL_128] (rows=20854 width=116) - Output:["_col0","_col1"] - <-Reducer 8 [SIMPLE_EDGE] - SHUFFLE [RS_49] - PartitionCols:0 - Please refer to the previous Filter Operator [FIL_20] + Merge Join Operator [MERGEJOIN_105] (rows=6951 width=12) + Conds:RS_126._col1=RS_131._col1(Inner),Output:["_col0","_col1","_col2"] + <-Reducer 4 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_126] + PartitionCols:_col1 + Select Operator [SEL_125] (rows=6951 width=8) + Output:["_col0","_col1"] + Filter Operator [FIL_124] (rows=6951 width=116) + predicate:(rank_window_0 < 11) + PTF Operator [PTF_123] (rows=20854 width=116) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 ASC NULLS FIRST","partition by:":"0"}] + Select Operator [SEL_122] (rows=20854 width=116) + Output:["_col0","_col1"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_19] + PartitionCols:0 + Filter Operator [FIL_18] (rows=20854 width=228) + predicate:(_col1 > (0.9 * _col2)) + Merge Join Operator [MERGEJOIN_103] (rows=62562 width=228) + Conds:(Inner),Output:["_col0","_col1","_col2"] + <-Reducer 11 [CUSTOM_SIMPLE_EDGE] vectorized + PARTITION_ONLY_SHUFFLE [RS_121] + Select Operator [SEL_120] (rows=1 width=112) + Output:["_col0"] + Group By Operator [GBY_119] (rows=1 width=124) + Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0 + <-Map 10 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_118] + PartitionCols:_col0 + Group By Operator [GBY_117] (rows=258 width=124) + Output:["_col0","_col1","_col2"],aggregations:["sum(_col1)","count(_col1)"],keys:true + Select Operator [SEL_116] (rows=287946 width=114) + Output:["_col1"] + Filter Operator [FIL_115] (rows=287946 width=114) + predicate:((ss_store_sk = 410) and ss_hdemo_sk is null) + TableScan [TS_7] (rows=575995635 width=114) + default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_hdemo_sk","ss_store_sk","ss_net_profit"] + <-Reducer 2 [CUSTOM_SIMPLE_EDGE] vectorized + PARTITION_ONLY_SHUFFLE [RS_114] + Select Operator [SEL_113] (rows=62562 width=116) + Output:["_col0","_col1"] + Group By Operator [GBY_112] (rows=62562 width=124) + Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0 + <-Map 1 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_111] + PartitionCols:_col0 + Group By Operator [GBY_110] (rows=3199976 width=124) + Output:["_col0","_col1","_col2"],aggregations:["sum(ss_net_profit)","count(ss_net_profit)"],keys:ss_item_sk + Select Operator [SEL_109] (rows=6399952 width=114) + Output:["ss_item_sk","ss_net_profit"] + Filter Operator [FIL_108] (rows=6399952 width=114) + predicate:(ss_store_sk = 410) + TableScan [TS_0] (rows=575995635 width=114) + default@store_sales,ss1,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_item_sk","ss_store_sk","ss_net_profit"] + <-Reducer 9 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_131] + PartitionCols:_col1 + Select Operator [SEL_130] (rows=6951 width=8) + Output:["_col0","_col1"] + Filter Operator [FIL_129] (rows=6951 width=116) + predicate:(rank_window_0 < 11) + PTF Operator [PTF_128] (rows=20854 width=116) + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col1 DESC NULLS LAST","partition by:":"0"}] + Select Operator [SEL_127] (rows=20854 width=116) + Output:["_col0","_col1"] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_45] + PartitionCols:0 + Please refer to the previous Filter Operator [FIL_18] diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query45.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query45.q.out index 64d9c98395..419a8a10ae 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query45.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query45.q.out @@ -51,133 +51,133 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### Plan optimized by CBO. Vertex dependency in root stage -Map 9 <- Reducer 12 (BROADCAST_EDGE) -Reducer 10 <- Map 11 (SIMPLE_EDGE), Map 9 (SIMPLE_EDGE) -Reducer 12 <- Map 11 (CUSTOM_SIMPLE_EDGE) -Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 8 (ONE_TO_ONE_EDGE) -Reducer 3 <- Reducer 10 (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 <- Reducer 5 (SIMPLE_EDGE) -Reducer 7 <- Reducer 6 (SIMPLE_EDGE) -Reducer 8 <- Map 1 (SIMPLE_EDGE) +Map 11 <- Reducer 14 (BROADCAST_EDGE) +Reducer 12 <- Map 11 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE) +Reducer 14 <- Map 13 (CUSTOM_SIMPLE_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 6 (ONE_TO_ONE_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 <- Map 1 (SIMPLE_EDGE) +Reducer 8 <- Map 10 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE) +Reducer 9 <- Reducer 12 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE) Stage-0 Fetch Operator limit:100 Stage-1 - Reducer 7 vectorized - File Output Operator [FS_151] - Limit [LIM_150] (rows=100 width=299) + Reducer 5 vectorized + File Output Operator [FS_149] + Limit [LIM_148] (rows=100 width=299) Number of rows:100 - Select Operator [SEL_149] (rows=1143120 width=299) + Select Operator [SEL_147] (rows=285780 width=299) Output:["_col0","_col1","_col2"] - <-Reducer 6 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_148] - Group By Operator [GBY_147] (rows=1143120 width=299) + <-Reducer 4 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_146] + Group By Operator [GBY_145] (rows=285780 width=299) Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)"],keys:KEY._col0, KEY._col1 - <-Reducer 5 [SIMPLE_EDGE] - SHUFFLE [RS_40] + <-Reducer 3 [SIMPLE_EDGE] + SHUFFLE [RS_41] PartitionCols:_col0, _col1 - Group By Operator [GBY_39] (rows=10246864 width=299) + Group By Operator [GBY_40] (rows=3715140 width=299) Output:["_col0","_col1","_col2"],aggregations:["sum(_col3)"],keys:_col8, _col7 - Top N Key Operator [TNK_71] (rows=10246864 width=302) + Top N Key Operator [TNK_69] (rows=10246864 width=302) keys:_col8, _col7,sort order:++,top n:100 - Select Operator [SEL_38] (rows=10246864 width=302) + Select Operator [SEL_39] (rows=10246864 width=302) Output:["_col3","_col7","_col8"] - Filter Operator [FIL_37] (rows=10246864 width=302) + Filter Operator [FIL_38] (rows=10246864 width=302) predicate:((substr(_col8, 1, 5)) IN ('85669', '86197', '88274', '83405', '86475', '85392', '85460', '80348', '81792') or _col15 is not null) - Select Operator [SEL_36] (rows=10246864 width=302) + Select Operator [SEL_37] (rows=10246864 width=302) Output:["_col3","_col7","_col8","_col15"] - Merge Join Operator [MERGEJOIN_121] (rows=10246864 width=302) - Conds:RS_33._col12=RS_146._col0(Inner),Output:["_col3","_col7","_col14","_col15"] - <-Map 14 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_146] + Merge Join Operator [MERGEJOIN_119] (rows=10246864 width=302) + Conds:RS_34._col0=RS_35._col6(Inner),Output:["_col3","_col7","_col8","_col12"] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_34] PartitionCols:_col0 - Select Operator [SEL_145] (rows=40000000 width=191) - Output:["_col0","_col1","_col2"] - TableScan [TS_22] (rows=40000000 width=191) - default@customer_address,customer_address,Tbl:COMPLETE,Col:COMPLETE,Output:["ca_address_sk","ca_county","ca_zip"] - <-Reducer 4 [SIMPLE_EDGE] - SHUFFLE [RS_33] - PartitionCols:_col12 - Merge Join Operator [MERGEJOIN_120] (rows=10246864 width=119) - Conds:RS_30._col6=RS_144._col0(Inner),Output:["_col3","_col7","_col12"] - <-Map 13 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_144] + Merge Join Operator [MERGEJOIN_115] (rows=462007 width=4) + Conds:RS_122._col1=RS_128._col0(Left Outer),Output:["_col0","_col3"] + <-Map 1 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_122] + PartitionCols:_col1 + Select Operator [SEL_120] (rows=462000 width=104) + Output:["_col0","_col1"] + TableScan [TS_0] (rows=462000 width=104) + default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_item_id"] + <-Reducer 6 [ONE_TO_ONE_EDGE] vectorized + FORWARD [RS_128] PartitionCols:_col0 - Select Operator [SEL_143] (rows=80000000 width=8) + Select Operator [SEL_127] (rows=5 width=104) Output:["_col0","_col1"] - Filter Operator [FIL_142] (rows=80000000 width=8) - predicate:c_current_addr_sk is not null - TableScan [TS_19] (rows=80000000 width=8) - default@customer,customer,Tbl:COMPLETE,Col:COMPLETE,Output:["c_customer_sk","c_current_addr_sk"] - <-Reducer 3 [SIMPLE_EDGE] - SHUFFLE [RS_30] - PartitionCols:_col6 - Merge Join Operator [MERGEJOIN_119] (rows=10246864 width=119) - Conds:RS_27._col0=RS_28._col1(Inner),Output:["_col3","_col6","_col7"] - <-Reducer 10 [SIMPLE_EDGE] - SHUFFLE [RS_28] - PartitionCols:_col1 - Merge Join Operator [MERGEJOIN_118] (rows=10246864 width=119) - Conds:RS_141._col0=RS_133._col0(Inner),Output:["_col1","_col2","_col3"] - <-Map 11 [SIMPLE_EDGE] vectorized - PARTITION_ONLY_SHUFFLE [RS_133] - PartitionCols:_col0 - Select Operator [SEL_132] (rows=130 width=12) - Output:["_col0"] - Filter Operator [FIL_131] (rows=130 width=12) - predicate:((d_qoy = 2) and (d_year = 2000)) - TableScan [TS_12] (rows=73049 width=12) - default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year","d_qoy"] - <-Map 9 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_141] - PartitionCols:_col0 - Select Operator [SEL_140] (rows=143930993 width=123) - Output:["_col0","_col1","_col2","_col3"] - Filter Operator [FIL_139] (rows=143930993 width=123) - predicate:((ws_sold_date_sk BETWEEN DynamicValue(RS_16_date_dim_d_date_sk_min) AND DynamicValue(RS_16_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_16_date_dim_d_date_sk_bloom_filter))) and ws_bill_customer_sk is not null and ws_sold_date_sk is not null) - TableScan [TS_9] (rows=144002668 width=123) - default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_customer_sk","ws_sales_price"] - <-Reducer 12 [BROADCAST_EDGE] vectorized - BROADCAST [RS_138] - Group By Operator [GBY_137] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] - <-Map 11 [CUSTOM_SIMPLE_EDGE] vectorized - PARTITION_ONLY_SHUFFLE [RS_136] - Group By Operator [GBY_135] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] - Select Operator [SEL_134] (rows=130 width=4) - Output:["_col0"] - Please refer to the previous Select Operator [SEL_132] - <-Reducer 2 [SIMPLE_EDGE] - SHUFFLE [RS_27] + Group By Operator [GBY_126] (rows=5 width=100) + Output:["_col0"],keys:KEY._col0 + <-Map 1 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_125] + PartitionCols:_col0 + Group By Operator [GBY_124] (rows=5 width=100) + Output:["_col0"],keys:i_item_id + Select Operator [SEL_123] (rows=11 width=104) + Output:["i_item_id"] + Filter Operator [FIL_121] (rows=11 width=104) + predicate:(i_item_sk) IN (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) + Please refer to the previous TableScan [TS_0] + <-Reducer 9 [SIMPLE_EDGE] + SHUFFLE [RS_35] + PartitionCols:_col6 + Merge Join Operator [MERGEJOIN_118] (rows=10246864 width=302) + Conds:RS_27._col0=RS_28._col2(Inner),Output:["_col3","_col4","_col6","_col8"] + <-Reducer 12 [SIMPLE_EDGE] + SHUFFLE [RS_28] + PartitionCols:_col2 + Merge Join Operator [MERGEJOIN_117] (rows=10246864 width=119) + Conds:RS_144._col0=RS_136._col0(Inner),Output:["_col1","_col2","_col3"] + <-Map 13 [SIMPLE_EDGE] vectorized + PARTITION_ONLY_SHUFFLE [RS_136] + PartitionCols:_col0 + Select Operator [SEL_135] (rows=130 width=12) + Output:["_col0"] + Filter Operator [FIL_134] (rows=130 width=12) + predicate:((d_qoy = 2) and (d_year = 2000)) + TableScan [TS_17] (rows=73049 width=12) + default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year","d_qoy"] + <-Map 11 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_144] PartitionCols:_col0 - Merge Join Operator [MERGEJOIN_117] (rows=462007 width=4) - Conds:RS_124._col1=RS_130._col0(Left Outer),Output:["_col0","_col3"] - <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_124] - PartitionCols:_col1 - Select Operator [SEL_122] (rows=462000 width=104) - Output:["_col0","_col1"] - TableScan [TS_0] (rows=462000 width=104) - default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_item_id"] - <-Reducer 8 [ONE_TO_ONE_EDGE] vectorized - FORWARD [RS_130] - PartitionCols:_col0 - Select Operator [SEL_129] (rows=5 width=104) - Output:["_col0","_col1"] - Group By Operator [GBY_128] (rows=5 width=100) - Output:["_col0"],keys:KEY._col0 - <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_127] - PartitionCols:_col0 - Group By Operator [GBY_126] (rows=5 width=100) - Output:["_col0"],keys:i_item_id - Select Operator [SEL_125] (rows=11 width=104) - Output:["i_item_id"] - Filter Operator [FIL_123] (rows=11 width=104) - predicate:(i_item_sk) IN (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) - Please refer to the previous TableScan [TS_0] + Select Operator [SEL_143] (rows=143930993 width=123) + Output:["_col0","_col1","_col2","_col3"] + Filter Operator [FIL_142] (rows=143930993 width=123) + predicate:((ws_sold_date_sk BETWEEN DynamicValue(RS_21_date_dim_d_date_sk_min) AND DynamicValue(RS_21_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_21_date_dim_d_date_sk_bloom_filter))) and ws_bill_customer_sk is not null and ws_sold_date_sk is not null) + TableScan [TS_14] (rows=144002668 width=123) + default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_customer_sk","ws_sales_price"] + <-Reducer 14 [BROADCAST_EDGE] vectorized + BROADCAST [RS_141] + Group By Operator [GBY_140] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] + <-Map 13 [CUSTOM_SIMPLE_EDGE] vectorized + PARTITION_ONLY_SHUFFLE [RS_139] + Group By Operator [GBY_138] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] + Select Operator [SEL_137] (rows=130 width=4) + Output:["_col0"] + Please refer to the previous Select Operator [SEL_135] + <-Reducer 8 [SIMPLE_EDGE] + SHUFFLE [RS_27] + PartitionCols:_col0 + Merge Join Operator [MERGEJOIN_116] (rows=80000000 width=191) + Conds:RS_131._col1=RS_133._col0(Inner),Output:["_col0","_col3","_col4"] + <-Map 10 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_133] + PartitionCols:_col0 + Select Operator [SEL_132] (rows=40000000 width=191) + Output:["_col0","_col1","_col2"] + TableScan [TS_12] (rows=40000000 width=191) + default@customer_address,customer_address,Tbl:COMPLETE,Col:COMPLETE,Output:["ca_address_sk","ca_county","ca_zip"] + <-Map 7 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_131] + PartitionCols:_col1 + Select Operator [SEL_130] (rows=80000000 width=8) + Output:["_col0","_col1"] + Filter Operator [FIL_129] (rows=80000000 width=8) + predicate:c_current_addr_sk is not null + TableScan [TS_9] (rows=80000000 width=8) + default@customer,customer,Tbl:COMPLETE,Col:COMPLETE,Output:["c_customer_sk","c_current_addr_sk"] diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query46.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query46.q.out index dde72e07b8..6d0933abc0 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query46.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query46.q.out @@ -83,134 +83,134 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### Plan optimized by CBO. Vertex dependency in root stage -Map 5 <- Reducer 12 (BROADCAST_EDGE) -Reducer 10 <- Reducer 9 (SIMPLE_EDGE) -Reducer 12 <- Map 11 (CUSTOM_SIMPLE_EDGE) -Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE) -Reducer 3 <- Map 15 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE) +Map 8 <- Reducer 13 (BROADCAST_EDGE) +Reducer 10 <- Map 14 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE) +Reducer 11 <- Map 15 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE) +Reducer 13 <- Map 12 (CUSTOM_SIMPLE_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE) Reducer 4 <- Reducer 3 (SIMPLE_EDGE) -Reducer 6 <- Map 11 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE) -Reducer 7 <- Map 13 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE) -Reducer 8 <- Map 14 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE) -Reducer 9 <- Map 15 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE) +Reducer 6 <- Map 5 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE) +Reducer 7 <- Reducer 6 (SIMPLE_EDGE) +Reducer 9 <- Map 12 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE) Stage-0 Fetch Operator limit:100 Stage-1 Reducer 4 vectorized - File Output Operator [FS_176] - Limit [LIM_175] (rows=100 width=594) + File Output Operator [FS_172] + Limit [LIM_171] (rows=100 width=594) Number of rows:100 - Select Operator [SEL_174] (rows=8380115 width=594) + Select Operator [SEL_170] (rows=8380115 width=594) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] <-Reducer 3 [SIMPLE_EDGE] SHUFFLE [RS_44] Select Operator [SEL_43] (rows=8380115 width=594) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] Filter Operator [FIL_42] (rows=8380115 width=594) - predicate:(_col10 <> _col6) - Merge Join Operator [MERGEJOIN_147] (rows=8380115 width=594) - Conds:RS_39._col1=RS_169._col0(Inner),Output:["_col2","_col3","_col4","_col6","_col7","_col8","_col10"] - <-Map 15 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_169] - PartitionCols:_col0 - Select Operator [SEL_168] (rows=40000000 width=97) - Output:["_col0","_col1"] - TableScan [TS_34] (rows=40000000 width=97) - default@customer_address,current_addr,Tbl:COMPLETE,Col:COMPLETE,Output:["ca_address_sk","ca_city"] + predicate:(_col5 <> _col8) + Merge Join Operator [MERGEJOIN_143] (rows=8380115 width=594) + Conds:RS_39._col0=RS_169._col1(Inner),Output:["_col2","_col3","_col5","_col6","_col8","_col9","_col10"] <-Reducer 2 [SIMPLE_EDGE] SHUFFLE [RS_39] - PartitionCols:_col1 - Merge Join Operator [MERGEJOIN_146] (rows=8380115 width=505) - Conds:RS_150._col0=RS_173._col1(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8"] - <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_150] + PartitionCols:_col0 + Merge Join Operator [MERGEJOIN_138] (rows=80000000 width=277) + Conds:RS_146._col1=RS_148._col0(Inner),Output:["_col0","_col2","_col3","_col5"] + <-Map 5 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_148] PartitionCols:_col0 - Select Operator [SEL_149] (rows=80000000 width=188) + Select Operator [SEL_147] (rows=40000000 width=97) + Output:["_col0","_col1"] + TableScan [TS_3] (rows=40000000 width=97) + default@customer_address,current_addr,Tbl:COMPLETE,Col:COMPLETE,Output:["ca_address_sk","ca_city"] + <-Map 1 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_146] + PartitionCols:_col1 + Select Operator [SEL_145] (rows=80000000 width=188) Output:["_col0","_col1","_col2","_col3"] - Filter Operator [FIL_148] (rows=80000000 width=188) + Filter Operator [FIL_144] (rows=80000000 width=188) predicate:c_current_addr_sk is not null TableScan [TS_0] (rows=80000000 width=188) default@customer,customer,Tbl:COMPLETE,Col:COMPLETE,Output:["c_customer_sk","c_current_addr_sk","c_first_name","c_last_name"] - <-Reducer 10 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_173] - PartitionCols:_col1 - Select Operator [SEL_172] (rows=8380115 width=321) - Output:["_col0","_col1","_col2","_col3","_col4"] - Group By Operator [GBY_171] (rows=8380115 width=321) - Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3 - <-Reducer 9 [SIMPLE_EDGE] - SHUFFLE [RS_31] - PartitionCols:_col0, _col1, _col2, _col3 - Group By Operator [GBY_30] (rows=8380115 width=321) - Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col6)","sum(_col7)"],keys:_col1, _col12, _col3, _col5 - Merge Join Operator [MERGEJOIN_145] (rows=8380115 width=97) - Conds:RS_26._col3=RS_170._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col12"] + <-Reducer 7 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_169] + PartitionCols:_col1 + Select Operator [SEL_168] (rows=8380115 width=321) + Output:["_col0","_col1","_col2","_col3","_col4"] + Group By Operator [GBY_167] (rows=8380115 width=321) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3 + <-Reducer 6 [SIMPLE_EDGE] + SHUFFLE [RS_33] + PartitionCols:_col0, _col1, _col2, _col3 + Group By Operator [GBY_32] (rows=8380115 width=321) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["sum(_col6)","sum(_col7)"],keys:_col1, _col12, _col3, _col5 + Merge Join Operator [MERGEJOIN_142] (rows=8380115 width=97) + Conds:RS_28._col3=RS_149._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col12"] + <-Map 5 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_149] + PartitionCols:_col0 + Please refer to the previous Select Operator [SEL_147] + <-Reducer 11 [SIMPLE_EDGE] + SHUFFLE [RS_28] + PartitionCols:_col3 + Merge Join Operator [MERGEJOIN_141] (rows=8380115 width=4) + Conds:RS_25._col2=RS_166._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7"] <-Map 15 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_170] + SHUFFLE [RS_166] PartitionCols:_col0 - Please refer to the previous Select Operator [SEL_168] - <-Reducer 8 [SIMPLE_EDGE] - SHUFFLE [RS_26] - PartitionCols:_col3 - Merge Join Operator [MERGEJOIN_144] (rows=8380115 width=4) - Conds:RS_23._col2=RS_167._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7"] + Select Operator [SEL_165] (rows=1855 width=4) + Output:["_col0"] + Filter Operator [FIL_164] (rows=1855 width=12) + predicate:((hd_dep_count = 2) or (hd_vehicle_count = 1)) + TableScan [TS_14] (rows=7200 width=12) + default@household_demographics,household_demographics,Tbl:COMPLETE,Col:COMPLETE,Output:["hd_demo_sk","hd_dep_count","hd_vehicle_count"] + <-Reducer 10 [SIMPLE_EDGE] + SHUFFLE [RS_25] + PartitionCols:_col2 + Merge Join Operator [MERGEJOIN_140] (rows=32526589 width=90) + Conds:RS_22._col4=RS_163._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6","_col7"] <-Map 14 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_167] + SHUFFLE [RS_163] PartitionCols:_col0 - Select Operator [SEL_166] (rows=1855 width=4) + Select Operator [SEL_162] (rows=35 width=4) Output:["_col0"] - Filter Operator [FIL_165] (rows=1855 width=12) - predicate:((hd_dep_count = 2) or (hd_vehicle_count = 1)) - TableScan [TS_12] (rows=7200 width=12) - default@household_demographics,household_demographics,Tbl:COMPLETE,Col:COMPLETE,Output:["hd_demo_sk","hd_dep_count","hd_vehicle_count"] - <-Reducer 7 [SIMPLE_EDGE] - SHUFFLE [RS_23] - PartitionCols:_col2 - Merge Join Operator [MERGEJOIN_143] (rows=32526589 width=90) - Conds:RS_20._col4=RS_164._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6","_col7"] - <-Map 13 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_164] + Filter Operator [FIL_161] (rows=35 width=97) + predicate:(s_city) IN ('Cedar Grove', 'Wildwood', 'Union', 'Salem', 'Highland Park') + TableScan [TS_11] (rows=1704 width=97) + default@store,store,Tbl:COMPLETE,Col:COMPLETE,Output:["s_store_sk","s_city"] + <-Reducer 9 [SIMPLE_EDGE] + SHUFFLE [RS_22] + PartitionCols:_col4 + Merge Join Operator [MERGEJOIN_139] (rows=196204013 width=218) + Conds:RS_160._col0=RS_152._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col6","_col7"] + <-Map 12 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_152] PartitionCols:_col0 - Select Operator [SEL_163] (rows=35 width=4) + Select Operator [SEL_151] (rows=783 width=4) Output:["_col0"] - Filter Operator [FIL_162] (rows=35 width=97) - predicate:(s_city) IN ('Cedar Grove', 'Wildwood', 'Union', 'Salem', 'Highland Park') - TableScan [TS_9] (rows=1704 width=97) - default@store,store,Tbl:COMPLETE,Col:COMPLETE,Output:["s_store_sk","s_city"] - <-Reducer 6 [SIMPLE_EDGE] - SHUFFLE [RS_20] - PartitionCols:_col4 - Merge Join Operator [MERGEJOIN_142] (rows=196204013 width=218) - Conds:RS_161._col0=RS_153._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col6","_col7"] - <-Map 11 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_153] - PartitionCols:_col0 - Select Operator [SEL_152] (rows=783 width=4) - Output:["_col0"] - Filter Operator [FIL_151] (rows=783 width=12) - predicate:((d_dow) IN (6, 0) and (d_year) IN (1998, 1999, 2000)) - TableScan [TS_6] (rows=73049 width=12) - default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year","d_dow"] - <-Map 5 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_161] - PartitionCols:_col0 - Select Operator [SEL_160] (rows=457565061 width=237) - Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"] - Filter Operator [FIL_159] (rows=457565061 width=237) - predicate:((ss_sold_date_sk BETWEEN DynamicValue(RS_18_date_dim_d_date_sk_min) AND DynamicValue(RS_18_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_18_date_dim_d_date_sk_bloom_filter))) and ss_addr_sk is not null and ss_customer_sk is not null and ss_hdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) - TableScan [TS_3] (rows=575995635 width=237) - default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_customer_sk","ss_hdemo_sk","ss_addr_sk","ss_store_sk","ss_ticket_number","ss_coupon_amt","ss_net_profit"] - <-Reducer 12 [BROADCAST_EDGE] vectorized - BROADCAST [RS_158] - Group By Operator [GBY_157] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] - <-Map 11 [CUSTOM_SIMPLE_EDGE] vectorized - SHUFFLE [RS_156] - Group By Operator [GBY_155] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] - Select Operator [SEL_154] (rows=783 width=4) - Output:["_col0"] - Please refer to the previous Select Operator [SEL_152] + Filter Operator [FIL_150] (rows=783 width=12) + predicate:((d_dow) IN (6, 0) and (d_year) IN (1998, 1999, 2000)) + TableScan [TS_8] (rows=73049 width=12) + default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year","d_dow"] + <-Map 8 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_160] + PartitionCols:_col0 + Select Operator [SEL_159] (rows=457565061 width=237) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"] + Filter Operator [FIL_158] (rows=457565061 width=237) + predicate:((ss_sold_date_sk BETWEEN DynamicValue(RS_20_date_dim_d_date_sk_min) AND DynamicValue(RS_20_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_20_date_dim_d_date_sk_bloom_filter))) and ss_addr_sk is not null and ss_customer_sk is not null and ss_hdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) + TableScan [TS_5] (rows=575995635 width=237) + default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_customer_sk","ss_hdemo_sk","ss_addr_sk","ss_store_sk","ss_ticket_number","ss_coupon_amt","ss_net_profit"] + <-Reducer 13 [BROADCAST_EDGE] vectorized + BROADCAST [RS_157] + Group By Operator [GBY_156] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] + <-Map 12 [CUSTOM_SIMPLE_EDGE] vectorized + SHUFFLE [RS_155] + Group By Operator [GBY_154] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] + Select Operator [SEL_153] (rows=783 width=4) + Output:["_col0"] + Please refer to the previous Select Operator [SEL_151] diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query48.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query48.q.out index 93bafabefd..038a91a838 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query48.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query48.q.out @@ -211,7 +211,7 @@ Stage-0 Select Operator [SEL_83] (rows=159705893 width=27) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] Filter Operator [FIL_82] (rows=159705893 width=233) - predicate:(((ss_net_profit >= 0) or (ss_net_profit <= 2000) or ss_net_profit is not null or (ss_net_profit <= 3000) or (ss_net_profit <= 25000)) and ((ss_sales_price >= 100) or (ss_sales_price <= 150) or ss_sales_price is not null or (ss_sales_price <= 200)) and (ss_sales_price BETWEEN 100 AND 150 or ss_sales_price BETWEEN 50 AND 100 or ss_sales_price BETWEEN 150 AND 200) and (ss_sold_date_sk BETWEEN DynamicValue(RS_13_date_dim_d_date_sk_min) AND DynamicValue(RS_13_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_13_date_dim_d_date_sk_bloom_filter))) and ss_addr_sk is not null and ss_cdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) + predicate:(((ss_net_profit >= 0) or (ss_net_profit <= 2000) or (ss_net_profit >= 150) or (ss_net_profit <= 3000) or (ss_net_profit >= 50) or (ss_net_profit <= 25000)) and ((ss_sales_price >= 100) or (ss_sales_price <= 150) or (ss_sales_price >= 50) or (ss_sales_price <= 100) or (ss_sales_price >= 150) or (ss_sales_price <= 200)) and (ss_sales_price BETWEEN 100 AND 150 or ss_sales_price BETWEEN 50 AND 100 or ss_sales_price BETWEEN 150 AND 200) and (ss_sold_date_sk BETWEEN DynamicValue(RS_13_date_dim_d_date_sk_min) AND DynamicValue(RS_13_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_13_date_dim_d_date_sk_bloom_filter))) and ss_addr_sk is not null and ss_cdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) TableScan [TS_0] (rows=575995635 width=233) default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_cdemo_sk","ss_addr_sk","ss_store_sk","ss_quantity","ss_sales_price","ss_net_profit"] <-Reducer 7 [BROADCAST_EDGE] vectorized diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query53.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query53.q.out index a13d0f9c09..a569e0473c 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query53.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query53.q.out @@ -87,7 +87,7 @@ Stage-0 Select Operator [SEL_24] (rows=25 width=228) Output:["_col0","_col1","_col2"] Filter Operator [FIL_36] (rows=25 width=228) - predicate:CASE WHEN ((avg_window_0 > 0)) THEN (((abs((_col2 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (null) END + predicate:CASE WHEN ((avg_window_0 > 0)) THEN (((abs((_col2 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (false) END Select Operator [SEL_23] (rows=50 width=116) Output:["avg_window_0","_col0","_col2"] PTF Operator [PTF_22] (rows=50 width=116) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query6.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query6.q.out index 7aea119ac3..b124531e2c 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query6.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query6.q.out @@ -1,4 +1,4 @@ -Warning: Map Join MAPJOIN[170][bigTable=?] in task 'Map 11' is a cross product +Warning: Map Join MAPJOIN[168][bigTable=?] in task 'Map 1' is a cross product PREHOOK: query: explain select a.ca_state state, count(*) cnt from customer_address a @@ -64,174 +64,176 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### Plan optimized by CBO. Vertex dependency in root stage -Map 1 <- Reducer 3 (BROADCAST_EDGE) -Map 11 <- Reducer 5 (BROADCAST_EDGE) +Map 1 <- Reducer 9 (BROADCAST_EDGE) +Map 12 <- Reducer 10 (BROADCAST_EDGE) +Map 13 <- Map 12 (BROADCAST_EDGE), Reducer 15 (BROADCAST_EDGE) Map 14 <- Reducer 17 (BROADCAST_EDGE) -Map 6 <- Map 1 (BROADCAST_EDGE), Reducer 15 (BROADCAST_EDGE) -Reducer 10 <- Reducer 9 (SIMPLE_EDGE) -Reducer 12 <- Map 11 (SIMPLE_EDGE), Map 13 (SIMPLE_EDGE) +Reducer 10 <- Map 7 (SIMPLE_EDGE) Reducer 15 <- Map 14 (CUSTOM_SIMPLE_EDGE) Reducer 17 <- Map 16 (SIMPLE_EDGE) -Reducer 3 <- Map 2 (SIMPLE_EDGE) -Reducer 4 <- Map 2 (SIMPLE_EDGE) -Reducer 5 <- Reducer 4 (CUSTOM_SIMPLE_EDGE) -Reducer 7 <- Map 6 (SIMPLE_EDGE), Reducer 12 (SIMPLE_EDGE) -Reducer 8 <- Map 14 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE) -Reducer 9 <- Reducer 8 (SIMPLE_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 11 (SIMPLE_EDGE) +Reducer 3 <- Map 13 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE) +Reducer 4 <- Map 14 (SIMPLE_EDGE), Reducer 3 (SIMPLE_EDGE) +Reducer 5 <- Reducer 4 (SIMPLE_EDGE) +Reducer 6 <- Reducer 5 (SIMPLE_EDGE) +Reducer 8 <- Map 7 (SIMPLE_EDGE) +Reducer 9 <- Reducer 8 (CUSTOM_SIMPLE_EDGE) Stage-0 Fetch Operator limit:100 Stage-1 - Reducer 10 vectorized - File Output Operator [FS_233] - Limit [LIM_232] (rows=1 width=94) + Reducer 6 vectorized + File Output Operator [FS_234] + Limit [LIM_233] (rows=1 width=94) Number of rows:100 - Select Operator [SEL_231] (rows=1 width=94) + Select Operator [SEL_232] (rows=1 width=94) Output:["_col0","_col1"] - <-Reducer 9 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_230] - Filter Operator [FIL_229] (rows=1 width=94) + <-Reducer 5 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_231] + Filter Operator [FIL_230] (rows=1 width=94) predicate:(_col1 >= 10L) - Group By Operator [GBY_228] (rows=1 width=94) + Group By Operator [GBY_229] (rows=1 width=94) Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0 - <-Reducer 8 [SIMPLE_EDGE] + <-Reducer 4 [SIMPLE_EDGE] SHUFFLE [RS_68] PartitionCols:_col0 Group By Operator [GBY_67] (rows=1 width=94) - Output:["_col0","_col1"],aggregations:["count()"],keys:_col10 + Output:["_col0","_col1"],aggregations:["count()"],keys:_col4 Merge Join Operator [MERGEJOIN_174] (rows=500 width=86) - Conds:RS_63._col4=RS_204._col0(Inner),Output:["_col10"] + Conds:RS_63._col6=RS_218._col0(Inner),Output:["_col4"] <-Map 14 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_204] + SHUFFLE [RS_218] PartitionCols:_col0 - Select Operator [SEL_203] (rows=154000 width=227) + Select Operator [SEL_217] (rows=154000 width=227) Output:["_col0"] - Filter Operator [FIL_202] (rows=154000 width=227) + Filter Operator [FIL_216] (rows=154000 width=227) predicate:(_col1 > _col4) - Map Join Operator [MAPJOIN_201] (rows=462000 width=227) - Conds:SEL_200._col2=RS_198._col0(Inner),HybridGraceHashJoin:true,Output:["_col0","_col1","_col4"] + Map Join Operator [MAPJOIN_215] (rows=462000 width=227) + Conds:SEL_214._col2=RS_212._col0(Inner),HybridGraceHashJoin:true,Output:["_col0","_col1","_col4"] <-Reducer 17 [BROADCAST_EDGE] vectorized - BROADCAST [RS_198] + BROADCAST [RS_212] PartitionCols:_col0 - Select Operator [SEL_197] (rows=10 width=202) + Select Operator [SEL_211] (rows=10 width=202) Output:["_col0","_col1"] - Group By Operator [GBY_196] (rows=10 width=210) + Group By Operator [GBY_210] (rows=10 width=210) Output:["_col0","_col1","_col2"],aggregations:["sum(VALUE._col0)","count(VALUE._col1)"],keys:KEY._col0 <-Map 16 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_195] + SHUFFLE [RS_209] PartitionCols:_col0 - Group By Operator [GBY_194] (rows=10 width=210) + Group By Operator [GBY_208] (rows=10 width=210) Output:["_col0","_col1","_col2"],aggregations:["sum(i_current_price)","count(i_current_price)"],keys:i_category - Filter Operator [FIL_193] (rows=462000 width=201) + Filter Operator [FIL_207] (rows=462000 width=201) predicate:i_category is not null TableScan [TS_42] (rows=462000 width=201) default@item,j,Tbl:COMPLETE,Col:COMPLETE,Output:["i_current_price","i_category"] - <-Select Operator [SEL_200] (rows=462000 width=205) + <-Select Operator [SEL_214] (rows=462000 width=205) Output:["_col0","_col1","_col2"] - Filter Operator [FIL_199] (rows=462000 width=205) + Filter Operator [FIL_213] (rows=462000 width=205) predicate:i_category is not null TableScan [TS_39] (rows=462000 width=205) default@item,i,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_current_price","i_category"] - <-Reducer 7 [SIMPLE_EDGE] + <-Reducer 3 [SIMPLE_EDGE] SHUFFLE [RS_63] - PartitionCols:_col4 + PartitionCols:_col6 Merge Join Operator [MERGEJOIN_173] (rows=7192227 width=90) - Conds:RS_213._col5=RS_61._col0(Inner),Output:["_col4","_col10"] - <-Map 6 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_213] - PartitionCols:_col5 - Map Join Operator [MAPJOIN_212] (rows=7192227 width=4) - Conds:RS_192._col0=SEL_211._col0(Inner),HybridGraceHashJoin:true,Output:["_col4","_col5"] - <-Map 1 [BROADCAST_EDGE] vectorized - BROADCAST [RS_192] - PartitionCols:_col0 - Map Join Operator [MAPJOIN_191] (rows=660 width=4) - Conds:SEL_190._col1=RS_188._col0(Inner),HybridGraceHashJoin:true,Output:["_col0"] - <-Reducer 3 [BROADCAST_EDGE] vectorized - BROADCAST [RS_188] - PartitionCols:_col0 - Group By Operator [GBY_187] (rows=25 width=4) - Output:["_col0"],keys:KEY._col0 - <-Map 2 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_185] - PartitionCols:_col0 - Group By Operator [GBY_183] (rows=25 width=4) - Output:["_col0"],keys:d_month_seq - Select Operator [SEL_181] (rows=50 width=12) - Output:["d_month_seq"] - Filter Operator [FIL_179] (rows=50 width=12) - predicate:((d_moy = 2) and (d_year = 2000) and d_month_seq is not null) - TableScan [TS_3] (rows=73049 width=12) - default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_month_seq","d_year","d_moy"] - <-Select Operator [SEL_190] (rows=73049 width=8) - Output:["_col0","_col1"] - Filter Operator [FIL_189] (rows=73049 width=8) - predicate:d_month_seq is not null - TableScan [TS_0] (rows=73049 width=8) - default@date_dim,d,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_month_seq"] - <-Select Operator [SEL_211] (rows=525327388 width=11) - Output:["_col0","_col1","_col2"] - Filter Operator [FIL_210] (rows=525327388 width=11) - predicate:((ss_item_sk BETWEEN DynamicValue(RS_64_i_i_item_sk_min) AND DynamicValue(RS_64_i_i_item_sk_max) and in_bloom_filter(ss_item_sk, DynamicValue(RS_64_i_i_item_sk_bloom_filter))) and ss_customer_sk is not null and ss_sold_date_sk is not null) - TableScan [TS_10] (rows=575995635 width=11) - default@store_sales,s,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk"] - <-Reducer 15 [BROADCAST_EDGE] vectorized - BROADCAST [RS_209] - Group By Operator [GBY_208] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] - <-Map 14 [CUSTOM_SIMPLE_EDGE] vectorized - SHUFFLE [RS_207] - Group By Operator [GBY_206] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] - Select Operator [SEL_205] (rows=154000 width=4) - Output:["_col0"] - Please refer to the previous Select Operator [SEL_203] - <-Reducer 12 [SIMPLE_EDGE] - SHUFFLE [RS_61] + Conds:RS_60._col0=RS_228._col2(Inner),Output:["_col4","_col6"] + <-Map 13 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_228] + PartitionCols:_col2 + Select Operator [SEL_227] (rows=7192227 width=4) + Output:["_col1","_col2"] + Map Join Operator [MAPJOIN_226] (rows=7192227 width=4) + Conds:RS_206._col0=SEL_225._col0(Inner),HybridGraceHashJoin:true,Output:["_col4","_col5"] + <-Map 12 [BROADCAST_EDGE] vectorized + BROADCAST [RS_206] + PartitionCols:_col0 + Map Join Operator [MAPJOIN_205] (rows=660 width=4) + Conds:SEL_204._col1=RS_202._col0(Inner),HybridGraceHashJoin:true,Output:["_col0"] + <-Reducer 10 [BROADCAST_EDGE] vectorized + BROADCAST [RS_202] + PartitionCols:_col0 + Group By Operator [GBY_201] (rows=25 width=4) + Output:["_col0"],keys:KEY._col0 + <-Map 7 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_186] + PartitionCols:_col0 + Group By Operator [GBY_184] (rows=25 width=4) + Output:["_col0"],keys:d_month_seq + Select Operator [SEL_182] (rows=50 width=12) + Output:["d_month_seq"] + Filter Operator [FIL_180] (rows=50 width=12) + predicate:((d_moy = 2) and (d_year = 2000) and d_month_seq is not null) + TableScan [TS_3] (rows=73049 width=12) + default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_month_seq","d_year","d_moy"] + <-Select Operator [SEL_204] (rows=73049 width=8) + Output:["_col0","_col1"] + Filter Operator [FIL_203] (rows=73049 width=8) + predicate:d_month_seq is not null + TableScan [TS_19] (rows=73049 width=8) + default@date_dim,d,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_month_seq"] + <-Select Operator [SEL_225] (rows=525327388 width=11) + Output:["_col0","_col1","_col2"] + Filter Operator [FIL_224] (rows=525327388 width=11) + predicate:((ss_item_sk BETWEEN DynamicValue(RS_64_i_i_item_sk_min) AND DynamicValue(RS_64_i_i_item_sk_max) and in_bloom_filter(ss_item_sk, DynamicValue(RS_64_i_i_item_sk_bloom_filter))) and ss_customer_sk is not null and ss_sold_date_sk is not null) + TableScan [TS_29] (rows=575995635 width=11) + default@store_sales,s,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk"] + <-Reducer 15 [BROADCAST_EDGE] vectorized + BROADCAST [RS_223] + Group By Operator [GBY_222] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] + <-Map 14 [CUSTOM_SIMPLE_EDGE] vectorized + SHUFFLE [RS_221] + Group By Operator [GBY_220] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] + Select Operator [SEL_219] (rows=154000 width=4) + Output:["_col0"] + Please refer to the previous Select Operator [SEL_217] + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_60] PartitionCols:_col0 - Merge Join Operator [MERGEJOIN_171] (rows=80000000 width=90) - Conds:RS_225._col1=RS_227._col0(Inner),Output:["_col0","_col4"] - <-Map 11 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_225] + Merge Join Operator [MERGEJOIN_169] (rows=80000000 width=90) + Conds:RS_198._col1=RS_200._col0(Inner),Output:["_col0","_col4"] + <-Map 1 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_198] PartitionCols:_col1 - Map Join Operator [MAPJOIN_224] (rows=80000000 width=8) + Map Join Operator [MAPJOIN_197] (rows=80000000 width=8) Conds:(Inner),Output:["_col0","_col1"] - <-Reducer 5 [BROADCAST_EDGE] vectorized - BROADCAST [RS_221] - Select Operator [SEL_220] (rows=1 width=8) - Filter Operator [FIL_219] (rows=1 width=8) + <-Reducer 9 [BROADCAST_EDGE] vectorized + BROADCAST [RS_194] + Select Operator [SEL_193] (rows=1 width=8) + Filter Operator [FIL_192] (rows=1 width=8) predicate:(sq_count_check(_col0) <= 1) - Group By Operator [GBY_218] (rows=1 width=8) + Group By Operator [GBY_191] (rows=1 width=8) Output:["_col0"],aggregations:["count(VALUE._col0)"] - <-Reducer 4 [CUSTOM_SIMPLE_EDGE] vectorized - PARTITION_ONLY_SHUFFLE [RS_217] - Group By Operator [GBY_216] (rows=1 width=8) + <-Reducer 8 [CUSTOM_SIMPLE_EDGE] vectorized + PARTITION_ONLY_SHUFFLE [RS_190] + Group By Operator [GBY_189] (rows=1 width=8) Output:["_col0"],aggregations:["count()"] - Select Operator [SEL_215] (rows=25 width=4) - Group By Operator [GBY_214] (rows=25 width=4) + Select Operator [SEL_188] (rows=25 width=4) + Group By Operator [GBY_187] (rows=25 width=4) Output:["_col0"],keys:KEY._col0 - <-Map 2 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_186] + <-Map 7 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_185] PartitionCols:_col0 - Group By Operator [GBY_184] (rows=25 width=4) + Group By Operator [GBY_183] (rows=25 width=4) Output:["_col0"],keys:d_month_seq - Select Operator [SEL_182] (rows=50 width=12) + Select Operator [SEL_181] (rows=50 width=12) Output:["d_month_seq"] - Filter Operator [FIL_180] (rows=50 width=12) + Filter Operator [FIL_179] (rows=50 width=12) predicate:((d_moy = 2) and (d_year = 2000)) Please refer to the previous TableScan [TS_3] - <-Select Operator [SEL_223] (rows=80000000 width=8) + <-Select Operator [SEL_196] (rows=80000000 width=8) Output:["_col0","_col1"] - Filter Operator [FIL_222] (rows=80000000 width=8) + Filter Operator [FIL_195] (rows=80000000 width=8) predicate:c_current_addr_sk is not null - TableScan [TS_13] (rows=80000000 width=8) + TableScan [TS_0] (rows=80000000 width=8) default@customer,c,Tbl:COMPLETE,Col:COMPLETE,Output:["c_customer_sk","c_current_addr_sk"] - <-Map 13 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_227] + <-Map 11 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_200] PartitionCols:_col0 - Select Operator [SEL_226] (rows=40000000 width=90) + Select Operator [SEL_199] (rows=40000000 width=90) Output:["_col0","_col1"] - TableScan [TS_30] (rows=40000000 width=90) + TableScan [TS_17] (rows=40000000 width=90) default@customer_address,a,Tbl:COMPLETE,Col:COMPLETE,Output:["ca_address_sk","ca_state"] diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query63.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query63.q.out index 5620b819fb..000aecd8ea 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query63.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query63.q.out @@ -89,7 +89,7 @@ Stage-0 Select Operator [SEL_24] (rows=65 width=228) Output:["_col0","_col1","_col2"] Filter Operator [FIL_36] (rows=65 width=228) - predicate:CASE WHEN ((avg_window_0 > 0)) THEN (((abs((_col2 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (null) END + predicate:CASE WHEN ((avg_window_0 > 0)) THEN (((abs((_col2 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (false) END Select Operator [SEL_23] (rows=130 width=116) Output:["avg_window_0","_col0","_col2"] PTF Operator [PTF_22] (rows=130 width=116) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query68.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query68.q.out index dd4ce4eb84..137139f87e 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query68.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query68.q.out @@ -97,134 +97,134 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### Plan optimized by CBO. Vertex dependency in root stage -Map 5 <- Reducer 12 (BROADCAST_EDGE) -Reducer 10 <- Reducer 9 (SIMPLE_EDGE) -Reducer 12 <- Map 11 (CUSTOM_SIMPLE_EDGE) -Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE) -Reducer 3 <- Map 15 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE) +Map 8 <- Reducer 13 (BROADCAST_EDGE) +Reducer 10 <- Map 14 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE) +Reducer 11 <- Map 15 (SIMPLE_EDGE), Reducer 10 (SIMPLE_EDGE) +Reducer 13 <- Map 12 (CUSTOM_SIMPLE_EDGE) +Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE) +Reducer 3 <- Reducer 2 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE) Reducer 4 <- Reducer 3 (SIMPLE_EDGE) -Reducer 6 <- Map 11 (SIMPLE_EDGE), Map 5 (SIMPLE_EDGE) -Reducer 7 <- Map 13 (SIMPLE_EDGE), Reducer 6 (SIMPLE_EDGE) -Reducer 8 <- Map 14 (SIMPLE_EDGE), Reducer 7 (SIMPLE_EDGE) -Reducer 9 <- Map 15 (SIMPLE_EDGE), Reducer 8 (SIMPLE_EDGE) +Reducer 6 <- Map 5 (SIMPLE_EDGE), Reducer 11 (SIMPLE_EDGE) +Reducer 7 <- Reducer 6 (SIMPLE_EDGE) +Reducer 9 <- Map 12 (SIMPLE_EDGE), Map 8 (SIMPLE_EDGE) Stage-0 Fetch Operator limit:100 Stage-1 Reducer 4 vectorized - File Output Operator [FS_176] - Limit [LIM_175] (rows=100 width=706) + File Output Operator [FS_172] + Limit [LIM_171] (rows=100 width=706) Number of rows:100 - Select Operator [SEL_174] (rows=727776 width=706) + Select Operator [SEL_170] (rows=727776 width=706) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"] <-Reducer 3 [SIMPLE_EDGE] SHUFFLE [RS_44] Select Operator [SEL_43] (rows=727776 width=706) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"] Filter Operator [FIL_42] (rows=727776 width=706) - predicate:(_col11 <> _col6) - Merge Join Operator [MERGEJOIN_147] (rows=727776 width=706) - Conds:RS_39._col1=RS_169._col0(Inner),Output:["_col2","_col3","_col4","_col6","_col7","_col8","_col9","_col11"] - <-Map 15 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_169] - PartitionCols:_col0 - Select Operator [SEL_168] (rows=40000000 width=97) - Output:["_col0","_col1"] - TableScan [TS_34] (rows=40000000 width=97) - default@customer_address,current_addr,Tbl:COMPLETE,Col:COMPLETE,Output:["ca_address_sk","ca_city"] + predicate:(_col5 <> _col8) + Merge Join Operator [MERGEJOIN_143] (rows=727776 width=706) + Conds:RS_39._col0=RS_169._col1(Inner),Output:["_col2","_col3","_col5","_col6","_col8","_col9","_col10","_col11"] <-Reducer 2 [SIMPLE_EDGE] SHUFFLE [RS_39] - PartitionCols:_col1 - Merge Join Operator [MERGEJOIN_146] (rows=727776 width=617) - Conds:RS_150._col0=RS_173._col1(Inner),Output:["_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col9"] - <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_150] + PartitionCols:_col0 + Merge Join Operator [MERGEJOIN_138] (rows=80000000 width=277) + Conds:RS_146._col1=RS_148._col0(Inner),Output:["_col0","_col2","_col3","_col5"] + <-Map 5 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_148] PartitionCols:_col0 - Select Operator [SEL_149] (rows=80000000 width=188) + Select Operator [SEL_147] (rows=40000000 width=97) + Output:["_col0","_col1"] + TableScan [TS_3] (rows=40000000 width=97) + default@customer_address,current_addr,Tbl:COMPLETE,Col:COMPLETE,Output:["ca_address_sk","ca_city"] + <-Map 1 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_146] + PartitionCols:_col1 + Select Operator [SEL_145] (rows=80000000 width=188) Output:["_col0","_col1","_col2","_col3"] - Filter Operator [FIL_148] (rows=80000000 width=188) + Filter Operator [FIL_144] (rows=80000000 width=188) predicate:c_current_addr_sk is not null TableScan [TS_0] (rows=80000000 width=188) default@customer,customer,Tbl:COMPLETE,Col:COMPLETE,Output:["c_customer_sk","c_current_addr_sk","c_first_name","c_last_name"] - <-Reducer 10 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_173] - PartitionCols:_col1 - Select Operator [SEL_172] (rows=727776 width=433) - Output:["_col0","_col1","_col2","_col3","_col4","_col5"] - Group By Operator [GBY_171] (rows=727776 width=433) - Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3 - <-Reducer 9 [SIMPLE_EDGE] - SHUFFLE [RS_31] - PartitionCols:_col0, _col1, _col2, _col3 - Group By Operator [GBY_30] (rows=727776 width=433) - Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col6)","sum(_col7)","sum(_col8)"],keys:_col1, _col13, _col3, _col5 - Merge Join Operator [MERGEJOIN_145] (rows=727776 width=97) - Conds:RS_26._col3=RS_170._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col8","_col13"] + <-Reducer 7 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_169] + PartitionCols:_col1 + Select Operator [SEL_168] (rows=727776 width=433) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + Group By Operator [GBY_167] (rows=727776 width=433) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2, KEY._col3 + <-Reducer 6 [SIMPLE_EDGE] + SHUFFLE [RS_33] + PartitionCols:_col0, _col1, _col2, _col3 + Group By Operator [GBY_32] (rows=727776 width=433) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"],aggregations:["sum(_col6)","sum(_col7)","sum(_col8)"],keys:_col1, _col13, _col3, _col5 + Merge Join Operator [MERGEJOIN_142] (rows=727776 width=97) + Conds:RS_28._col3=RS_149._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col8","_col13"] + <-Map 5 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_149] + PartitionCols:_col0 + Please refer to the previous Select Operator [SEL_147] + <-Reducer 11 [SIMPLE_EDGE] + SHUFFLE [RS_28] + PartitionCols:_col3 + Merge Join Operator [MERGEJOIN_141] (rows=727776 width=4) + Conds:RS_25._col2=RS_166._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col8"] <-Map 15 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_170] + SHUFFLE [RS_166] PartitionCols:_col0 - Please refer to the previous Select Operator [SEL_168] - <-Reducer 8 [SIMPLE_EDGE] - SHUFFLE [RS_26] - PartitionCols:_col3 - Merge Join Operator [MERGEJOIN_144] (rows=727776 width=4) - Conds:RS_23._col2=RS_167._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col8"] + Select Operator [SEL_165] (rows=1855 width=4) + Output:["_col0"] + Filter Operator [FIL_164] (rows=1855 width=12) + predicate:((hd_dep_count = 2) or (hd_vehicle_count = 1)) + TableScan [TS_14] (rows=7200 width=12) + default@household_demographics,household_demographics,Tbl:COMPLETE,Col:COMPLETE,Output:["hd_demo_sk","hd_dep_count","hd_vehicle_count"] + <-Reducer 10 [SIMPLE_EDGE] + SHUFFLE [RS_25] + PartitionCols:_col2 + Merge Join Operator [MERGEJOIN_140] (rows=2824787 width=4) + Conds:RS_22._col4=RS_163._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6","_col7","_col8"] <-Map 14 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_167] + SHUFFLE [RS_163] PartitionCols:_col0 - Select Operator [SEL_166] (rows=1855 width=4) + Select Operator [SEL_162] (rows=14 width=4) Output:["_col0"] - Filter Operator [FIL_165] (rows=1855 width=12) - predicate:((hd_dep_count = 2) or (hd_vehicle_count = 1)) - TableScan [TS_12] (rows=7200 width=12) - default@household_demographics,household_demographics,Tbl:COMPLETE,Col:COMPLETE,Output:["hd_demo_sk","hd_dep_count","hd_vehicle_count"] - <-Reducer 7 [SIMPLE_EDGE] - SHUFFLE [RS_23] - PartitionCols:_col2 - Merge Join Operator [MERGEJOIN_143] (rows=2824787 width=4) - Conds:RS_20._col4=RS_164._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6","_col7","_col8"] - <-Map 13 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_164] + Filter Operator [FIL_161] (rows=14 width=97) + predicate:(s_city) IN ('Cedar Grove', 'Wildwood') + TableScan [TS_11] (rows=1704 width=97) + default@store,store,Tbl:COMPLETE,Col:COMPLETE,Output:["s_store_sk","s_city"] + <-Reducer 9 [SIMPLE_EDGE] + SHUFFLE [RS_22] + PartitionCols:_col4 + Merge Join Operator [MERGEJOIN_139] (rows=42598570 width=185) + Conds:RS_160._col0=RS_152._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"] + <-Map 12 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_152] PartitionCols:_col0 - Select Operator [SEL_163] (rows=14 width=4) + Select Operator [SEL_151] (rows=170 width=4) Output:["_col0"] - Filter Operator [FIL_162] (rows=14 width=97) - predicate:(s_city) IN ('Cedar Grove', 'Wildwood') - TableScan [TS_9] (rows=1704 width=97) - default@store,store,Tbl:COMPLETE,Col:COMPLETE,Output:["s_store_sk","s_city"] - <-Reducer 6 [SIMPLE_EDGE] - SHUFFLE [RS_20] - PartitionCols:_col4 - Merge Join Operator [MERGEJOIN_142] (rows=42598570 width=185) - Conds:RS_161._col0=RS_153._col0(Inner),Output:["_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"] - <-Map 11 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_153] - PartitionCols:_col0 - Select Operator [SEL_152] (rows=170 width=4) - Output:["_col0"] - Filter Operator [FIL_151] (rows=170 width=12) - predicate:((d_year) IN (1998, 1999, 2000) and d_dom BETWEEN 1 AND 2) - TableScan [TS_6] (rows=73049 width=12) - default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year","d_dom"] - <-Map 5 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_161] - PartitionCols:_col0 - Select Operator [SEL_160] (rows=457565061 width=343) - Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"] - Filter Operator [FIL_159] (rows=457565061 width=343) - predicate:((ss_sold_date_sk BETWEEN DynamicValue(RS_18_date_dim_d_date_sk_min) AND DynamicValue(RS_18_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_18_date_dim_d_date_sk_bloom_filter))) and ss_addr_sk is not null and ss_customer_sk is not null and ss_hdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) - TableScan [TS_3] (rows=575995635 width=343) - default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_customer_sk","ss_hdemo_sk","ss_addr_sk","ss_store_sk","ss_ticket_number","ss_ext_sales_price","ss_ext_list_price","ss_ext_tax"] - <-Reducer 12 [BROADCAST_EDGE] vectorized - BROADCAST [RS_158] - Group By Operator [GBY_157] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] - <-Map 11 [CUSTOM_SIMPLE_EDGE] vectorized - SHUFFLE [RS_156] - Group By Operator [GBY_155] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] - Select Operator [SEL_154] (rows=170 width=4) - Output:["_col0"] - Please refer to the previous Select Operator [SEL_152] + Filter Operator [FIL_150] (rows=170 width=12) + predicate:((d_year) IN (1998, 1999, 2000) and d_dom BETWEEN 1 AND 2) + TableScan [TS_8] (rows=73049 width=12) + default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year","d_dom"] + <-Map 8 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_160] + PartitionCols:_col0 + Select Operator [SEL_159] (rows=457565061 width=343) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"] + Filter Operator [FIL_158] (rows=457565061 width=343) + predicate:((ss_sold_date_sk BETWEEN DynamicValue(RS_20_date_dim_d_date_sk_min) AND DynamicValue(RS_20_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_20_date_dim_d_date_sk_bloom_filter))) and ss_addr_sk is not null and ss_customer_sk is not null and ss_hdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) + TableScan [TS_5] (rows=575995635 width=343) + default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_customer_sk","ss_hdemo_sk","ss_addr_sk","ss_store_sk","ss_ticket_number","ss_ext_sales_price","ss_ext_list_price","ss_ext_tax"] + <-Reducer 13 [BROADCAST_EDGE] vectorized + BROADCAST [RS_157] + Group By Operator [GBY_156] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] + <-Map 12 [CUSTOM_SIMPLE_EDGE] vectorized + SHUFFLE [RS_155] + Group By Operator [GBY_154] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] + Select Operator [SEL_153] (rows=170 width=4) + Output:["_col0"] + Please refer to the previous Select Operator [SEL_151] diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query70.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query70.q.out index a49314c858..23a029c1da 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query70.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query70.q.out @@ -110,12 +110,12 @@ Stage-0 Select Operator [SEL_167] (rows=1 width=492) Output:["_col0","_col1","_col2","_col3","_col4","_col5"] PTF Operator [PTF_166] (rows=1 width=304) - Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 DESC NULLS LAST","partition by:":"(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END"}] + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 DESC NULLS LAST","partition by:":"(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END"}] Select Operator [SEL_165] (rows=1 width=304) Output:["_col0","_col1","_col2","_col3"] <-Reducer 4 [SIMPLE_EDGE] vectorized SHUFFLE [RS_164] - PartitionCols:(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END + PartitionCols:(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END Select Operator [SEL_163] (rows=1 width=304) Output:["_col0","_col1","_col2","_col3"] Group By Operator [GBY_162] (rows=1 width=304) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query72.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query72.q.out index 1a9c2cf203..d0900a1221 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query72.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query72.q.out @@ -101,14 +101,14 @@ Stage-0 limit:100 Stage-1 Reducer 12 vectorized - File Output Operator [FS_277] - Limit [LIM_276] (rows=100 width=312) + File Output Operator [FS_279] + Limit [LIM_278] (rows=100 width=312) Number of rows:100 - Select Operator [SEL_275] (rows=193558220 width=312) + Select Operator [SEL_277] (rows=193558220 width=312) Output:["_col0","_col1","_col2","_col3","_col4","_col5"] <-Reducer 11 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_274] - Group By Operator [GBY_273] (rows=193558220 width=312) + SHUFFLE [RS_276] + Group By Operator [GBY_275] (rows=193558220 width=312) Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(VALUE._col0)","count(VALUE._col1)","count(VALUE._col2)"],keys:KEY._col0, KEY._col1, KEY._col2 <-Reducer 10 [SIMPLE_EDGE] SHUFFLE [RS_64] @@ -117,12 +117,12 @@ Stage-0 Output:["_col0","_col1","_col2","_col3","_col4","_col5"],aggregations:["count(_col3)","count(_col4)","count()"],keys:_col0, _col1, _col2 Select Operator [SEL_61] (rows=499184560 width=292) Output:["_col0","_col1","_col2","_col3","_col4"] - Merge Join Operator [MERGEJOIN_243] (rows=499184560 width=292) - Conds:RS_58._col4, _col6=RS_272._col0, _col1(Left Outer),Output:["_col13","_col15","_col19","_col25"] + Merge Join Operator [MERGEJOIN_245] (rows=499184560 width=292) + Conds:RS_58._col4, _col6=RS_274._col0, _col1(Left Outer),Output:["_col13","_col15","_col19","_col25"] <-Map 24 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_272] + SHUFFLE [RS_274] PartitionCols:_col0, _col1 - Select Operator [SEL_271] (rows=28798881 width=8) + Select Operator [SEL_273] (rows=28798881 width=8) Output:["_col0","_col1"] TableScan [TS_56] (rows=28798881 width=8) default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["cr_item_sk","cr_order_number"] @@ -131,50 +131,50 @@ Stage-0 PartitionCols:_col4, _col6 Select Operator [SEL_55] (rows=193558220 width=300) Output:["_col4","_col6","_col13","_col15","_col19","_col25"] - Merge Join Operator [MERGEJOIN_242] (rows=193558220 width=300) - Conds:RS_52._col5=RS_270._col0(Left Outer),Output:["_col4","_col6","_col13","_col20","_col24","_col25"] + Merge Join Operator [MERGEJOIN_244] (rows=193558220 width=300) + Conds:RS_52._col4=RS_272._col0(Inner),Output:["_col4","_col6","_col13","_col20","_col21","_col25"] <-Map 23 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_270] + SHUFFLE [RS_272] PartitionCols:_col0 - Select Operator [SEL_269] (rows=2300 width=4) - Output:["_col0"] - TableScan [TS_27] (rows=2300 width=4) - default@promotion,promotion,Tbl:COMPLETE,Col:COMPLETE,Output:["p_promo_sk"] + Select Operator [SEL_271] (rows=462000 width=188) + Output:["_col0","_col1"] + TableScan [TS_27] (rows=462000 width=188) + default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_item_desc"] <-Reducer 8 [SIMPLE_EDGE] SHUFFLE [RS_52] - PartitionCols:_col5 - Merge Join Operator [MERGEJOIN_241] (rows=193558220 width=299) - Conds:RS_49._col4=RS_268._col0(Inner),Output:["_col4","_col5","_col6","_col13","_col20","_col24"] - <-Map 22 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_268] - PartitionCols:_col0 - Select Operator [SEL_267] (rows=462000 width=188) - Output:["_col0","_col1"] - TableScan [TS_25] (rows=462000 width=188) - default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_item_desc"] - <-Reducer 7 [SIMPLE_EDGE] - SHUFFLE [RS_49] - PartitionCols:_col4 - Filter Operator [FIL_48] (rows=193558220 width=131) - predicate:(_col22 > _col14) - Merge Join Operator [MERGEJOIN_240] (rows=580674662 width=131) - Conds:RS_45._col1=RS_266._col0(Inner),Output:["_col4","_col5","_col6","_col13","_col14","_col20","_col22"] + PartitionCols:_col4 + Filter Operator [FIL_51] (rows=193558220 width=132) + predicate:(_col23 > _col14) + Merge Join Operator [MERGEJOIN_243] (rows=580674662 width=132) + Conds:RS_48._col1=RS_270._col0(Inner),Output:["_col4","_col6","_col13","_col14","_col20","_col21","_col23"] + <-Map 22 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_270] + PartitionCols:_col0 + Select Operator [SEL_269] (rows=73049 width=12) + Output:["_col0","_col1"] + TableScan [TS_25] (rows=73049 width=98) + default@date_dim,d3,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_date"] + <-Reducer 7 [SIMPLE_EDGE] + SHUFFLE [RS_48] + PartitionCols:_col1 + Merge Join Operator [MERGEJOIN_242] (rows=580674662 width=127) + Conds:RS_45._col5=RS_268._col0(Left Outer),Output:["_col1","_col4","_col6","_col13","_col14","_col20","_col21"] <-Map 21 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_266] + SHUFFLE [RS_268] PartitionCols:_col0 - Select Operator [SEL_265] (rows=73049 width=12) - Output:["_col0","_col1"] - TableScan [TS_23] (rows=73049 width=98) - default@date_dim,d3,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_date"] + Select Operator [SEL_267] (rows=2300 width=4) + Output:["_col0"] + TableScan [TS_23] (rows=2300 width=4) + default@promotion,promotion,Tbl:COMPLETE,Col:COMPLETE,Output:["p_promo_sk"] <-Reducer 6 [SIMPLE_EDGE] SHUFFLE [RS_45] - PartitionCols:_col1 - Merge Join Operator [MERGEJOIN_239] (rows=580674662 width=127) - Conds:RS_42._col17=RS_264._col0(Inner),Output:["_col1","_col4","_col5","_col6","_col13","_col14","_col20"] + PartitionCols:_col5 + Merge Join Operator [MERGEJOIN_241] (rows=580674662 width=127) + Conds:RS_42._col17=RS_266._col0(Inner),Output:["_col1","_col4","_col5","_col6","_col13","_col14","_col20"] <-Map 20 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_264] + SHUFFLE [RS_266] PartitionCols:_col0 - Select Operator [SEL_263] (rows=27 width=104) + Select Operator [SEL_265] (rows=27 width=104) Output:["_col0","_col1"] TableScan [TS_21] (rows=27 width=104) default@warehouse,warehouse,Tbl:COMPLETE,Col:COMPLETE,Output:["w_warehouse_sk","w_warehouse_name"] @@ -183,88 +183,88 @@ Stage-0 PartitionCols:_col17 Filter Operator [FIL_41] (rows=580674662 width=39) predicate:(_col18 < _col7) - Merge Join Operator [MERGEJOIN_238] (rows=1742023986 width=39) - Conds:RS_38._col10, _col4=RS_262._col0, _col1(Inner),Output:["_col1","_col4","_col5","_col6","_col7","_col13","_col14","_col17","_col18"] + Merge Join Operator [MERGEJOIN_240] (rows=1742023986 width=39) + Conds:RS_38._col10, _col4=RS_264._col0, _col1(Inner),Output:["_col1","_col4","_col5","_col6","_col7","_col13","_col14","_col17","_col18"] <-Map 19 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_262] + SHUFFLE [RS_264] PartitionCols:_col0, _col1 - Select Operator [SEL_261] (rows=37584000 width=15) + Select Operator [SEL_263] (rows=37584000 width=15) Output:["_col0","_col1","_col2","_col3"] TableScan [TS_19] (rows=37584000 width=15) default@inventory,inventory,Tbl:COMPLETE,Col:COMPLETE,Output:["inv_date_sk","inv_item_sk","inv_warehouse_sk","inv_quantity_on_hand"] <-Reducer 4 [SIMPLE_EDGE] SHUFFLE [RS_38] PartitionCols:_col10, _col4 - Merge Join Operator [MERGEJOIN_237] (rows=2899758 width=30) + Merge Join Operator [MERGEJOIN_239] (rows=2899758 width=30) Conds:RS_35._col0=RS_36._col2(Inner),Output:["_col1","_col4","_col5","_col6","_col7","_col10","_col13","_col14"] <-Reducer 16 [SIMPLE_EDGE] SHUFFLE [RS_36] PartitionCols:_col2 - Merge Join Operator [MERGEJOIN_236] (rows=3621 width=20) - Conds:RS_246._col1=RS_249._col1(Inner),Output:["_col0","_col2","_col3","_col4"] + Merge Join Operator [MERGEJOIN_238] (rows=3621 width=20) + Conds:RS_248._col1=RS_251._col1(Inner),Output:["_col0","_col2","_col3","_col4"] <-Map 15 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_246] + SHUFFLE [RS_248] PartitionCols:_col1 - Select Operator [SEL_245] (rows=73049 width=8) + Select Operator [SEL_247] (rows=73049 width=8) Output:["_col0","_col1"] - Filter Operator [FIL_244] (rows=73049 width=8) + Filter Operator [FIL_246] (rows=73049 width=8) predicate:d_week_seq is not null TableScan [TS_9] (rows=73049 width=8) default@date_dim,d2,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_week_seq"] <-Map 18 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_249] + SHUFFLE [RS_251] PartitionCols:_col1 - Select Operator [SEL_248] (rows=652 width=16) + Select Operator [SEL_250] (rows=652 width=16) Output:["_col0","_col1","_col2"] - Filter Operator [FIL_247] (rows=652 width=106) + Filter Operator [FIL_249] (rows=652 width=106) predicate:((d_year = 2001) and d_week_seq is not null) TableScan [TS_12] (rows=73049 width=106) default@date_dim,d1,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_date","d_week_seq","d_year"] <-Reducer 3 [SIMPLE_EDGE] SHUFFLE [RS_35] PartitionCols:_col0 - Merge Join Operator [MERGEJOIN_235] (rows=8179029 width=21) - Conds:RS_32._col3=RS_260._col0(Inner),Output:["_col0","_col1","_col4","_col5","_col6","_col7"] + Merge Join Operator [MERGEJOIN_237] (rows=8179029 width=21) + Conds:RS_32._col3=RS_262._col0(Inner),Output:["_col0","_col1","_col4","_col5","_col6","_col7"] <-Map 14 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_260] + SHUFFLE [RS_262] PartitionCols:_col0 - Select Operator [SEL_259] (rows=1440 width=4) + Select Operator [SEL_261] (rows=1440 width=4) Output:["_col0"] - Filter Operator [FIL_258] (rows=1440 width=96) + Filter Operator [FIL_260] (rows=1440 width=96) predicate:(hd_buy_potential = '1001-5000') TableScan [TS_6] (rows=7200 width=96) default@household_demographics,household_demographics,Tbl:COMPLETE,Col:COMPLETE,Output:["hd_demo_sk","hd_buy_potential"] <-Reducer 2 [SIMPLE_EDGE] SHUFFLE [RS_32] PartitionCols:_col3 - Merge Join Operator [MERGEJOIN_234] (rows=40895144 width=27) - Conds:RS_254._col2=RS_257._col0(Inner),Output:["_col0","_col1","_col3","_col4","_col5","_col6","_col7"] + Merge Join Operator [MERGEJOIN_236] (rows=40895144 width=27) + Conds:RS_256._col2=RS_259._col0(Inner),Output:["_col0","_col1","_col3","_col4","_col5","_col6","_col7"] <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_254] + SHUFFLE [RS_256] PartitionCols:_col2 - Select Operator [SEL_253] (rows=282274763 width=31) + Select Operator [SEL_255] (rows=282274763 width=31) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"] - Filter Operator [FIL_252] (rows=282274763 width=31) + Filter Operator [FIL_254] (rows=282274763 width=31) predicate:((cs_sold_date_sk BETWEEN DynamicValue(RS_36_d1_d_date_sk_min) AND DynamicValue(RS_36_d1_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, DynamicValue(RS_36_d1_d_date_sk_bloom_filter))) and cs_bill_cdemo_sk is not null and cs_bill_hdemo_sk is not null and cs_ship_date_sk is not null and cs_sold_date_sk is not null) TableScan [TS_0] (rows=287989836 width=31) default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["cs_sold_date_sk","cs_ship_date_sk","cs_bill_cdemo_sk","cs_bill_hdemo_sk","cs_item_sk","cs_promo_sk","cs_order_number","cs_quantity"] <-Reducer 17 [BROADCAST_EDGE] vectorized - BROADCAST [RS_251] - Group By Operator [GBY_250] (rows=1 width=12) + BROADCAST [RS_253] + Group By Operator [GBY_252] (rows=1 width=12) Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] <-Reducer 16 [CUSTOM_SIMPLE_EDGE] - SHUFFLE [RS_138] - Group By Operator [GBY_137] (rows=1 width=12) + SHUFFLE [RS_140] + Group By Operator [GBY_139] (rows=1 width=12) Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] - Select Operator [SEL_136] (rows=3621 width=8) + Select Operator [SEL_138] (rows=3621 width=8) Output:["_col0"] - Please refer to the previous Merge Join Operator [MERGEJOIN_236] + Please refer to the previous Merge Join Operator [MERGEJOIN_238] <-Map 13 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_257] + SHUFFLE [RS_259] PartitionCols:_col0 - Select Operator [SEL_256] (rows=265971 width=4) + Select Operator [SEL_258] (rows=265971 width=4) Output:["_col0"] - Filter Operator [FIL_255] (rows=265971 width=89) + Filter Operator [FIL_257] (rows=265971 width=89) predicate:(cd_marital_status = 'M') TableScan [TS_3] (rows=1861800 width=89) default@customer_demographics,customer_demographics,Tbl:COMPLETE,Col:COMPLETE,Output:["cd_demo_sk","cd_marital_status"] diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query74.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query74.q.out index 525217b526..36c7b7975c 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query74.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query74.q.out @@ -171,7 +171,7 @@ Stage-0 Select Operator [SEL_88] (rows=12248094 width=280) Output:["_col0","_col1","_col2"] Filter Operator [FIL_87] (rows=12248094 width=732) - predicate:CASE WHEN (_col4 is not null) THEN (CASE WHEN (_col2) THEN (((_col6 / _col1) > (_col10 / _col4))) ELSE ((null > (_col10 / _col4))) END) ELSE (CASE WHEN (_col2) THEN (((_col6 / _col1) > null)) ELSE (null) END) END + predicate:CASE WHEN (_col4 is not null) THEN (CASE WHEN (_col2) THEN (((_col6 / _col1) > (_col10 / _col4))) ELSE (null) END) ELSE (null) END Merge Join Operator [MERGEJOIN_283] (rows=24496188 width=732) Conds:RS_84._col3=RS_345._col0(Inner),Output:["_col1","_col2","_col4","_col6","_col7","_col8","_col9","_col10"] <-Reducer 20 [SIMPLE_EDGE] vectorized diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query78.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query78.q.out index ef4d6dbc21..888d33557b 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query78.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query78.q.out @@ -143,8 +143,8 @@ Reducer 18 <- Map 17 (SIMPLE_EDGE), Map 19 (SIMPLE_EDGE) Reducer 2 <- Map 1 (SIMPLE_EDGE), Reducer 15 (SIMPLE_EDGE) Reducer 21 <- Map 20 (SIMPLE_EDGE), Map 22 (SIMPLE_EDGE) Reducer 3 <- Reducer 2 (SIMPLE_EDGE) -Reducer 4 <- Reducer 3 (ONE_TO_ONE_EDGE), Reducer 9 (ONE_TO_ONE_EDGE) -Reducer 5 <- Reducer 12 (SIMPLE_EDGE), Reducer 4 (SIMPLE_EDGE) +Reducer 4 <- Reducer 3 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE) +Reducer 5 <- Reducer 12 (ONE_TO_ONE_EDGE), Reducer 4 (SIMPLE_EDGE) Reducer 6 <- Reducer 5 (SIMPLE_EDGE) Reducer 7 <- Map 1 (CUSTOM_SIMPLE_EDGE) Reducer 8 <- Map 1 (SIMPLE_EDGE), Reducer 18 (SIMPLE_EDGE) @@ -155,191 +155,191 @@ Stage-0 limit:100 Stage-1 Reducer 6 vectorized - File Output Operator [FS_238] - Limit [LIM_237] (rows=100 width=484) + File Output Operator [FS_269] + Limit [LIM_268] (rows=100 width=484) Number of rows:100 - Select Operator [SEL_236] (rows=462576000046 width=483) + Select Operator [SEL_267] (rows=203549242538 width=483) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"] <-Reducer 5 [SIMPLE_EDGE] SHUFFLE [RS_73] - Select Operator [SEL_72] (rows=462576000046 width=719) + Select Operator [SEL_72] (rows=203549242538 width=719) Output:["_col0","_col1","_col6","_col7","_col8","_col9","_col10","_col11","_col12"] - Filter Operator [FIL_71] (rows=462576000046 width=702) - predicate:CASE WHEN (_col11 is not null) THEN ((_col11 > 0L)) ELSE (false) END - Merge Join Operator [MERGEJOIN_191] (rows=925152000093 width=702) - Conds:RS_68._col1=RS_235._col0(Left Outer),Output:["_col0","_col1","_col2","_col3","_col4","_col7","_col8","_col9","_col11","_col12","_col13"] - <-Reducer 12 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_235] - PartitionCols:_col0 - Select Operator [SEL_234] (rows=101592102 width=235) - Output:["_col0","_col1","_col2","_col3"] - Group By Operator [GBY_233] (rows=101592102 width=239) - Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1 - <-Reducer 11 [SIMPLE_EDGE] - SHUFFLE [RS_65] - PartitionCols:_col0, _col1 - Group By Operator [GBY_64] (rows=101592102 width=239) - Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col4)","sum(_col5)","sum(_col6)"],keys:_col2, _col3 - Merge Join Operator [MERGEJOIN_189] (rows=101592102 width=233) - Conds:RS_198._col0=RS_61._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6"] - <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_198] - PartitionCols:_col0 - Select Operator [SEL_193] (rows=652 width=4) - Output:["_col0"] - Filter Operator [FIL_192] (rows=652 width=8) - predicate:(d_year = 2000) - TableScan [TS_0] (rows=73049 width=8) - default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year"] - <-Reducer 21 [SIMPLE_EDGE] - SHUFFLE [RS_61] - PartitionCols:_col0 - Select Operator [SEL_59] (rows=286549727 width=239) - Output:["_col0","_col1","_col2","_col3","_col4","_col5"] - Filter Operator [FIL_58] (rows=286549727 width=240) - predicate:_col8 is null - Merge Join Operator [MERGEJOIN_188] (rows=468719906 width=240) - Conds:RS_230._col2, _col3=RS_232._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"] - <-Map 20 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_230] - PartitionCols:_col2, _col3 - Select Operator [SEL_229] (rows=286549727 width=242) - Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] - Filter Operator [FIL_228] (rows=286549727 width=242) - predicate:((cs_sold_date_sk BETWEEN DynamicValue(RS_60_date_dim_d_date_sk_min) AND DynamicValue(RS_60_date_dim_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, DynamicValue(RS_60_date_dim_d_date_sk_bloom_filter))) and cs_sold_date_sk is not null) - TableScan [TS_50] (rows=287989836 width=242) - default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_order_number","cs_quantity","cs_wholesale_cost","cs_sales_price"] - <-Reducer 13 [BROADCAST_EDGE] vectorized - BROADCAST [RS_227] - Group By Operator [GBY_226] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] - <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized - SHUFFLE [RS_205] - Group By Operator [GBY_202] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] - Select Operator [SEL_199] (rows=652 width=4) - Output:["_col0"] - Please refer to the previous Select Operator [SEL_193] - <-Map 22 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_232] - PartitionCols:_col0, _col1 - Select Operator [SEL_231] (rows=28798881 width=8) - Output:["_col0","_col1"] - TableScan [TS_53] (rows=28798881 width=8) - default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["cr_item_sk","cr_order_number"] - <-Reducer 4 [SIMPLE_EDGE] - SHUFFLE [RS_68] - PartitionCols:_col1 - Filter Operator [FIL_45] (rows=4580227799 width=471) - predicate:CASE WHEN (_col7 is not null) THEN ((_col7 > 0L)) ELSE (false) END - Merge Join Operator [MERGEJOIN_190] (rows=9160455599 width=471) - Conds:RS_215._col1, _col0=RS_225._col1, _col0(Left Outer),Output:["_col0","_col1","_col2","_col3","_col4","_col7","_col8","_col9"] - <-Reducer 3 [ONE_TO_ONE_EDGE] vectorized - FORWARD [RS_215] - PartitionCols:_col1, _col0 - Select Operator [SEL_214] (rows=114214965 width=239) - Output:["_col0","_col1","_col2","_col3","_col4"] - Group By Operator [GBY_213] (rows=114214965 width=239) - Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1 - <-Reducer 2 [SIMPLE_EDGE] - SHUFFLE [RS_18] - PartitionCols:_col0, _col1 - Group By Operator [GBY_17] (rows=114214965 width=239) - Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col4)","sum(_col5)","sum(_col6)"],keys:_col3, _col2 - Merge Join Operator [MERGEJOIN_185] (rows=114214965 width=217) - Conds:RS_194._col0=RS_14._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6"] - <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_194] - PartitionCols:_col0 - Please refer to the previous Select Operator [SEL_193] - <-Reducer 15 [SIMPLE_EDGE] - SHUFFLE [RS_14] - PartitionCols:_col0 - Select Operator [SEL_12] (rows=319876350 width=233) - Output:["_col0","_col1","_col2","_col3","_col4","_col5"] - Filter Operator [FIL_11] (rows=319876350 width=235) - predicate:_col8 is null - Merge Join Operator [MERGEJOIN_184] (rows=883006376 width=235) - Conds:RS_210._col1, _col3=RS_212._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"] - <-Map 14 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_210] - PartitionCols:_col1, _col3 - Select Operator [SEL_209] (rows=550076554 width=233) - Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] - Filter Operator [FIL_208] (rows=550076554 width=233) - predicate:((ss_sold_date_sk BETWEEN DynamicValue(RS_13_date_dim_d_date_sk_min) AND DynamicValue(RS_13_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_13_date_dim_d_date_sk_bloom_filter))) and ss_sold_date_sk is not null) - TableScan [TS_3] (rows=575995635 width=233) - default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk","ss_ticket_number","ss_quantity","ss_wholesale_cost","ss_sales_price"] - <-Reducer 7 [BROADCAST_EDGE] vectorized - BROADCAST [RS_207] - Group By Operator [GBY_206] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] - <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized - SHUFFLE [RS_203] - Group By Operator [GBY_200] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] - Select Operator [SEL_195] (rows=652 width=4) - Output:["_col0"] - Please refer to the previous Select Operator [SEL_193] - <-Map 16 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_212] - PartitionCols:_col0, _col1 - Select Operator [SEL_211] (rows=57591150 width=8) - Output:["_col0","_col1"] - TableScan [TS_6] (rows=57591150 width=8) - default@store_returns,store_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["sr_item_sk","sr_ticket_number"] - <-Reducer 9 [ONE_TO_ONE_EDGE] vectorized - FORWARD [RS_225] - PartitionCols:_col1, _col0 - Select Operator [SEL_224] (rows=40539971 width=239) - Output:["_col0","_col1","_col2","_col3","_col4"] - Group By Operator [GBY_223] (rows=40539971 width=239) + Merge Join Operator [MERGEJOIN_220] (rows=203549242538 width=703) + Conds:RS_69._col0, _col1=RS_266._col0, _col1(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8","_col11","_col12","_col13"] + <-Reducer 12 [ONE_TO_ONE_EDGE] vectorized + FORWARD [RS_266] + PartitionCols:_col0, _col1 + Filter Operator [FIL_265] (rows=13513323 width=239) + predicate:(_col2 > 0L) + Group By Operator [GBY_264] (rows=40539971 width=239) + Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1 + <-Reducer 11 [SIMPLE_EDGE] + SHUFFLE [RS_62] + PartitionCols:_col0, _col1 + Group By Operator [GBY_61] (rows=40539971 width=239) + Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col4)","sum(_col5)","sum(_col6)"],keys:_col2, _col3 + Merge Join Operator [MERGEJOIN_218] (rows=40539971 width=235) + Conds:RS_227._col0=RS_58._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_227] + PartitionCols:_col0 + Select Operator [SEL_222] (rows=652 width=4) + Output:["_col0"] + Filter Operator [FIL_221] (rows=652 width=8) + predicate:(d_year = 2000) + TableScan [TS_0] (rows=73049 width=8) + default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year"] + <-Reducer 21 [SIMPLE_EDGE] + SHUFFLE [RS_58] + PartitionCols:_col0 + Select Operator [SEL_56] (rows=113538342 width=239) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + Filter Operator [FIL_55] (rows=113538342 width=242) + predicate:_col8 is null + Merge Join Operator [MERGEJOIN_217] (rows=254644510 width=242) + Conds:RS_261._col1, _col3=RS_263._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"] + <-Map 20 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_261] + PartitionCols:_col1, _col3 + Select Operator [SEL_260] (rows=143930993 width=243) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] + Filter Operator [FIL_259] (rows=143930993 width=243) + predicate:((ws_sold_date_sk BETWEEN DynamicValue(RS_57_date_dim_d_date_sk_min) AND DynamicValue(RS_57_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_57_date_dim_d_date_sk_bloom_filter))) and ws_bill_customer_sk is not null and ws_sold_date_sk is not null) + TableScan [TS_47] (rows=144002668 width=243) + default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_customer_sk","ws_order_number","ws_quantity","ws_wholesale_cost","ws_sales_price"] + <-Reducer 13 [BROADCAST_EDGE] vectorized + BROADCAST [RS_258] + Group By Operator [GBY_257] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] + <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized + SHUFFLE [RS_234] + Group By Operator [GBY_231] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] + Select Operator [SEL_228] (rows=652 width=4) + Output:["_col0"] + Please refer to the previous Select Operator [SEL_222] + <-Map 22 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_263] + PartitionCols:_col0, _col1 + Select Operator [SEL_262] (rows=14398467 width=8) + Output:["_col0","_col1"] + TableScan [TS_50] (rows=14398467 width=8) + default@web_returns,web_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["wr_item_sk","wr_order_number"] + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_69] + PartitionCols:_col0, _col1 + Merge Join Operator [MERGEJOIN_219] (rows=7613716536 width=471) + Conds:RS_244._col1=RS_256._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col6","_col7","_col8"] + <-Reducer 3 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_244] + PartitionCols:_col1 + Select Operator [SEL_243] (rows=114214965 width=239) + Output:["_col0","_col1","_col2","_col3","_col4"] + Group By Operator [GBY_242] (rows=114214965 width=239) + Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1 + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_18] + PartitionCols:_col0, _col1 + Group By Operator [GBY_17] (rows=114214965 width=239) + Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col4)","sum(_col5)","sum(_col6)"],keys:_col3, _col2 + Merge Join Operator [MERGEJOIN_214] (rows=114214965 width=218) + Conds:RS_223._col0=RS_14._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_223] + PartitionCols:_col0 + Please refer to the previous Select Operator [SEL_222] + <-Reducer 15 [SIMPLE_EDGE] + SHUFFLE [RS_14] + PartitionCols:_col0 + Select Operator [SEL_12] (rows=319876350 width=233) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + Filter Operator [FIL_11] (rows=319876350 width=236) + predicate:_col8 is null + Merge Join Operator [MERGEJOIN_213] (rows=857669906 width=236) + Conds:RS_239._col1, _col3=RS_241._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"] + <-Map 14 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_239] + PartitionCols:_col1, _col3 + Select Operator [SEL_238] (rows=525327388 width=233) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] + Filter Operator [FIL_237] (rows=525327388 width=233) + predicate:((ss_sold_date_sk BETWEEN DynamicValue(RS_13_date_dim_d_date_sk_min) AND DynamicValue(RS_13_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_13_date_dim_d_date_sk_bloom_filter))) and ss_customer_sk is not null and ss_sold_date_sk is not null) + TableScan [TS_3] (rows=575995635 width=233) + default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk","ss_ticket_number","ss_quantity","ss_wholesale_cost","ss_sales_price"] + <-Reducer 7 [BROADCAST_EDGE] vectorized + BROADCAST [RS_236] + Group By Operator [GBY_235] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] + <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized + SHUFFLE [RS_232] + Group By Operator [GBY_229] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] + Select Operator [SEL_224] (rows=652 width=4) + Output:["_col0"] + Please refer to the previous Select Operator [SEL_222] + <-Map 16 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_241] + PartitionCols:_col0, _col1 + Select Operator [SEL_240] (rows=57591150 width=8) + Output:["_col0","_col1"] + TableScan [TS_6] (rows=57591150 width=8) + default@store_returns,store_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["sr_item_sk","sr_ticket_number"] + <-Reducer 9 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_256] + PartitionCols:_col0 + Select Operator [SEL_255] (rows=33694814 width=235) + Output:["_col0","_col1","_col2","_col3"] + Filter Operator [FIL_254] (rows=33694814 width=239) + predicate:(_col2 > 0L) + Select Operator [SEL_253] (rows=101084444 width=239) + Output:["_col1","_col2","_col3","_col4"] + Group By Operator [GBY_252] (rows=101084444 width=239) Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1 <-Reducer 8 [SIMPLE_EDGE] SHUFFLE [RS_39] PartitionCols:_col0, _col1 - Group By Operator [GBY_38] (rows=40539971 width=239) - Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col4)","sum(_col5)","sum(_col6)"],keys:_col3, _col2 - Merge Join Operator [MERGEJOIN_187] (rows=40539971 width=235) - Conds:RS_196._col0=RS_35._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6"] + Group By Operator [GBY_38] (rows=101084444 width=239) + Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col4)","sum(_col5)","sum(_col6)"],keys:_col2, _col3 + Merge Join Operator [MERGEJOIN_216] (rows=101084444 width=233) + Conds:RS_225._col0=RS_35._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6"] <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_196] + SHUFFLE [RS_225] PartitionCols:_col0 - Please refer to the previous Select Operator [SEL_193] + Please refer to the previous Select Operator [SEL_222] <-Reducer 18 [SIMPLE_EDGE] SHUFFLE [RS_35] PartitionCols:_col0 - Select Operator [SEL_33] (rows=113538342 width=239) + Select Operator [SEL_33] (rows=285117831 width=239) Output:["_col0","_col1","_col2","_col3","_col4","_col5"] - Filter Operator [FIL_32] (rows=113538342 width=242) + Filter Operator [FIL_32] (rows=285117831 width=240) predicate:_col8 is null - Merge Join Operator [MERGEJOIN_186] (rows=254679677 width=242) - Conds:RS_220._col1, _col3=RS_222._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"] + Merge Join Operator [MERGEJOIN_215] (rows=466377701 width=240) + Conds:RS_249._col2, _col3=RS_251._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"] <-Map 17 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_220] - PartitionCols:_col1, _col3 - Select Operator [SEL_219] (rows=143966864 width=243) + SHUFFLE [RS_249] + PartitionCols:_col2, _col3 + Select Operator [SEL_248] (rows=285117831 width=242) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] - Filter Operator [FIL_218] (rows=143966864 width=243) - predicate:((ws_sold_date_sk BETWEEN DynamicValue(RS_34_date_dim_d_date_sk_min) AND DynamicValue(RS_34_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_34_date_dim_d_date_sk_bloom_filter))) and ws_sold_date_sk is not null) - TableScan [TS_24] (rows=144002668 width=243) - default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_customer_sk","ws_order_number","ws_quantity","ws_wholesale_cost","ws_sales_price"] + Filter Operator [FIL_247] (rows=285117831 width=242) + predicate:((cs_sold_date_sk BETWEEN DynamicValue(RS_34_date_dim_d_date_sk_min) AND DynamicValue(RS_34_date_dim_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, DynamicValue(RS_34_date_dim_d_date_sk_bloom_filter))) and cs_bill_customer_sk is not null and cs_sold_date_sk is not null) + TableScan [TS_24] (rows=287989836 width=242) + default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_order_number","cs_quantity","cs_wholesale_cost","cs_sales_price"] <-Reducer 10 [BROADCAST_EDGE] vectorized - BROADCAST [RS_217] - Group By Operator [GBY_216] (rows=1 width=12) + BROADCAST [RS_246] + Group By Operator [GBY_245] (rows=1 width=12) Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized - SHUFFLE [RS_204] - Group By Operator [GBY_201] (rows=1 width=12) + SHUFFLE [RS_233] + Group By Operator [GBY_230] (rows=1 width=12) Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] - Select Operator [SEL_197] (rows=652 width=4) + Select Operator [SEL_226] (rows=652 width=4) Output:["_col0"] - Please refer to the previous Select Operator [SEL_193] + Please refer to the previous Select Operator [SEL_222] <-Map 19 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_222] + SHUFFLE [RS_251] PartitionCols:_col0, _col1 - Select Operator [SEL_221] (rows=14398467 width=8) + Select Operator [SEL_250] (rows=28798881 width=8) Output:["_col0","_col1"] - TableScan [TS_27] (rows=14398467 width=8) - default@web_returns,web_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["wr_item_sk","wr_order_number"] + TableScan [TS_27] (rows=28798881 width=8) + default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["cr_item_sk","cr_order_number"] diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query85.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query85.q.out index aeb33836cd..0bb5025bce 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query85.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query85.q.out @@ -301,7 +301,7 @@ Stage-0 Select Operator [SEL_187] (rows=143931136 width=39) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"] Filter Operator [FIL_186] (rows=143931136 width=243) - predicate:(((ws_net_profit >= 100) or (ws_net_profit <= 200) or ws_net_profit is not null or (ws_net_profit <= 300) or (ws_net_profit <= 250)) and ((ws_sales_price >= 100) or (ws_sales_price <= 150) or ws_sales_price is not null or (ws_sales_price <= 200)) and (ws_sold_date_sk BETWEEN DynamicValue(RS_31_date_dim_d_date_sk_min) AND DynamicValue(RS_31_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_31_date_dim_d_date_sk_bloom_filter))) and ws_sold_date_sk is not null and ws_web_page_sk is not null) + predicate:(((ws_net_profit >= 100) or (ws_net_profit <= 200) or (ws_net_profit >= 150) or (ws_net_profit <= 300) or (ws_net_profit >= 50) or (ws_net_profit <= 250)) and ((ws_sales_price >= 100) or (ws_sales_price <= 150) or (ws_sales_price >= 50) or (ws_sales_price <= 100) or (ws_sales_price >= 150) or (ws_sales_price <= 200)) and (ws_sold_date_sk BETWEEN DynamicValue(RS_31_date_dim_d_date_sk_min) AND DynamicValue(RS_31_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_31_date_dim_d_date_sk_bloom_filter))) and ws_sold_date_sk is not null and ws_web_page_sk is not null) TableScan [TS_0] (rows=144002668 width=243) default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_item_sk","ws_web_page_sk","ws_order_number","ws_quantity","ws_sales_price","ws_net_profit"] <-Reducer 8 [BROADCAST_EDGE] vectorized diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query86.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query86.q.out index 638cce1b46..ec4358f82a 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query86.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query86.q.out @@ -82,12 +82,12 @@ Stage-0 Select Operator [SEL_78] (rows=3060 width=490) Output:["_col0","_col1","_col2","_col3","_col4","_col5"] PTF Operator [PTF_77] (rows=3060 width=302) - Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 DESC NULLS LAST","partition by:":"(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END"}] + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 DESC NULLS LAST","partition by:":"(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END"}] Select Operator [SEL_76] (rows=3060 width=302) Output:["_col0","_col1","_col2","_col3"] <-Reducer 4 [SIMPLE_EDGE] vectorized SHUFFLE [RS_75] - PartitionCols:(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END + PartitionCols:(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END Select Operator [SEL_74] (rows=3060 width=302) Output:["_col0","_col1","_col2","_col3"] Group By Operator [GBY_73] (rows=3060 width=302) diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query88.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query88.q.out index 64919cafe7..ff05345222 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query88.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query88.q.out @@ -320,7 +320,7 @@ Stage-0 Select Operator [SEL_660] (rows=817 width=4) Output:["_col0"] Filter Operator [FIL_659] (rows=817 width=12) - predicate:((((hd_dep_count = 3) and hd_vehicle_count is not null) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and (hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5)) + 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_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (hd_dep_count) IN (3, 0, 1)) TableScan [TS_3] (rows=7200 width=12) default@household_demographics,household_demographics,Tbl:COMPLETE,Col:COMPLETE,Output:["hd_demo_sk","hd_dep_count","hd_vehicle_count"] <-Map 56 [SIMPLE_EDGE] vectorized diff --git ql/src/test/results/clientpositive/perf/tez/constraints/query89.q.out ql/src/test/results/clientpositive/perf/tez/constraints/query89.q.out index 3049fec95c..387a7e19ca 100644 --- ql/src/test/results/clientpositive/perf/tez/constraints/query89.q.out +++ ql/src/test/results/clientpositive/perf/tez/constraints/query89.q.out @@ -89,7 +89,7 @@ Stage-0 Select Operator [SEL_106] (rows=4804228 width=801) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"] Filter Operator [FIL_105] (rows=4804228 width=689) - predicate:CASE WHEN ((avg_window_0 <> 0)) THEN (((abs((_col6 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (null) END + predicate:CASE WHEN ((avg_window_0 <> 0)) THEN (((abs((_col6 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (false) END Select Operator [SEL_104] (rows=9608456 width=577) Output:["avg_window_0","_col0","_col1","_col2","_col3","_col4","_col5","_col6"] PTF Operator [PTF_103] (rows=9608456 width=577) diff --git ql/src/test/results/clientpositive/perf/tez/query11.q.out ql/src/test/results/clientpositive/perf/tez/query11.q.out index da1c349ff0..d3e2311bef 100644 --- ql/src/test/results/clientpositive/perf/tez/query11.q.out +++ ql/src/test/results/clientpositive/perf/tez/query11.q.out @@ -199,7 +199,7 @@ Stage-0 Select Operator [SEL_92] (rows=12248093 width=85) Output:["_col0"] Filter Operator [FIL_91] (rows=12248093 width=537) - predicate:CASE WHEN (_col3 is not null) THEN (CASE WHEN (_col6) THEN (((_col1 / _col5) > (_col9 / _col3))) ELSE ((null > (_col9 / _col3))) END) ELSE (CASE WHEN (_col6) THEN (((_col1 / _col5) > null)) ELSE (null) END) END + predicate:CASE WHEN (_col3 is not null) THEN (CASE WHEN (_col6) THEN (((_col1 / _col5) > (_col9 / _col3))) ELSE (null) END) ELSE (null) END Merge Join Operator [MERGEJOIN_287] (rows=24496186 width=537) Conds:RS_88._col2=RS_351._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col8","_col9"] <-Reducer 20 [SIMPLE_EDGE] vectorized diff --git ql/src/test/results/clientpositive/perf/tez/query13.q.out ql/src/test/results/clientpositive/perf/tez/query13.q.out index 60a73d7250..8344aa05d9 100644 --- ql/src/test/results/clientpositive/perf/tez/query13.q.out +++ ql/src/test/results/clientpositive/perf/tez/query13.q.out @@ -215,7 +215,7 @@ Stage-0 Select Operator [SEL_131] (rows=457561292 width=260) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13"] Filter Operator [FIL_130] (rows=457561292 width=450) - predicate:(((ss_net_profit >= 100) or (ss_net_profit <= 200) or ss_net_profit is not null or (ss_net_profit <= 300) or (ss_net_profit <= 250)) and ((ss_sales_price >= 100) or (ss_sales_price <= 150) or ss_sales_price is not null or (ss_sales_price <= 200)) and (ss_sold_date_sk BETWEEN DynamicValue(RS_19_date_dim_d_date_sk_min) AND DynamicValue(RS_19_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_19_date_dim_d_date_sk_bloom_filter))) and ss_addr_sk is not null and ss_cdemo_sk is not null and ss_hdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) + predicate:(((ss_net_profit >= 100) or (ss_net_profit <= 200) or (ss_net_profit >= 150) or (ss_net_profit <= 300) or (ss_net_profit >= 50) or (ss_net_profit <= 250)) and ((ss_sales_price >= 100) or (ss_sales_price <= 150) or (ss_sales_price >= 50) or (ss_sales_price <= 100) or (ss_sales_price >= 150) or (ss_sales_price <= 200)) and (ss_sold_date_sk BETWEEN DynamicValue(RS_19_date_dim_d_date_sk_min) AND DynamicValue(RS_19_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_19_date_dim_d_date_sk_bloom_filter))) and ss_addr_sk is not null and ss_cdemo_sk is not null and ss_hdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) TableScan [TS_0] (rows=575995635 width=450) default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_cdemo_sk","ss_hdemo_sk","ss_addr_sk","ss_store_sk","ss_quantity","ss_sales_price","ss_ext_sales_price","ss_ext_wholesale_cost","ss_net_profit"] <-Reducer 9 [BROADCAST_EDGE] vectorized diff --git ql/src/test/results/clientpositive/perf/tez/query31.q.out ql/src/test/results/clientpositive/perf/tez/query31.q.out index c0762b7bd4..579d5695c1 100644 --- ql/src/test/results/clientpositive/perf/tez/query31.q.out +++ ql/src/test/results/clientpositive/perf/tez/query31.q.out @@ -158,7 +158,7 @@ Stage-0 Select Operator [SEL_138] (rows=110 width=550) Output:["_col0","_col1","_col2","_col3","_col4","_col5"] Filter Operator [FIL_136] (rows=110 width=778) - predicate:(CASE WHEN ((_col11 > 0)) THEN (CASE WHEN (_col2) THEN (((_col6 / _col1) > (_col9 / _col11))) ELSE ((null > (_col9 / _col11))) END) ELSE (CASE WHEN (_col2) THEN (((_col6 / _col1) > null)) ELSE (null) END) END and CASE WHEN ((_col9 > 0)) THEN (CASE WHEN (_col7) THEN (((_col4 / _col6) > (_col13 / _col9))) ELSE ((null > (_col13 / _col9))) END) ELSE (CASE WHEN (_col7) THEN (((_col4 / _col6) > null)) ELSE (null) END) END) + predicate:(CASE WHEN ((_col11 > 0)) THEN (CASE WHEN (_col2) THEN (((_col6 / _col1) > (_col9 / _col11))) ELSE (null) END) ELSE (null) END and CASE WHEN ((_col9 > 0)) THEN (CASE WHEN (_col7) THEN (((_col4 / _col6) > (_col13 / _col9))) ELSE (null) END) ELSE (null) END) Merge Join Operator [MERGEJOIN_450] (rows=440 width=778) Conds:RS_133._col0=RS_134._col0(Inner),Output:["_col1","_col2","_col4","_col6","_col7","_col8","_col9","_col11","_col13"] <-Reducer 22 [ONE_TO_ONE_EDGE] diff --git ql/src/test/results/clientpositive/perf/tez/query36.q.out ql/src/test/results/clientpositive/perf/tez/query36.q.out index 064837a3cf..d031995372 100644 --- ql/src/test/results/clientpositive/perf/tez/query36.q.out +++ ql/src/test/results/clientpositive/perf/tez/query36.q.out @@ -93,12 +93,12 @@ Stage-0 Select Operator [SEL_105] (rows=3060 width=490) Output:["_col0","_col1","_col2","_col3","_col4","_col5"] PTF Operator [PTF_104] (rows=3060 width=414) - Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(_col2 / _col3) ASC NULLS FIRST","partition by:":"(grouping(_col4, 1) + grouping(_col4, 0)), CASE WHEN ((grouping(_col4, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END"}] + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"(_col2 / _col3) ASC NULLS FIRST","partition by:":"(grouping(_col4, 1) + grouping(_col4, 0)), CASE WHEN ((grouping(_col4, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END"}] Select Operator [SEL_103] (rows=3060 width=414) Output:["_col0","_col1","_col2","_col3","_col4"] <-Reducer 5 [SIMPLE_EDGE] vectorized SHUFFLE [RS_102] - PartitionCols:(grouping(_col4, 1) + grouping(_col4, 0)), CASE WHEN ((grouping(_col4, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END + PartitionCols:(grouping(_col4, 1) + grouping(_col4, 0)), CASE WHEN ((grouping(_col4, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END Select Operator [SEL_101] (rows=3060 width=414) Output:["_col0","_col1","_col2","_col3","_col4"] Group By Operator [GBY_100] (rows=3060 width=414) diff --git ql/src/test/results/clientpositive/perf/tez/query4.q.out ql/src/test/results/clientpositive/perf/tez/query4.q.out index bb0d7ba3f5..1fda50b68a 100644 --- ql/src/test/results/clientpositive/perf/tez/query4.q.out +++ ql/src/test/results/clientpositive/perf/tez/query4.q.out @@ -281,7 +281,7 @@ Stage-0 Select Operator [SEL_140] (rows=7323197 width=85) Output:["_col0"] Filter Operator [FIL_139] (rows=7323197 width=537) - predicate:CASE WHEN (_col3 is not null) THEN (CASE WHEN (_col9) THEN (((_col11 / _col8) > (_col14 / _col3))) ELSE ((null > (_col14 / _col3))) END) ELSE (CASE WHEN (_col9) THEN (((_col11 / _col8) > null)) ELSE (null) END) END + predicate:CASE WHEN (_col3 is not null) THEN (CASE WHEN (_col9) THEN (((_col11 / _col8) > (_col14 / _col3))) ELSE (null) END) ELSE (null) END Merge Join Operator [MERGEJOIN_472] (rows=14646395 width=537) Conds:RS_136._col2=RS_554._col0(Inner),Output:["_col3","_col8","_col9","_col11","_col13","_col14"] <-Reducer 30 [SIMPLE_EDGE] vectorized @@ -345,7 +345,7 @@ Stage-0 FORWARD [RS_136] PartitionCols:_col2 Filter Operator [FIL_135] (rows=12248093 width=668) - predicate:CASE WHEN (_col6) THEN (CASE WHEN (_col9) THEN (((_col11 / _col8) > (_col1 / _col5))) ELSE ((null > (_col1 / _col5))) END) ELSE (CASE WHEN (_col9) THEN (((_col11 / _col8) > null)) ELSE (null) END) END + predicate:CASE WHEN (_col6) THEN (CASE WHEN (_col9) THEN (((_col11 / _col8) > (_col1 / _col5))) ELSE (null) END) ELSE (null) END Merge Join Operator [MERGEJOIN_471] (rows=24496186 width=668) Conds:RS_132._col2=RS_548._col0(Inner),Output:["_col1","_col2","_col3","_col5","_col6","_col8","_col9","_col11"] <-Reducer 26 [SIMPLE_EDGE] vectorized diff --git ql/src/test/results/clientpositive/perf/tez/query45.q.out ql/src/test/results/clientpositive/perf/tez/query45.q.out index c2f9374c4b..19d74d98b7 100644 --- ql/src/test/results/clientpositive/perf/tez/query45.q.out +++ ql/src/test/results/clientpositive/perf/tez/query45.q.out @@ -52,15 +52,15 @@ POSTHOOK: Output: hdfs://### HDFS PATH ### Plan optimized by CBO. Vertex dependency in root stage -Map 13 <- Reducer 16 (BROADCAST_EDGE) -Reducer 10 <- Reducer 14 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE) +Map 12 <- Reducer 15 (BROADCAST_EDGE) +Reducer 10 <- Reducer 13 (SIMPLE_EDGE), Reducer 9 (SIMPLE_EDGE) Reducer 11 <- Map 8 (SIMPLE_EDGE) -Reducer 12 <- Map 8 (CUSTOM_SIMPLE_EDGE) -Reducer 14 <- Map 13 (SIMPLE_EDGE), Map 15 (SIMPLE_EDGE) -Reducer 16 <- Map 15 (CUSTOM_SIMPLE_EDGE) +Reducer 13 <- Map 12 (SIMPLE_EDGE), Map 14 (SIMPLE_EDGE) +Reducer 15 <- Map 14 (CUSTOM_SIMPLE_EDGE) +Reducer 17 <- Map 16 (CUSTOM_SIMPLE_EDGE) Reducer 2 <- Map 1 (SIMPLE_EDGE), Map 7 (SIMPLE_EDGE) Reducer 3 <- Reducer 10 (SIMPLE_EDGE), Reducer 2 (SIMPLE_EDGE) -Reducer 4 <- Reducer 12 (CUSTOM_SIMPLE_EDGE), Reducer 3 (CUSTOM_SIMPLE_EDGE) +Reducer 4 <- Reducer 17 (CUSTOM_SIMPLE_EDGE), Reducer 3 (CUSTOM_SIMPLE_EDGE) Reducer 5 <- Reducer 4 (SIMPLE_EDGE) Reducer 6 <- Reducer 5 (SIMPLE_EDGE) Reducer 9 <- Map 8 (SIMPLE_EDGE), Reducer 11 (ONE_TO_ONE_EDGE) @@ -82,101 +82,101 @@ Stage-0 <-Reducer 4 [SIMPLE_EDGE] SHUFFLE [RS_53] PartitionCols:_col0, _col1 - Group By Operator [GBY_52] (rows=4858260 width=299) + Group By Operator [GBY_52] (rows=3715140 width=299) Output:["_col0","_col1","_col2"],aggregations:["sum(_col3)"],keys:_col8, _col7 - Top N Key Operator [TNK_82] (rows=10246864 width=418) + Top N Key Operator [TNK_82] (rows=10246864 width=310) keys:_col8, _col7,sort order:++,top n:100 - Select Operator [SEL_51] (rows=10246864 width=418) + Select Operator [SEL_51] (rows=10246864 width=310) Output:["_col3","_col7","_col8"] - Filter Operator [FIL_50] (rows=10246864 width=418) - predicate:((substr(_col8, 1, 5)) IN ('85669', '86197', '88274', '83405', '86475', '85392', '85460', '80348', '81792') or CASE WHEN ((_col14 = 0L)) THEN (false) WHEN (_col17 is not null) THEN (true) WHEN (_col13 is null) THEN (null) WHEN ((_col15 < _col14)) THEN (null) ELSE (false) END) - Select Operator [SEL_49] (rows=10246864 width=418) - Output:["_col3","_col7","_col8","_col13","_col14","_col15","_col17"] - Merge Join Operator [MERGEJOIN_133] (rows=10246864 width=418) - Conds:(Inner),Output:["_col3","_col4","_col6","_col8","_col12","_col16","_col17"] - <-Reducer 12 [CUSTOM_SIMPLE_EDGE] vectorized + Filter Operator [FIL_50] (rows=10246864 width=310) + predicate:(((_col14 <> 0L) and _col16 is not null) or (substr(_col8, 1, 5)) IN ('85669', '86197', '88274', '83405', '86475', '85392', '85460', '80348', '81792')) + Select Operator [SEL_49] (rows=10246864 width=310) + Output:["_col3","_col7","_col8","_col14","_col16"] + Merge Join Operator [MERGEJOIN_133] (rows=10246864 width=310) + Conds:(Inner),Output:["_col3","_col4","_col8","_col12","_col16"] + <-Reducer 17 [CUSTOM_SIMPLE_EDGE] vectorized PARTITION_ONLY_SHUFFLE [RS_166] - Group By Operator [GBY_165] (rows=1 width=16) - Output:["_col0","_col1"],aggregations:["count(VALUE._col0)","count(VALUE._col1)"] - <-Map 8 [CUSTOM_SIMPLE_EDGE] vectorized - SHUFFLE [RS_150] - Group By Operator [GBY_148] (rows=1 width=16) - Output:["_col0","_col1"],aggregations:["count()","count(i_item_id)"] - Select Operator [SEL_145] (rows=11 width=104) - Output:["i_item_id"] - Filter Operator [FIL_142] (rows=11 width=104) + Group By Operator [GBY_165] (rows=1 width=8) + Output:["_col0"],aggregations:["count(VALUE._col0)"] + <-Map 16 [CUSTOM_SIMPLE_EDGE] vectorized + PARTITION_ONLY_SHUFFLE [RS_164] + Group By Operator [GBY_163] (rows=1 width=8) + Output:["_col0"],aggregations:["count()"] + Select Operator [SEL_162] (rows=11 width=4) + Filter Operator [FIL_161] (rows=11 width=4) predicate:(i_item_sk) IN (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) - TableScan [TS_6] (rows=462000 width=104) - default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_item_id"] + TableScan [TS_33] (rows=462000 width=4) + default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk"] <-Reducer 3 [CUSTOM_SIMPLE_EDGE] PARTITION_ONLY_SHUFFLE [RS_46] - Merge Join Operator [MERGEJOIN_132] (rows=10246864 width=402) - Conds:RS_43._col0=RS_44._col6(Inner),Output:["_col3","_col4","_col6","_col8","_col12"] + Merge Join Operator [MERGEJOIN_132] (rows=10246864 width=302) + Conds:RS_43._col0=RS_44._col6(Inner),Output:["_col3","_col4","_col8","_col12"] <-Reducer 10 [SIMPLE_EDGE] SHUFFLE [RS_44] PartitionCols:_col6 - Merge Join Operator [MERGEJOIN_131] (rows=10246864 width=219) - Conds:RS_29._col0=RS_30._col1(Inner),Output:["_col1","_col3","_col6","_col7"] - <-Reducer 14 [SIMPLE_EDGE] + Merge Join Operator [MERGEJOIN_131] (rows=10246864 width=119) + Conds:RS_29._col0=RS_30._col1(Inner),Output:["_col3","_col6","_col7"] + <-Reducer 13 [SIMPLE_EDGE] SHUFFLE [RS_30] PartitionCols:_col1 Merge Join Operator [MERGEJOIN_130] (rows=10246864 width=119) - Conds:RS_164._col0=RS_156._col0(Inner),Output:["_col1","_col2","_col3"] - <-Map 15 [SIMPLE_EDGE] vectorized - PARTITION_ONLY_SHUFFLE [RS_156] + Conds:RS_160._col0=RS_152._col0(Inner),Output:["_col1","_col2","_col3"] + <-Map 14 [SIMPLE_EDGE] vectorized + PARTITION_ONLY_SHUFFLE [RS_152] PartitionCols:_col0 - Select Operator [SEL_155] (rows=130 width=12) + Select Operator [SEL_151] (rows=130 width=12) Output:["_col0"] - Filter Operator [FIL_154] (rows=130 width=12) + Filter Operator [FIL_150] (rows=130 width=12) predicate:((d_qoy = 2) and (d_year = 2000) and d_date_sk is not null) TableScan [TS_19] (rows=73049 width=12) default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year","d_qoy"] - <-Map 13 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_164] + <-Map 12 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_160] PartitionCols:_col0 - Select Operator [SEL_163] (rows=143930993 width=123) + Select Operator [SEL_159] (rows=143930993 width=123) Output:["_col0","_col1","_col2","_col3"] - Filter Operator [FIL_162] (rows=143930993 width=123) + Filter Operator [FIL_158] (rows=143930993 width=123) predicate:((ws_sold_date_sk BETWEEN DynamicValue(RS_23_date_dim_d_date_sk_min) AND DynamicValue(RS_23_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_23_date_dim_d_date_sk_bloom_filter))) and ws_bill_customer_sk is not null and ws_item_sk is not null and ws_sold_date_sk is not null) TableScan [TS_16] (rows=144002668 width=123) default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_customer_sk","ws_sales_price"] - <-Reducer 16 [BROADCAST_EDGE] vectorized - BROADCAST [RS_161] - Group By Operator [GBY_160] (rows=1 width=12) + <-Reducer 15 [BROADCAST_EDGE] vectorized + BROADCAST [RS_157] + Group By Operator [GBY_156] (rows=1 width=12) Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] - <-Map 15 [CUSTOM_SIMPLE_EDGE] vectorized - PARTITION_ONLY_SHUFFLE [RS_159] - Group By Operator [GBY_158] (rows=1 width=12) + <-Map 14 [CUSTOM_SIMPLE_EDGE] vectorized + PARTITION_ONLY_SHUFFLE [RS_155] + Group By Operator [GBY_154] (rows=1 width=12) Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] - Select Operator [SEL_157] (rows=130 width=4) + Select Operator [SEL_153] (rows=130 width=4) Output:["_col0"] - Please refer to the previous Select Operator [SEL_155] + Please refer to the previous Select Operator [SEL_151] <-Reducer 9 [SIMPLE_EDGE] SHUFFLE [RS_29] PartitionCols:_col0 - Merge Join Operator [MERGEJOIN_129] (rows=462007 width=104) - Conds:RS_146._col1=RS_153._col0(Left Outer),Output:["_col0","_col1","_col3"] + Merge Join Operator [MERGEJOIN_129] (rows=462007 width=4) + Conds:RS_144._col1=RS_149._col0(Left Outer),Output:["_col0","_col3"] <-Map 8 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_146] + SHUFFLE [RS_144] PartitionCols:_col1 - Select Operator [SEL_143] (rows=462000 width=104) + Select Operator [SEL_142] (rows=462000 width=104) Output:["_col0","_col1"] Filter Operator [FIL_140] (rows=462000 width=104) predicate:i_item_sk is not null - Please refer to the previous TableScan [TS_6] + TableScan [TS_6] (rows=462000 width=104) + default@item,item,Tbl:COMPLETE,Col:COMPLETE,Output:["i_item_sk","i_item_id"] <-Reducer 11 [ONE_TO_ONE_EDGE] vectorized - FORWARD [RS_153] + FORWARD [RS_149] PartitionCols:_col0 - Select Operator [SEL_152] (rows=5 width=104) + Select Operator [SEL_148] (rows=5 width=104) Output:["_col0","_col1"] - Group By Operator [GBY_151] (rows=5 width=100) + Group By Operator [GBY_147] (rows=5 width=100) Output:["_col0"],keys:KEY._col0 <-Map 8 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_149] + SHUFFLE [RS_146] PartitionCols:_col0 - Group By Operator [GBY_147] (rows=5 width=100) + Group By Operator [GBY_145] (rows=5 width=100) Output:["_col0"],keys:i_item_id - Select Operator [SEL_144] (rows=11 width=104) + Select Operator [SEL_143] (rows=11 width=104) Output:["i_item_id"] Filter Operator [FIL_141] (rows=11 width=104) predicate:(i_item_sk) IN (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) diff --git ql/src/test/results/clientpositive/perf/tez/query48.q.out ql/src/test/results/clientpositive/perf/tez/query48.q.out index d64eec1c74..980b69906f 100644 --- ql/src/test/results/clientpositive/perf/tez/query48.q.out +++ ql/src/test/results/clientpositive/perf/tez/query48.q.out @@ -224,7 +224,7 @@ Stage-0 Select Operator [SEL_106] (rows=159705893 width=31) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"] Filter Operator [FIL_105] (rows=159705893 width=233) - predicate:(((ss_net_profit >= 0) or (ss_net_profit <= 2000) or ss_net_profit is not null or (ss_net_profit <= 3000) or (ss_net_profit <= 25000)) and ((ss_sales_price >= 100) or (ss_sales_price <= 150) or ss_sales_price is not null or (ss_sales_price <= 200)) and (ss_sales_price BETWEEN 100 AND 150 or ss_sales_price BETWEEN 50 AND 100 or ss_sales_price BETWEEN 150 AND 200) and (ss_sold_date_sk BETWEEN DynamicValue(RS_16_date_dim_d_date_sk_min) AND DynamicValue(RS_16_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_16_date_dim_d_date_sk_bloom_filter))) and ss_addr_sk is not null and ss_cdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) + predicate:(((ss_net_profit >= 0) or (ss_net_profit <= 2000) or (ss_net_profit >= 150) or (ss_net_profit <= 3000) or (ss_net_profit >= 50) or (ss_net_profit <= 25000)) and ((ss_sales_price >= 100) or (ss_sales_price <= 150) or (ss_sales_price >= 50) or (ss_sales_price <= 100) or (ss_sales_price >= 150) or (ss_sales_price <= 200)) and (ss_sales_price BETWEEN 100 AND 150 or ss_sales_price BETWEEN 50 AND 100 or ss_sales_price BETWEEN 150 AND 200) and (ss_sold_date_sk BETWEEN DynamicValue(RS_16_date_dim_d_date_sk_min) AND DynamicValue(RS_16_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_16_date_dim_d_date_sk_bloom_filter))) and ss_addr_sk is not null and ss_cdemo_sk is not null and ss_sold_date_sk is not null and ss_store_sk is not null) TableScan [TS_0] (rows=575995635 width=233) default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_cdemo_sk","ss_addr_sk","ss_store_sk","ss_quantity","ss_sales_price","ss_net_profit"] <-Reducer 8 [BROADCAST_EDGE] vectorized diff --git ql/src/test/results/clientpositive/perf/tez/query53.q.out ql/src/test/results/clientpositive/perf/tez/query53.q.out index e9153f3a06..6cd8a7dd2d 100644 --- ql/src/test/results/clientpositive/perf/tez/query53.q.out +++ ql/src/test/results/clientpositive/perf/tez/query53.q.out @@ -88,7 +88,7 @@ Stage-0 Select Operator [SEL_30] (rows=25 width=228) Output:["_col0","_col1","_col2"] Filter Operator [FIL_46] (rows=25 width=228) - predicate:CASE WHEN ((avg_window_0 > 0)) THEN (((abs((_col2 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (null) END + predicate:CASE WHEN ((avg_window_0 > 0)) THEN (((abs((_col2 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (false) END Select Operator [SEL_29] (rows=50 width=116) Output:["avg_window_0","_col0","_col2"] PTF Operator [PTF_28] (rows=50 width=116) diff --git ql/src/test/results/clientpositive/perf/tez/query63.q.out ql/src/test/results/clientpositive/perf/tez/query63.q.out index 0bdd48b728..2627d805e3 100644 --- ql/src/test/results/clientpositive/perf/tez/query63.q.out +++ ql/src/test/results/clientpositive/perf/tez/query63.q.out @@ -90,7 +90,7 @@ Stage-0 Select Operator [SEL_30] (rows=65 width=228) Output:["_col0","_col1","_col2"] Filter Operator [FIL_46] (rows=65 width=228) - predicate:CASE WHEN ((avg_window_0 > 0)) THEN (((abs((_col2 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (null) END + predicate:CASE WHEN ((avg_window_0 > 0)) THEN (((abs((_col2 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (false) END Select Operator [SEL_29] (rows=130 width=116) Output:["avg_window_0","_col0","_col2"] PTF Operator [PTF_28] (rows=130 width=116) diff --git ql/src/test/results/clientpositive/perf/tez/query70.q.out ql/src/test/results/clientpositive/perf/tez/query70.q.out index 8d9d06dd48..0d63d99f5f 100644 --- ql/src/test/results/clientpositive/perf/tez/query70.q.out +++ ql/src/test/results/clientpositive/perf/tez/query70.q.out @@ -110,12 +110,12 @@ Stage-0 Select Operator [SEL_165] (rows=720 width=492) Output:["_col0","_col1","_col2","_col3","_col4","_col5"] PTF Operator [PTF_164] (rows=720 width=304) - Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 DESC NULLS LAST","partition by:":"(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END"}] + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 DESC NULLS LAST","partition by:":"(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END"}] Select Operator [SEL_163] (rows=720 width=304) Output:["_col0","_col1","_col2","_col3"] <-Reducer 5 [SIMPLE_EDGE] vectorized SHUFFLE [RS_162] - PartitionCols:(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END + PartitionCols:(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END Select Operator [SEL_161] (rows=720 width=304) Output:["_col0","_col1","_col2","_col3"] Group By Operator [GBY_160] (rows=720 width=304) diff --git ql/src/test/results/clientpositive/perf/tez/query74.q.out ql/src/test/results/clientpositive/perf/tez/query74.q.out index 20aade2974..fd0ed306d0 100644 --- ql/src/test/results/clientpositive/perf/tez/query74.q.out +++ ql/src/test/results/clientpositive/perf/tez/query74.q.out @@ -171,7 +171,7 @@ Stage-0 Select Operator [SEL_92] (rows=12248093 width=280) Output:["_col0","_col1","_col2"] Filter Operator [FIL_91] (rows=12248093 width=732) - predicate:CASE WHEN (_col3 is not null) THEN (CASE WHEN (_col6) THEN (((_col1 / _col5) > (_col10 / _col3))) ELSE ((null > (_col10 / _col3))) END) ELSE (CASE WHEN (_col6) THEN (((_col1 / _col5) > null)) ELSE (null) END) END + predicate:CASE WHEN (_col3 is not null) THEN (CASE WHEN (_col6) THEN (((_col1 / _col5) > (_col10 / _col3))) ELSE (null) END) ELSE (null) END Merge Join Operator [MERGEJOIN_287] (rows=24496186 width=732) Conds:RS_88._col2=RS_350._col0(Inner),Output:["_col1","_col3","_col5","_col6","_col7","_col8","_col9","_col10"] <-Reducer 20 [SIMPLE_EDGE] vectorized diff --git ql/src/test/results/clientpositive/perf/tez/query78.q.out ql/src/test/results/clientpositive/perf/tez/query78.q.out index 3d938e1c8e..5ea991d8e8 100644 --- ql/src/test/results/clientpositive/perf/tez/query78.q.out +++ ql/src/test/results/clientpositive/perf/tez/query78.q.out @@ -155,191 +155,197 @@ Stage-0 limit:100 Stage-1 Reducer 6 vectorized - File Output Operator [FS_238] - Limit [LIM_237] (rows=100 width=484) + File Output Operator [FS_274] + Limit [LIM_273] (rows=100 width=484) Number of rows:100 - Select Operator [SEL_236] (rows=232433056973 width=483) + Select Operator [SEL_272] (rows=101774621265 width=483) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"] <-Reducer 5 [SIMPLE_EDGE] - SHUFFLE [RS_73] - Select Operator [SEL_72] (rows=232433056973 width=719) + SHUFFLE [RS_75] + Select Operator [SEL_74] (rows=101774621265 width=719) Output:["_col0","_col1","_col6","_col7","_col8","_col9","_col10","_col11","_col12"] - Filter Operator [FIL_71] (rows=232433056973 width=701) - predicate:CASE WHEN (_col11 is not null) THEN ((_col11 > 0L)) ELSE (false) END - Merge Join Operator [MERGEJOIN_191] (rows=464866113946 width=701) - Conds:RS_68._col1=RS_235._col0(Left Outer),Output:["_col0","_col1","_col2","_col3","_col4","_col7","_col8","_col9","_col11","_col12","_col13"] - <-Reducer 12 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_235] - PartitionCols:_col0 - Select Operator [SEL_234] (rows=50796051 width=235) - Output:["_col0","_col1","_col2","_col3"] - Group By Operator [GBY_233] (rows=50796051 width=239) - Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1 - <-Reducer 11 [SIMPLE_EDGE] - SHUFFLE [RS_65] - PartitionCols:_col0, _col1 - Group By Operator [GBY_64] (rows=50796051 width=239) - Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col4)","sum(_col5)","sum(_col6)"],keys:_col2, _col3 - Merge Join Operator [MERGEJOIN_189] (rows=50796051 width=233) - Conds:RS_198._col0=RS_61._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6"] - <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_198] - PartitionCols:_col0 - Select Operator [SEL_193] (rows=652 width=4) - Output:["_col0"] - Filter Operator [FIL_192] (rows=652 width=8) - predicate:((d_year = 2000) and d_date_sk is not null) - TableScan [TS_0] (rows=73049 width=8) - default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year"] - <-Reducer 21 [SIMPLE_EDGE] - SHUFFLE [RS_61] - PartitionCols:_col0 - Select Operator [SEL_59] (rows=143274863 width=239) - Output:["_col0","_col1","_col2","_col3","_col4","_col5"] - Filter Operator [FIL_58] (rows=143274863 width=240) - predicate:_col8 is null - Merge Join Operator [MERGEJOIN_188] (rows=234359952 width=240) - Conds:RS_230._col2, _col3=RS_232._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"] - <-Map 20 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_230] - PartitionCols:_col2, _col3 - Select Operator [SEL_229] (rows=143274863 width=242) - Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] - Filter Operator [FIL_228] (rows=143274863 width=242) - predicate:((cs_item_sk = cs_item_sk) and (cs_sold_date_sk BETWEEN DynamicValue(RS_60_date_dim_d_date_sk_min) AND DynamicValue(RS_60_date_dim_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, DynamicValue(RS_60_date_dim_d_date_sk_bloom_filter))) and cs_sold_date_sk is not null) - TableScan [TS_50] (rows=287989836 width=242) - default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_order_number","cs_quantity","cs_wholesale_cost","cs_sales_price"] - <-Reducer 13 [BROADCAST_EDGE] vectorized - BROADCAST [RS_227] - Group By Operator [GBY_226] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] - <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized - SHUFFLE [RS_205] - Group By Operator [GBY_202] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] - Select Operator [SEL_199] (rows=652 width=4) - Output:["_col0"] - Please refer to the previous Select Operator [SEL_193] - <-Map 22 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_232] - PartitionCols:_col0, _col1 - Select Operator [SEL_231] (rows=28798881 width=8) - Output:["_col0","_col1"] - TableScan [TS_53] (rows=28798881 width=8) - default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["cr_item_sk","cr_order_number"] - <-Reducer 4 [SIMPLE_EDGE] - SHUFFLE [RS_68] - PartitionCols:_col1 - Filter Operator [FIL_45] (rows=4580227799 width=471) - predicate:CASE WHEN (_col7 is not null) THEN ((_col7 > 0L)) ELSE (false) END - Merge Join Operator [MERGEJOIN_190] (rows=9160455599 width=471) - Conds:RS_215._col1, _col0=RS_225._col1, _col0(Left Outer),Output:["_col0","_col1","_col2","_col3","_col4","_col7","_col8","_col9"] - <-Reducer 3 [ONE_TO_ONE_EDGE] vectorized - FORWARD [RS_215] - PartitionCols:_col1, _col0 - Select Operator [SEL_214] (rows=114214965 width=239) - Output:["_col0","_col1","_col2","_col3","_col4"] - Group By Operator [GBY_213] (rows=114214965 width=239) - Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1 - <-Reducer 2 [SIMPLE_EDGE] - SHUFFLE [RS_18] - PartitionCols:_col0, _col1 - Group By Operator [GBY_17] (rows=114214965 width=239) - Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col4)","sum(_col5)","sum(_col6)"],keys:_col3, _col2 - Merge Join Operator [MERGEJOIN_185] (rows=114214965 width=217) - Conds:RS_194._col0=RS_14._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6"] - <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_194] - PartitionCols:_col0 - Please refer to the previous Select Operator [SEL_193] - <-Reducer 15 [SIMPLE_EDGE] - SHUFFLE [RS_14] - PartitionCols:_col0 - Select Operator [SEL_12] (rows=319876350 width=233) - Output:["_col0","_col1","_col2","_col3","_col4","_col5"] - Filter Operator [FIL_11] (rows=319876350 width=235) - predicate:_col8 is null - Merge Join Operator [MERGEJOIN_184] (rows=883006376 width=235) - Conds:RS_210._col1, _col3=RS_212._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"] - <-Map 14 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_210] - PartitionCols:_col1, _col3 - Select Operator [SEL_209] (rows=550076554 width=233) - Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] - Filter Operator [FIL_208] (rows=550076554 width=233) - predicate:((ss_sold_date_sk BETWEEN DynamicValue(RS_13_date_dim_d_date_sk_min) AND DynamicValue(RS_13_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_13_date_dim_d_date_sk_bloom_filter))) and ss_sold_date_sk is not null) - TableScan [TS_3] (rows=575995635 width=233) - default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk","ss_ticket_number","ss_quantity","ss_wholesale_cost","ss_sales_price"] - <-Reducer 7 [BROADCAST_EDGE] vectorized - BROADCAST [RS_207] - Group By Operator [GBY_206] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] - <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized - SHUFFLE [RS_203] - Group By Operator [GBY_200] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] - Select Operator [SEL_195] (rows=652 width=4) - Output:["_col0"] - Please refer to the previous Select Operator [SEL_193] - <-Map 16 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_212] - PartitionCols:_col0, _col1 - Select Operator [SEL_211] (rows=57591150 width=8) - Output:["_col0","_col1"] - TableScan [TS_6] (rows=57591150 width=8) - default@store_returns,store_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["sr_item_sk","sr_ticket_number"] - <-Reducer 9 [ONE_TO_ONE_EDGE] vectorized - FORWARD [RS_225] - PartitionCols:_col1, _col0 - Select Operator [SEL_224] (rows=40539971 width=239) - Output:["_col0","_col1","_col2","_col3","_col4"] - Group By Operator [GBY_223] (rows=40539971 width=239) - Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1 - <-Reducer 8 [SIMPLE_EDGE] - SHUFFLE [RS_39] - PartitionCols:_col0, _col1 - Group By Operator [GBY_38] (rows=40539971 width=239) - Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col4)","sum(_col5)","sum(_col6)"],keys:_col3, _col2 - Merge Join Operator [MERGEJOIN_187] (rows=40539971 width=235) - Conds:RS_196._col0=RS_35._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6"] - <-Map 1 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_196] - PartitionCols:_col0 - Please refer to the previous Select Operator [SEL_193] - <-Reducer 18 [SIMPLE_EDGE] - SHUFFLE [RS_35] - PartitionCols:_col0 - Select Operator [SEL_33] (rows=113538342 width=239) - Output:["_col0","_col1","_col2","_col3","_col4","_col5"] - Filter Operator [FIL_32] (rows=113538342 width=242) - predicate:_col8 is null - Merge Join Operator [MERGEJOIN_186] (rows=254679677 width=242) - Conds:RS_220._col1, _col3=RS_222._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"] - <-Map 17 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_220] - PartitionCols:_col1, _col3 - Select Operator [SEL_219] (rows=143966864 width=243) - Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] - Filter Operator [FIL_218] (rows=143966864 width=243) - predicate:((ws_sold_date_sk BETWEEN DynamicValue(RS_34_date_dim_d_date_sk_min) AND DynamicValue(RS_34_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_34_date_dim_d_date_sk_bloom_filter))) and ws_sold_date_sk is not null) - TableScan [TS_24] (rows=144002668 width=243) - default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_customer_sk","ws_order_number","ws_quantity","ws_wholesale_cost","ws_sales_price"] - <-Reducer 10 [BROADCAST_EDGE] vectorized - BROADCAST [RS_217] - Group By Operator [GBY_216] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] - <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized - SHUFFLE [RS_204] - Group By Operator [GBY_201] (rows=1 width=12) - Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] - Select Operator [SEL_197] (rows=652 width=4) - Output:["_col0"] - Please refer to the previous Select Operator [SEL_193] - <-Map 19 [SIMPLE_EDGE] vectorized - SHUFFLE [RS_222] - PartitionCols:_col0, _col1 - Select Operator [SEL_221] (rows=14398467 width=8) - Output:["_col0","_col1"] - TableScan [TS_27] (rows=14398467 width=8) + Merge Join Operator [MERGEJOIN_222] (rows=101774621265 width=711) + Conds:RS_71._col1=RS_271._col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col7","_col8","_col9","_col11","_col12","_col13","_col14"] + <-Reducer 12 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_271] + PartitionCols:_col0 + Select Operator [SEL_270] (rows=16847407 width=243) + Output:["_col0","_col1","_col2","_col3","_col4"] + Filter Operator [FIL_269] (rows=16847407 width=239) + predicate:(_col2 > 0L) + Select Operator [SEL_268] (rows=50542222 width=239) + Output:["_col1","_col2","_col3","_col4"] + Group By Operator [GBY_267] (rows=50542222 width=239) + Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1 + <-Reducer 11 [SIMPLE_EDGE] + SHUFFLE [RS_63] + PartitionCols:_col0, _col1 + Group By Operator [GBY_62] (rows=50542222 width=239) + Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col4)","sum(_col5)","sum(_col6)"],keys:_col2, _col3 + Merge Join Operator [MERGEJOIN_220] (rows=50542222 width=233) + Conds:RS_229._col0=RS_59._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_229] + PartitionCols:_col0 + Select Operator [SEL_224] (rows=652 width=4) + Output:["_col0"] + Filter Operator [FIL_223] (rows=652 width=8) + predicate:((d_year = 2000) and d_date_sk is not null) + TableScan [TS_0] (rows=73049 width=8) + default@date_dim,date_dim,Tbl:COMPLETE,Col:COMPLETE,Output:["d_date_sk","d_year"] + <-Reducer 21 [SIMPLE_EDGE] + SHUFFLE [RS_59] + PartitionCols:_col0 + Select Operator [SEL_57] (rows=142558915 width=239) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + Filter Operator [FIL_56] (rows=142558915 width=240) + predicate:_col8 is null + Merge Join Operator [MERGEJOIN_219] (rows=233188849 width=240) + Conds:RS_264._col2, _col3=RS_266._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"] + <-Map 20 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_264] + PartitionCols:_col2, _col3 + Select Operator [SEL_263] (rows=142558915 width=242) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] + Filter Operator [FIL_262] (rows=142558915 width=242) + predicate:((cs_item_sk = cs_item_sk) and (cs_sold_date_sk BETWEEN DynamicValue(RS_58_date_dim_d_date_sk_min) AND DynamicValue(RS_58_date_dim_d_date_sk_max) and in_bloom_filter(cs_sold_date_sk, DynamicValue(RS_58_date_dim_d_date_sk_bloom_filter))) and cs_bill_customer_sk is not null and cs_sold_date_sk is not null) + TableScan [TS_48] (rows=287989836 width=242) + default@catalog_sales,catalog_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["cs_sold_date_sk","cs_bill_customer_sk","cs_item_sk","cs_order_number","cs_quantity","cs_wholesale_cost","cs_sales_price"] + <-Reducer 13 [BROADCAST_EDGE] vectorized + BROADCAST [RS_261] + Group By Operator [GBY_260] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] + <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized + SHUFFLE [RS_236] + Group By Operator [GBY_233] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] + Select Operator [SEL_230] (rows=652 width=4) + Output:["_col0"] + Please refer to the previous Select Operator [SEL_224] + <-Map 22 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_266] + PartitionCols:_col0, _col1 + Select Operator [SEL_265] (rows=28798881 width=8) + Output:["_col0","_col1"] + TableScan [TS_51] (rows=28798881 width=8) + default@catalog_returns,catalog_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["cr_item_sk","cr_order_number"] + <-Reducer 4 [SIMPLE_EDGE] + SHUFFLE [RS_71] + PartitionCols:_col1 + Merge Join Operator [MERGEJOIN_221] (rows=3053485049 width=471) + Conds:RS_247._col1, _col0=RS_259._col1, _col0(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col7","_col8","_col9"] + <-Reducer 3 [ONE_TO_ONE_EDGE] vectorized + FORWARD [RS_247] + PartitionCols:_col1, _col0 + Select Operator [SEL_246] (rows=114214965 width=239) + Output:["_col0","_col1","_col2","_col3","_col4"] + Group By Operator [GBY_245] (rows=114214965 width=239) + Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1 + <-Reducer 2 [SIMPLE_EDGE] + SHUFFLE [RS_19] + PartitionCols:_col0, _col1 + Group By Operator [GBY_18] (rows=114214965 width=239) + Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col4)","sum(_col5)","sum(_col6)"],keys:_col3, _col2 + Merge Join Operator [MERGEJOIN_216] (rows=114214965 width=218) + Conds:RS_225._col0=RS_15._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_225] + PartitionCols:_col0 + Please refer to the previous Select Operator [SEL_224] + <-Reducer 15 [SIMPLE_EDGE] + SHUFFLE [RS_15] + PartitionCols:_col0 + Select Operator [SEL_13] (rows=319876350 width=233) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + Filter Operator [FIL_12] (rows=319876350 width=236) + predicate:_col8 is null + Merge Join Operator [MERGEJOIN_215] (rows=857669906 width=236) + Conds:RS_241._col1, _col3=RS_244._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"] + <-Map 14 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_241] + PartitionCols:_col1, _col3 + Select Operator [SEL_240] (rows=525327388 width=233) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] + Filter Operator [FIL_239] (rows=525327388 width=233) + predicate:((ss_sold_date_sk BETWEEN DynamicValue(RS_14_date_dim_d_date_sk_min) AND DynamicValue(RS_14_date_dim_d_date_sk_max) and in_bloom_filter(ss_sold_date_sk, DynamicValue(RS_14_date_dim_d_date_sk_bloom_filter))) and ss_customer_sk is not null and ss_item_sk is not null and ss_sold_date_sk is not null) + TableScan [TS_3] (rows=575995635 width=233) + default@store_sales,store_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ss_sold_date_sk","ss_item_sk","ss_customer_sk","ss_ticket_number","ss_quantity","ss_wholesale_cost","ss_sales_price"] + <-Reducer 7 [BROADCAST_EDGE] vectorized + BROADCAST [RS_238] + Group By Operator [GBY_237] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] + <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized + SHUFFLE [RS_234] + Group By Operator [GBY_231] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] + Select Operator [SEL_226] (rows=652 width=4) + Output:["_col0"] + Please refer to the previous Select Operator [SEL_224] + <-Map 16 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_244] + PartitionCols:_col0, _col1 + Select Operator [SEL_243] (rows=57591150 width=8) + Output:["_col0","_col1"] + Filter Operator [FIL_242] (rows=57591150 width=8) + predicate:sr_item_sk is not null + TableScan [TS_6] (rows=57591150 width=8) + default@store_returns,store_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["sr_item_sk","sr_ticket_number"] + <-Reducer 9 [ONE_TO_ONE_EDGE] vectorized + FORWARD [RS_259] + PartitionCols:_col1, _col0 + Select Operator [SEL_258] (rows=13513323 width=239) + Output:["_col0","_col1","_col2","_col3","_col4"] + Filter Operator [FIL_257] (rows=13513323 width=239) + predicate:(_col2 > 0L) + Group By Operator [GBY_256] (rows=40539971 width=239) + Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)","sum(VALUE._col2)"],keys:KEY._col0, KEY._col1 + <-Reducer 8 [SIMPLE_EDGE] + SHUFFLE [RS_41] + PartitionCols:_col0, _col1 + Group By Operator [GBY_40] (rows=40539971 width=239) + Output:["_col0","_col1","_col2","_col3","_col4"],aggregations:["sum(_col4)","sum(_col5)","sum(_col6)"],keys:_col3, _col2 + Merge Join Operator [MERGEJOIN_218] (rows=40539971 width=235) + Conds:RS_227._col0=RS_37._col0(Inner),Output:["_col2","_col3","_col4","_col5","_col6"] + <-Map 1 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_227] + PartitionCols:_col0 + Please refer to the previous Select Operator [SEL_224] + <-Reducer 18 [SIMPLE_EDGE] + SHUFFLE [RS_37] + PartitionCols:_col0 + Select Operator [SEL_35] (rows=113538342 width=239) + Output:["_col0","_col1","_col2","_col3","_col4","_col5"] + Filter Operator [FIL_34] (rows=113538342 width=242) + predicate:_col8 is null + Merge Join Operator [MERGEJOIN_217] (rows=254644510 width=242) + Conds:RS_252._col1, _col3=RS_255._col0, _col1(Left Outer),Output:["_col0","_col1","_col2","_col4","_col5","_col6","_col8"] + <-Map 17 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_252] + PartitionCols:_col1, _col3 + Select Operator [SEL_251] (rows=143930993 width=243) + Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6"] + Filter Operator [FIL_250] (rows=143930993 width=243) + predicate:((ws_sold_date_sk BETWEEN DynamicValue(RS_36_date_dim_d_date_sk_min) AND DynamicValue(RS_36_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_36_date_dim_d_date_sk_bloom_filter))) and ws_bill_customer_sk is not null and ws_item_sk is not null and ws_sold_date_sk is not null) + TableScan [TS_25] (rows=144002668 width=243) + default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_item_sk","ws_bill_customer_sk","ws_order_number","ws_quantity","ws_wholesale_cost","ws_sales_price"] + <-Reducer 10 [BROADCAST_EDGE] vectorized + BROADCAST [RS_249] + Group By Operator [GBY_248] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(VALUE._col0)","max(VALUE._col1)","bloom_filter(VALUE._col2, expectedEntries=1000000)"] + <-Map 1 [CUSTOM_SIMPLE_EDGE] vectorized + SHUFFLE [RS_235] + Group By Operator [GBY_232] (rows=1 width=12) + Output:["_col0","_col1","_col2"],aggregations:["min(_col0)","max(_col0)","bloom_filter(_col0, expectedEntries=1000000)"] + Select Operator [SEL_228] (rows=652 width=4) + Output:["_col0"] + Please refer to the previous Select Operator [SEL_224] + <-Map 19 [SIMPLE_EDGE] vectorized + SHUFFLE [RS_255] + PartitionCols:_col0, _col1 + Select Operator [SEL_254] (rows=14398467 width=8) + Output:["_col0","_col1"] + Filter Operator [FIL_253] (rows=14398467 width=8) + predicate:wr_item_sk is not null + TableScan [TS_28] (rows=14398467 width=8) default@web_returns,web_returns,Tbl:COMPLETE,Col:COMPLETE,Output:["wr_item_sk","wr_order_number"] diff --git ql/src/test/results/clientpositive/perf/tez/query85.q.out ql/src/test/results/clientpositive/perf/tez/query85.q.out index 5b8ad0ba57..69d2750445 100644 --- ql/src/test/results/clientpositive/perf/tez/query85.q.out +++ ql/src/test/results/clientpositive/perf/tez/query85.q.out @@ -318,7 +318,7 @@ Stage-0 Select Operator [SEL_213] (rows=143931136 width=43) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10"] Filter Operator [FIL_212] (rows=143931136 width=243) - predicate:(((ws_net_profit >= 100) or (ws_net_profit <= 200) or ws_net_profit is not null or (ws_net_profit <= 300) or (ws_net_profit <= 250)) and ((ws_sales_price >= 100) or (ws_sales_price <= 150) or ws_sales_price is not null or (ws_sales_price <= 200)) and (ws_sold_date_sk BETWEEN DynamicValue(RS_38_date_dim_d_date_sk_min) AND DynamicValue(RS_38_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_38_date_dim_d_date_sk_bloom_filter))) and ws_item_sk is not null and ws_order_number is not null and ws_sold_date_sk is not null and ws_web_page_sk is not null) + predicate:(((ws_net_profit >= 100) or (ws_net_profit <= 200) or (ws_net_profit >= 150) or (ws_net_profit <= 300) or (ws_net_profit >= 50) or (ws_net_profit <= 250)) and ((ws_sales_price >= 100) or (ws_sales_price <= 150) or (ws_sales_price >= 50) or (ws_sales_price <= 100) or (ws_sales_price >= 150) or (ws_sales_price <= 200)) and (ws_sold_date_sk BETWEEN DynamicValue(RS_38_date_dim_d_date_sk_min) AND DynamicValue(RS_38_date_dim_d_date_sk_max) and in_bloom_filter(ws_sold_date_sk, DynamicValue(RS_38_date_dim_d_date_sk_bloom_filter))) and ws_item_sk is not null and ws_order_number is not null and ws_sold_date_sk is not null and ws_web_page_sk is not null) TableScan [TS_0] (rows=144002668 width=243) default@web_sales,web_sales,Tbl:COMPLETE,Col:COMPLETE,Output:["ws_sold_date_sk","ws_item_sk","ws_web_page_sk","ws_order_number","ws_quantity","ws_sales_price","ws_net_profit"] <-Reducer 8 [BROADCAST_EDGE] vectorized diff --git ql/src/test/results/clientpositive/perf/tez/query86.q.out ql/src/test/results/clientpositive/perf/tez/query86.q.out index 2d6d545a5b..dd5b84feb1 100644 --- ql/src/test/results/clientpositive/perf/tez/query86.q.out +++ ql/src/test/results/clientpositive/perf/tez/query86.q.out @@ -82,12 +82,12 @@ Stage-0 Select Operator [SEL_80] (rows=3060 width=490) Output:["_col0","_col1","_col2","_col3","_col4","_col5"] PTF Operator [PTF_79] (rows=3060 width=302) - Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 DESC NULLS LAST","partition by:":"(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END"}] + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col2 DESC NULLS LAST","partition by:":"(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END"}] Select Operator [SEL_78] (rows=3060 width=302) Output:["_col0","_col1","_col2","_col3"] <-Reducer 4 [SIMPLE_EDGE] vectorized SHUFFLE [RS_77] - PartitionCols:(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = 0)) THEN (_col0) ELSE (CAST( null AS STRING)) END + PartitionCols:(grouping(_col3, 1) + grouping(_col3, 0)), CASE WHEN ((grouping(_col3, 0) = UDFToLong(0))) THEN (_col0) ELSE (CAST( null AS STRING)) END Select Operator [SEL_76] (rows=3060 width=302) Output:["_col0","_col1","_col2","_col3"] Group By Operator [GBY_75] (rows=3060 width=302) diff --git ql/src/test/results/clientpositive/perf/tez/query88.q.out ql/src/test/results/clientpositive/perf/tez/query88.q.out index e02ff3715b..c8e2e6fba4 100644 --- ql/src/test/results/clientpositive/perf/tez/query88.q.out +++ ql/src/test/results/clientpositive/perf/tez/query88.q.out @@ -320,7 +320,7 @@ Stage-0 Select Operator [SEL_660] (rows=817 width=4) Output:["_col0"] Filter Operator [FIL_659] (rows=817 width=12) - predicate:((((hd_dep_count = 3) and hd_vehicle_count is not null) or ((hd_dep_count = 0) and (hd_vehicle_count <= 2)) or ((hd_dep_count = 1) and (hd_vehicle_count <= 3))) and (hd_dep_count) IN (3, 0, 1) and (hd_vehicle_count <= 5) and hd_demo_sk is not null) + 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_vehicle_count <= 5) or (hd_vehicle_count <= 2) or (hd_vehicle_count <= 3)) and (hd_dep_count) IN (3, 0, 1) and hd_demo_sk is not null) TableScan [TS_3] (rows=7200 width=12) default@household_demographics,household_demographics,Tbl:COMPLETE,Col:COMPLETE,Output:["hd_demo_sk","hd_dep_count","hd_vehicle_count"] <-Map 56 [SIMPLE_EDGE] vectorized diff --git ql/src/test/results/clientpositive/perf/tez/query89.q.out ql/src/test/results/clientpositive/perf/tez/query89.q.out index 8501822cd2..015600e312 100644 --- ql/src/test/results/clientpositive/perf/tez/query89.q.out +++ ql/src/test/results/clientpositive/perf/tez/query89.q.out @@ -89,7 +89,7 @@ Stage-0 Select Operator [SEL_108] (rows=4804228 width=801) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8"] Filter Operator [FIL_107] (rows=4804228 width=689) - predicate:CASE WHEN ((avg_window_0 <> 0)) THEN (((abs((_col6 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (null) END + predicate:CASE WHEN ((avg_window_0 <> 0)) THEN (((abs((_col6 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (false) END Select Operator [SEL_106] (rows=9608456 width=577) Output:["avg_window_0","_col0","_col1","_col2","_col3","_col4","_col5","_col6"] PTF Operator [PTF_105] (rows=9608456 width=577) diff --git ql/src/test/results/clientpositive/pointlookup.q.out ql/src/test/results/clientpositive/pointlookup.q.out index c77536efe5..13047f0e51 100644 --- ql/src/test/results/clientpositive/pointlookup.q.out +++ ql/src/test/results/clientpositive/pointlookup.q.out @@ -352,6 +352,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@inoutputopt #### A masked pattern was here #### 11 +Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product PREHOOK: query: select orOutput.key, inOutput.key from orOutput full outer join inOutput on (orOutput.key = inOutput.key) where orOutput.key = null @@ -368,6 +369,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@inoutput POSTHOOK: Input: default@oroutput #### A masked pattern was here #### +Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product PREHOOK: query: select orOutput.key, inOutputOpt.key from orOutput full outer join inOutputOpt on (orOutput.key = inOutputOpt.key) where orOutput.key = null diff --git ql/src/test/results/clientpositive/pointlookup2.q.out ql/src/test/results/clientpositive/pointlookup2.q.out index fcfb40faac..20b42da6c9 100644 --- ql/src/test/results/clientpositive/pointlookup2.q.out +++ ql/src/test/results/clientpositive/pointlookup2.q.out @@ -294,7 +294,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@pcr_t1_n2 POSTHOOK: Input: default@pcr_t1_n2@ds=2000-04-08 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS STRING) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-08' AS STRING) AS `ds1` +OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds1` FROM (SELECT * FROM (SELECT `key`, `value` FROM `default`.`pcr_t1_n2` @@ -534,7 +534,7 @@ POSTHOOK: Input: default@pcr_t1_n2 POSTHOOK: Input: default@pcr_t1_n2@ds=2000-04-08 POSTHOOK: Input: default@pcr_t1_n2@ds=2000-04-09 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS STRING) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-09' AS STRING) AS `ds1` +OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-09' AS VARCHAR(65536)) AS `ds1` FROM (SELECT * FROM (SELECT `key`, `value` FROM `default`.`pcr_t1_n2` @@ -826,6 +826,14 @@ POSTHOOK: Input: default@pcr_t1_n2@ds=2000-04-08 POSTHOOK: Input: default@pcr_t1_n2@ds=2000-04-09 POSTHOOK: Input: default@pcr_t2_n0 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`value`, `t0`.`ds`, `t2`.`ds` AS `ds1`, `t2`.`key` AS `key1`, `t2`.`value` AS `value1` +FROM (SELECT `key`, `value`, `ds`, `ds` = '2000-04-08' AS `=`, `ds` = '2000-04-09' AS `=7` +FROM `default`.`pcr_t1_n2` +WHERE `ds` = '2000-04-08' OR `ds` = '2000-04-09') AS `t0` +INNER JOIN (SELECT `ds`, `key`, `value`, `key` = 1 AS `=`, `key` = 2 AS `=7` +FROM `default`.`pcr_t2_n0` +WHERE `key` = 1 OR `key` = 2) AS `t2` ON `t0`.`=` AND `t2`.`=` OR `t0`.`=7` AND `t2`.`=7` +ORDER BY `t2`.`key`, `t2`.`value`, `t0`.`ds` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-2 depends on stages: Stage-1 @@ -1160,6 +1168,14 @@ POSTHOOK: Input: default@pcr_t1_n2@ds=2000-04-09 POSTHOOK: Input: default@pcr_t1_n2@ds=2000-04-10 POSTHOOK: Input: default@pcr_t2_n0 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`value`, `t0`.`ds`, `t2`.`ds` AS `ds1`, `t2`.`key` AS `key1`, `t2`.`value` AS `value1` +FROM (SELECT `key`, `value`, `ds`, `key` = 1 AS `=`, `key` = 2 AS `=7` +FROM `default`.`pcr_t1_n2` +WHERE `key` = 1 OR `key` = 2) AS `t0` +INNER JOIN (SELECT `ds`, `key`, `value`, `ds` = '2000-04-08' AS `=`, `ds` = '2000-04-09' AS `=7` +FROM `default`.`pcr_t2_n0` +WHERE `ds` = '2000-04-08' OR `ds` = '2000-04-09') AS `t2` ON `t2`.`=` AND `t0`.`=` OR `t2`.`=7` AND `t0`.`=7` +ORDER BY `t0`.`key`, `t0`.`value`, `t2`.`ds` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-2 depends on stages: Stage-1 @@ -1720,6 +1736,10 @@ POSTHOOK: Input: default@pcr_t1_n2 POSTHOOK: Input: default@pcr_t1_n2@ds=2000-04-08 POSTHOOK: Input: default@pcr_t1_n2@ds=2000-04-09 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, `ds` +FROM `default`.`pcr_t1_n2` +WHERE ROW(`key`, `ds`) IN (ROW(1, '2000-04-08'), ROW(2, '2000-04-09')) +ORDER BY `key`, `value`, `ds` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1904,7 +1924,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@pcr_t1_n2 POSTHOOK: Input: default@pcr_t1_n2@ds=2000-04-08 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS STRING) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-08' AS STRING) AS `ds1` +OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds1` FROM (SELECT * FROM (SELECT `key`, `value` FROM `default`.`pcr_t1_n2` @@ -2144,7 +2164,7 @@ POSTHOOK: Input: default@pcr_t1_n2 POSTHOOK: Input: default@pcr_t1_n2@ds=2000-04-08 POSTHOOK: Input: default@pcr_t1_n2@ds=2000-04-09 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS STRING) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-09' AS STRING) AS `ds1` +OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-09' AS VARCHAR(65536)) AS `ds1` FROM (SELECT * FROM (SELECT `key`, `value` FROM `default`.`pcr_t1_n2` diff --git ql/src/test/results/clientpositive/pointlookup3.q.out ql/src/test/results/clientpositive/pointlookup3.q.out index 438bd09353..44b58795bf 100644 --- ql/src/test/results/clientpositive/pointlookup3.q.out +++ ql/src/test/results/clientpositive/pointlookup3.q.out @@ -250,7 +250,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@pcr_t1_n1 POSTHOOK: Input: default@pcr_t1_n1@ds1=2000-04-08/ds2=2001-04-08 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `key`, `value`, `ds1`, CAST('2001-04-08' AS STRING) AS `ds2` +OPTIMIZED SQL: SELECT `key`, `value`, `ds1`, CAST('2001-04-08' AS VARCHAR(65536)) AS `ds2` FROM (SELECT `key`, `value`, `ds1` FROM `default`.`pcr_t1_n1` WHERE `ds2` = '2001-04-08' AND (`ds1` = '2000-04-08' AND `key` = 1 OR `ds1` = '2000-04-09' AND `key` = 2) @@ -391,7 +391,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@pcr_t1_n1 POSTHOOK: Input: default@pcr_t1_n1@ds1=2000-04-08/ds2=2001-04-08 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS STRING) AS `ds1`, `t3`.`ds2`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, `t3`.`ds1` AS `ds11`, CAST('2001-04-08' AS STRING) AS `ds21` +OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds1`, `t3`.`ds2`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, `t3`.`ds1` AS `ds11`, CAST('2001-04-08' AS VARCHAR(65536)) AS `ds21` FROM (SELECT * FROM (SELECT `key`, `value`, `ds2` FROM `default`.`pcr_t1_n1` @@ -632,7 +632,7 @@ POSTHOOK: Input: default@pcr_t1_n1 POSTHOOK: Input: default@pcr_t1_n1@ds1=2000-04-08/ds2=2001-04-08 POSTHOOK: Input: default@pcr_t1_n1@ds1=2000-04-09/ds2=2001-04-09 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS STRING) AS `ds1`, `t3`.`ds2`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-09' AS STRING) AS `ds11`, `t3`.`ds20` AS `ds21` +OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds1`, `t3`.`ds2`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-09' AS VARCHAR(65536)) AS `ds11`, `t3`.`ds20` AS `ds21` FROM (SELECT * FROM (SELECT `key`, `value`, `ds2` FROM `default`.`pcr_t1_n1` @@ -926,6 +926,14 @@ POSTHOOK: Input: default@pcr_t1_n1@ds1=2000-04-08/ds2=2001-04-08 POSTHOOK: Input: default@pcr_t1_n1@ds1=2000-04-09/ds2=2001-04-09 POSTHOOK: Input: default@pcr_t1_n1@ds1=2000-04-10/ds2=2001-04-10 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`value`, `t0`.`ds1`, `t0`.`ds2`, `t2`.`key` AS `key1`, `t2`.`value` AS `value1`, `t2`.`ds1` AS `ds11`, `t2`.`ds2` AS `ds21` +FROM (SELECT `key`, `value`, `ds1`, `ds2`, `ds1` = '2000-04-08' AS `=`, `ds1` = '2000-04-09' AS `=8` +FROM `default`.`pcr_t1_n1` +WHERE `ds1` = '2000-04-08' OR `ds1` = '2000-04-09') AS `t0` +INNER JOIN (SELECT `key`, `value`, `ds1`, `ds2`, `key` = 1 AS `=`, `key` = 2 AS `=8` +FROM `default`.`pcr_t1_n1` +WHERE `key` = 1 OR `key` = 2) AS `t2` ON `t0`.`=` AND `t2`.`=` OR `t0`.`=8` AND `t2`.`=8` +ORDER BY `t2`.`key`, `t2`.`value`, `t0`.`ds1` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-2 depends on stages: Stage-1 @@ -1484,6 +1492,10 @@ POSTHOOK: Input: default@pcr_t1_n1 POSTHOOK: Input: default@pcr_t1_n1@ds1=2000-04-08/ds2=2001-04-08 POSTHOOK: Input: default@pcr_t1_n1@ds1=2000-04-09/ds2=2001-04-09 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, `ds1`, `ds2` +FROM `default`.`pcr_t1_n1` +WHERE ROW(`key`, `ds1`) IN (ROW(1, '2000-04-08'), ROW(2, '2000-04-09')) +ORDER BY `key`, `value`, `ds1`, `ds2` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1670,6 +1682,11 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@pcr_t1_n1 POSTHOOK: Input: default@pcr_t1_n1@ds1=2000-04-08/ds2=2001-04-08 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, `ds1`, CAST('2001-04-08' AS VARCHAR(65536)) AS `ds2` +FROM (SELECT `key`, `value`, `ds1` +FROM `default`.`pcr_t1_n1` +WHERE ROW(`key`, `ds1`) IN (ROW(1, '2000-04-08'), ROW(2, '2000-04-09')) AND `ds2` = '2001-04-08' +ORDER BY `key`, `value`, `ds1`) AS `t1` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1806,7 +1823,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@pcr_t1_n1 POSTHOOK: Input: default@pcr_t1_n1@ds1=2000-04-08/ds2=2001-04-08 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS STRING) AS `ds1`, `t3`.`ds2`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, `t3`.`ds1` AS `ds11`, CAST('2001-04-08' AS STRING) AS `ds21` +OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds1`, `t3`.`ds2`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, `t3`.`ds1` AS `ds11`, CAST('2001-04-08' AS VARCHAR(65536)) AS `ds21` FROM (SELECT * FROM (SELECT `key`, `value`, `ds2` FROM `default`.`pcr_t1_n1` @@ -2047,7 +2064,7 @@ POSTHOOK: Input: default@pcr_t1_n1 POSTHOOK: Input: default@pcr_t1_n1@ds1=2000-04-08/ds2=2001-04-08 POSTHOOK: Input: default@pcr_t1_n1@ds1=2000-04-09/ds2=2001-04-09 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS STRING) AS `ds1`, `t3`.`ds2`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-09' AS STRING) AS `ds11`, `t3`.`ds20` AS `ds21` +OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds1`, `t3`.`ds2`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-09' AS VARCHAR(65536)) AS `ds11`, `t3`.`ds20` AS `ds21` FROM (SELECT * FROM (SELECT `key`, `value`, `ds2` FROM `default`.`pcr_t1_n1` diff --git ql/src/test/results/clientpositive/pointlookup4.q.out ql/src/test/results/clientpositive/pointlookup4.q.out index f105f8a569..f95d5572c9 100644 --- ql/src/test/results/clientpositive/pointlookup4.q.out +++ ql/src/test/results/clientpositive/pointlookup4.q.out @@ -271,6 +271,10 @@ POSTHOOK: Input: default@pcr_t1_n0 POSTHOOK: Input: default@pcr_t1_n0@ds1=2000-04-08/ds2=2001-04-08 POSTHOOK: Input: default@pcr_t1_n0@ds1=2000-04-09/ds2=2001-04-09 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, `ds1`, `ds2` +FROM `default`.`pcr_t1_n0` +WHERE ROW(`key`, `ds1`, `ds2`) IN (ROW(1, '2000-04-08', '2001-04-08'), ROW(2, '2000-04-09', '2001-04-09')) +ORDER BY `key`, `value`, `ds1`, `ds2` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 diff --git ql/src/test/results/clientpositive/ppd2.q.out ql/src/test/results/clientpositive/ppd2.q.out index deb6bd9810..a3be82fda1 100644 --- ql/src/test/results/clientpositive/ppd2.q.out +++ ql/src/test/results/clientpositive/ppd2.q.out @@ -299,18 +299,18 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart - filterExpr: ((value like 'aaa%') or (value like 'vvv%')) (type: boolean) + filterExpr: ((value like 'aaa%') or (value like 'vvv%')) is true (type: boolean) Statistics: Num rows: 2000 Data size: 356000 Basic stats: COMPLETE Column stats: PARTIAL Filter Operator - predicate: ((value like 'aaa%') or (value like 'vvv%')) (type: boolean) - Statistics: Num rows: 2000 Data size: 356000 Basic stats: COMPLETE Column stats: PARTIAL + predicate: ((value like 'aaa%') or (value like 'vvv%')) is true (type: boolean) + Statistics: Num rows: 1000 Data size: 178000 Basic stats: COMPLETE Column stats: PARTIAL Select Operator expressions: UDFToInteger(key) (type: int) outputColumnNames: _col0 - Statistics: Num rows: 2000 Data size: 8000 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 1000 Data size: 4000 Basic stats: COMPLETE Column stats: PARTIAL File Output Operator compressed: false - Statistics: Num rows: 2000 Data size: 8000 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 1000 Data size: 4000 Basic stats: COMPLETE Column stats: PARTIAL table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git ql/src/test/results/clientpositive/ppd_constant_expr.q.out ql/src/test/results/clientpositive/ppd_constant_expr.q.out index ec17dc4984..104055be5c 100644 --- ql/src/test/results/clientpositive/ppd_constant_expr.q.out +++ ql/src/test/results/clientpositive/ppd_constant_expr.q.out @@ -34,14 +34,14 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src1 - Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: null (type: string), UDFToInteger((UDFToDouble(key) - null)) (type: int), null (type: double) + expressions: null (type: string), null (type: int), null (type: double) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 25 Data size: 192 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 96 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 25 Data size: 192 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 96 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat @@ -50,7 +50,7 @@ STAGE PLANS: Select Operator expressions: _col0 (type: string), _col1 (type: int), _col2 (type: double) outputColumnNames: c1, c2, c3 - Statistics: Num rows: 25 Data size: 192 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 96 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: compute_stats(c1, 'hll'), compute_stats(c2, 'hll'), compute_stats(c3, 'hll') mode: hash @@ -142,7 +142,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@src1 POSTHOOK: Output: default@ppd_constant_expr POSTHOOK: Lineage: ppd_constant_expr.c1 EXPRESSION [] -POSTHOOK: Lineage: ppd_constant_expr.c2 EXPRESSION [(src1)src1.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: ppd_constant_expr.c2 EXPRESSION [] POSTHOOK: Lineage: ppd_constant_expr.c3 EXPRESSION [] PREHOOK: query: SELECT ppd_constant_expr.* FROM ppd_constant_expr PREHOOK: type: QUERY @@ -205,14 +205,14 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src1 - Statistics: Num rows: 25 Data size: 2150 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: null (type: string), UDFToInteger((UDFToDouble(key) - null)) (type: int), null (type: double) + expressions: null (type: string), null (type: int), null (type: double) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 25 Data size: 192 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 96 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 25 Data size: 192 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 96 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat @@ -221,7 +221,7 @@ STAGE PLANS: Select Operator expressions: _col0 (type: string), _col1 (type: int), _col2 (type: double) outputColumnNames: c1, c2, c3 - Statistics: Num rows: 25 Data size: 192 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 25 Data size: 96 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator aggregations: compute_stats(c1, 'hll'), compute_stats(c2, 'hll'), compute_stats(c3, 'hll') mode: hash @@ -313,7 +313,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@src1 POSTHOOK: Output: default@ppd_constant_expr POSTHOOK: Lineage: ppd_constant_expr.c1 EXPRESSION [] -POSTHOOK: Lineage: ppd_constant_expr.c2 EXPRESSION [(src1)src1.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: ppd_constant_expr.c2 EXPRESSION [] POSTHOOK: Lineage: ppd_constant_expr.c3 EXPRESSION [] PREHOOK: query: SELECT ppd_constant_expr.* FROM ppd_constant_expr PREHOOK: type: QUERY diff --git ql/src/test/results/clientpositive/ppd_join_filter.q.out ql/src/test/results/clientpositive/ppd_join_filter.q.out index b47a1472c0..ac56244b69 100644 --- ql/src/test/results/clientpositive/ppd_join_filter.q.out +++ ql/src/test/results/clientpositive/ppd_join_filter.q.out @@ -36,7 +36,7 @@ INNER JOIN (SELECT `key`, CAST(MIN(`key`) AS DOUBLE) + CAST(2 AS DOUBLE) AS `k2` FROM `default`.`src` WHERE `key` IS NOT NULL GROUP BY `key` -HAVING CAST(MIN(`key`) AS DOUBLE) + 1 < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` +HAVING CAST(MIN(`key`) AS DOUBLE) + CAST(1 AS DOUBLE) < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` STAGE DEPENDENCIES: Stage-2 is a root stage Stage-1 depends on stages: Stage-2 @@ -385,7 +385,7 @@ INNER JOIN (SELECT `key`, CAST(MIN(`key`) AS DOUBLE) + CAST(2 AS DOUBLE) AS `k2` FROM `default`.`src` WHERE `key` IS NOT NULL GROUP BY `key` -HAVING CAST(MIN(`key`) AS DOUBLE) + 1 < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` +HAVING CAST(MIN(`key`) AS DOUBLE) + CAST(1 AS DOUBLE) < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` STAGE DEPENDENCIES: Stage-2 is a root stage Stage-1 depends on stages: Stage-2 @@ -734,7 +734,7 @@ INNER JOIN (SELECT `key`, CAST(MIN(`key`) AS DOUBLE) + CAST(2 AS DOUBLE) AS `k2` FROM `default`.`src` WHERE `key` IS NOT NULL GROUP BY `key` -HAVING CAST(MIN(`key`) AS DOUBLE) + 1 < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` +HAVING CAST(MIN(`key`) AS DOUBLE) + CAST(1 AS DOUBLE) < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` STAGE DEPENDENCIES: Stage-2 is a root stage Stage-1 depends on stages: Stage-2 @@ -1081,7 +1081,7 @@ INNER JOIN (SELECT `key`, CAST(MIN(`key`) AS DOUBLE) + CAST(2 AS DOUBLE) AS `k2` FROM `default`.`src` WHERE `key` IS NOT NULL GROUP BY `key` -HAVING CAST(MIN(`key`) AS DOUBLE) + 1 < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` +HAVING CAST(MIN(`key`) AS DOUBLE) + CAST(1 AS DOUBLE) < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` STAGE DEPENDENCIES: Stage-2 is a root stage Stage-1 depends on stages: Stage-2 diff --git ql/src/test/results/clientpositive/ppd_udf_case.q.out ql/src/test/results/clientpositive/ppd_udf_case.q.out index ac276554f7..3ff8575f93 100644 --- ql/src/test/results/clientpositive/ppd_udf_case.q.out +++ ql/src/test/results/clientpositive/ppd_udf_case.q.out @@ -1,4 +1,3 @@ -Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product PREHOOK: query: EXPLAIN SELECT * FROM srcpart a JOIN srcpart b @@ -44,43 +43,47 @@ STAGE PLANS: Map Operator Tree: TableScan alias: a - filterExpr: ((ds = '2008-04-08') and (key = '27')) (type: boolean) + filterExpr: (((key = '27') is true or (null and (key = '27') is not true and (key = '38') is not true)) and key is not null) (type: boolean) Statistics: Num rows: 1000 Data size: 546000 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((ds = '2008-04-08') and (key = '27')) (type: boolean) - Statistics: Num rows: 3 Data size: 1638 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((key = '27') is true or (null and (key = '27') is not true and (key = '38') is not true)) and (ds = '2008-04-08') and key is not null) (type: boolean) + Statistics: Num rows: 750 Data size: 409500 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: value (type: string), hr (type: string) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 3 Data size: 825 Basic stats: COMPLETE Column stats: COMPLETE + expressions: key (type: string), value (type: string), hr (type: string) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 750 Data size: 271500 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator - sort order: - Statistics: Num rows: 3 Data size: 825 Basic stats: COMPLETE Column stats: COMPLETE - value expressions: _col0 (type: string), _col1 (type: string) + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 750 Data size: 271500 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col1 (type: string), _col2 (type: string) TableScan alias: b - filterExpr: ((ds = '2008-04-08') and (key = '27')) (type: boolean) + filterExpr: (((key = '27') is true or (null and (key = '27') is not true and (key = '38') is not true)) and key is not null) (type: boolean) Statistics: Num rows: 1000 Data size: 546000 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((ds = '2008-04-08') and (key = '27')) (type: boolean) - Statistics: Num rows: 3 Data size: 1638 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((key = '27') is true or (null and (key = '27') is not true and (key = '38') is not true)) and (ds = '2008-04-08') and key is not null) (type: boolean) + Statistics: Num rows: 750 Data size: 409500 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: value (type: string), hr (type: string) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 3 Data size: 825 Basic stats: COMPLETE Column stats: COMPLETE + expressions: key (type: string), value (type: string), hr (type: string) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 750 Data size: 271500 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator - sort order: - Statistics: Num rows: 3 Data size: 825 Basic stats: COMPLETE Column stats: COMPLETE - value expressions: _col0 (type: string), _col1 (type: string) + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 750 Data size: 271500 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col1 (type: string), _col2 (type: string) Reduce Operator Tree: Join Operator condition map: Inner Join 0 to 1 keys: - 0 - 1 - outputColumnNames: _col0, _col1, _col2, _col3 - Statistics: Num rows: 9 Data size: 4950 Basic stats: COMPLETE Column stats: COMPLETE + 0 _col0 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 2373 Data size: 1718052 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false table: @@ -93,18 +96,18 @@ STAGE PLANS: Map Operator Tree: TableScan Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string) - sort order: ++++ - Statistics: Num rows: 9 Data size: 4950 Basic stats: COMPLETE Column stats: COMPLETE + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string) + sort order: ++++++ + Statistics: Num rows: 2373 Data size: 1718052 Basic stats: COMPLETE Column stats: COMPLETE Execution mode: vectorized Reduce Operator Tree: Select Operator - expressions: '27' (type: string), KEY.reducesinkkey0 (type: string), '2008-04-08' (type: string), KEY.reducesinkkey1 (type: string), '27' (type: string), KEY.reducesinkkey2 (type: string), '2008-04-08' (type: string), KEY.reducesinkkey3 (type: string) + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), '2008-04-08' (type: string), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), KEY.reducesinkkey4 (type: string), '2008-04-08' (type: string), KEY.reducesinkkey5 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 - Statistics: Num rows: 9 Data size: 8190 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2373 Data size: 2164176 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 9 Data size: 8190 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2373 Data size: 2164176 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -116,7 +119,6 @@ STAGE PLANS: Processor Tree: ListSink -Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product PREHOOK: query: SELECT * FROM srcpart a JOIN srcpart b ON a.key = b.key @@ -153,7 +155,6 @@ POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 27 val_27 2008-04-08 11 27 val_27 2008-04-08 12 27 val_27 2008-04-08 12 27 val_27 2008-04-08 11 27 val_27 2008-04-08 12 27 val_27 2008-04-08 12 -Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product PREHOOK: query: EXPLAIN SELECT * FROM srcpart a JOIN srcpart b @@ -199,43 +200,47 @@ STAGE PLANS: Map Operator Tree: TableScan alias: a - filterExpr: ((ds = '2008-04-08') and (key = '27')) (type: boolean) + filterExpr: (((key = '27') is true or (null and (key = '27') is not true and (key = '38') is not true)) and key is not null) (type: boolean) Statistics: Num rows: 1000 Data size: 362000 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (key = '27') (type: boolean) - Statistics: Num rows: 3 Data size: 1086 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((key = '27') is true or (null and (key = '27') is not true and (key = '38') is not true)) and key is not null) (type: boolean) + Statistics: Num rows: 750 Data size: 271500 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: value (type: string), hr (type: string) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 3 Data size: 825 Basic stats: COMPLETE Column stats: COMPLETE + expressions: key (type: string), value (type: string), hr (type: string) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 750 Data size: 271500 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator - sort order: - Statistics: Num rows: 3 Data size: 825 Basic stats: COMPLETE Column stats: COMPLETE - value expressions: _col0 (type: string), _col1 (type: string) + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 750 Data size: 271500 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col1 (type: string), _col2 (type: string) TableScan alias: b - filterExpr: ((ds = '2008-04-08') and (key = '27')) (type: boolean) + filterExpr: (((key = '27') is true or (null and (key = '27') is not true and (key = '38') is not true)) and key is not null) (type: boolean) Statistics: Num rows: 1000 Data size: 362000 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (key = '27') (type: boolean) - Statistics: Num rows: 3 Data size: 1086 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((key = '27') is true or (null and (key = '27') is not true and (key = '38') is not true)) and key is not null) (type: boolean) + Statistics: Num rows: 750 Data size: 271500 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: value (type: string), hr (type: string) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 3 Data size: 825 Basic stats: COMPLETE Column stats: COMPLETE + expressions: key (type: string), value (type: string), hr (type: string) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 750 Data size: 271500 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator - sort order: - Statistics: Num rows: 3 Data size: 825 Basic stats: COMPLETE Column stats: COMPLETE - value expressions: _col0 (type: string), _col1 (type: string) + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 750 Data size: 271500 Basic stats: COMPLETE Column stats: COMPLETE + value expressions: _col1 (type: string), _col2 (type: string) Reduce Operator Tree: Join Operator condition map: Inner Join 0 to 1 keys: - 0 - 1 - outputColumnNames: _col0, _col1, _col2, _col3 - Statistics: Num rows: 9 Data size: 4950 Basic stats: COMPLETE Column stats: COMPLETE + 0 _col0 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 + Statistics: Num rows: 2373 Data size: 1718052 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false table: @@ -248,18 +253,18 @@ STAGE PLANS: Map Operator Tree: TableScan Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string) - sort order: ++++ - Statistics: Num rows: 9 Data size: 4950 Basic stats: COMPLETE Column stats: COMPLETE + key expressions: _col0 (type: string), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string) + sort order: ++++++ + Statistics: Num rows: 2373 Data size: 1718052 Basic stats: COMPLETE Column stats: COMPLETE Execution mode: vectorized Reduce Operator Tree: Select Operator - expressions: '27' (type: string), KEY.reducesinkkey0 (type: string), '2008-04-08' (type: string), KEY.reducesinkkey1 (type: string), '27' (type: string), KEY.reducesinkkey2 (type: string), '2008-04-08' (type: string), KEY.reducesinkkey3 (type: string) + expressions: KEY.reducesinkkey0 (type: string), KEY.reducesinkkey1 (type: string), '2008-04-08' (type: string), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: string), KEY.reducesinkkey4 (type: string), '2008-04-08' (type: string), KEY.reducesinkkey5 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 - Statistics: Num rows: 9 Data size: 8190 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2373 Data size: 2164176 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 9 Data size: 8190 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 2373 Data size: 2164176 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -271,7 +276,6 @@ STAGE PLANS: Processor Tree: ListSink -Warning: Shuffle Join JOIN[8][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product PREHOOK: query: SELECT * FROM srcpart a JOIN srcpart b ON a.key = b.key diff --git ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out index 44729042ba..0ec5b29452 100644 --- ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out +++ ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out @@ -26,7 +26,7 @@ POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 #### A masked pattern was here #### OPTIMIZED SQL: SELECT CAST(`key` AS INTEGER) AS `user_id`, `value` FROM `default`.`srcpart` -WHERE `ds` = '2008-04-08' AND (`value` LIKE 'aaa%' OR `value` LIKE 'vvv%') +WHERE `ds` = '2008-04-08' AND (`value` LIKE 'aaa%' OR `value` LIKE 'vvv%') IS TRUE STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -37,23 +37,23 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart - filterExpr: ((ds = '2008-04-08') and ((value like 'aaa%') or (value like 'vvv%'))) (type: boolean) + filterExpr: ((ds = '2008-04-08') and ((value like 'aaa%') or (value like 'vvv%')) is true) (type: boolean) Statistics: Num rows: 1000 Data size: 178000 Basic stats: COMPLETE Column stats: COMPLETE GatherStats: false Filter Operator isSamplingPred: false - predicate: ((value like 'aaa%') or (value like 'vvv%')) (type: boolean) - Statistics: Num rows: 1000 Data size: 178000 Basic stats: COMPLETE Column stats: COMPLETE + predicate: ((value like 'aaa%') or (value like 'vvv%')) is true (type: boolean) + Statistics: Num rows: 500 Data size: 89000 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: UDFToInteger(key) (type: int), value (type: string) outputColumnNames: _col0, _col1 - Statistics: Num rows: 1000 Data size: 95000 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false GlobalTableId: 0 #### A masked pattern was here #### NumFilesPerFileSink: 1 - Statistics: Num rows: 1000 Data size: 95000 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 500 Data size: 47500 Basic stats: COMPLETE Column stats: COMPLETE #### A masked pattern was here #### table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat @@ -238,7 +238,7 @@ POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=12 #### A masked pattern was here #### OPTIMIZED SQL: SELECT CAST(`key` AS INTEGER) AS `user_id`, `value` FROM `default`.`srcpart` -WHERE `ds` = '2008-04-08' AND (`value` LIKE 'aaa%' OR `value` LIKE 'vvv%') +WHERE `ds` = '2008-04-08' AND (`value` LIKE 'aaa%' OR `value` LIKE 'vvv%') IS TRUE STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -253,18 +253,18 @@ STAGE PLANS: GatherStats: false Filter Operator isSamplingPred: false - predicate: (((value like 'aaa%') or (value like 'vvv%')) and (ds = '2008-04-08')) (type: boolean) - Statistics: Num rows: 2000 Data size: 724000 Basic stats: COMPLETE Column stats: PARTIAL + predicate: (((value like 'aaa%') or (value like 'vvv%')) is true and (ds = '2008-04-08')) (type: boolean) + Statistics: Num rows: 1000 Data size: 362000 Basic stats: COMPLETE Column stats: PARTIAL Select Operator expressions: UDFToInteger(key) (type: int), value (type: string) outputColumnNames: _col0, _col1 - Statistics: Num rows: 2000 Data size: 190000 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 1000 Data size: 95000 Basic stats: COMPLETE Column stats: PARTIAL File Output Operator compressed: false GlobalTableId: 0 #### A masked pattern was here #### NumFilesPerFileSink: 1 - Statistics: Num rows: 2000 Data size: 190000 Basic stats: COMPLETE Column stats: PARTIAL + Statistics: Num rows: 1000 Data size: 95000 Basic stats: COMPLETE Column stats: PARTIAL #### A masked pattern was here #### table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat diff --git ql/src/test/results/clientpositive/rand_partitionpruner2.q.out ql/src/test/results/clientpositive/rand_partitionpruner2.q.out index ff73e22b9e..c4513db741 100644 --- ql/src/test/results/clientpositive/rand_partitionpruner2.q.out +++ ql/src/test/results/clientpositive/rand_partitionpruner2.q.out @@ -22,7 +22,7 @@ POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 POSTHOOK: Output: default@tmptable_n1 -OPTIMIZED SQL: SELECT `key`, `value`, CAST('2008-04-08' AS STRING) AS `ds`, `hr` +OPTIMIZED SQL: SELECT `key`, `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds`, `hr` FROM `default`.`srcpart` WHERE RAND(1) < 0.1 AND `ds` = '2008-04-08' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/rand_partitionpruner3.q.out ql/src/test/results/clientpositive/rand_partitionpruner3.q.out index 5e19d87f1e..17f03281ab 100644 --- ql/src/test/results/clientpositive/rand_partitionpruner3.q.out +++ ql/src/test/results/clientpositive/rand_partitionpruner3.q.out @@ -147,7 +147,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: a - filterExpr: ((ds = '2008-04-08') and UDFToDouble(key) BETWEEN 10.0D AND 50.0D and (hr like '%2')) (type: boolean) + filterExpr: ((ds = '2008-04-08') and (hr like '%2') and UDFToDouble(key) BETWEEN 10.0D AND 50.0D) (type: boolean) Statistics: Num rows: 500 Data size: 181000 Basic stats: COMPLETE Column stats: COMPLETE GatherStats: false Filter Operator diff --git ql/src/test/results/clientpositive/spark/auto_sortmerge_join_12.q.out ql/src/test/results/clientpositive/spark/auto_sortmerge_join_12.q.out index bae6c2ab82..9d254d2808 100644 --- ql/src/test/results/clientpositive/spark/auto_sortmerge_join_12.q.out +++ ql/src/test/results/clientpositive/spark/auto_sortmerge_join_12.q.out @@ -134,7 +134,7 @@ POSTHOOK: query: load data local inpath '../../data/files/auto_sortmerge_join/sm POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@bucket_medium@ds=2008-04-08 -Warning: Shuffle Join JOIN[17][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3]] in Work 'Reducer 3' is a cross product +Warning: Shuffle Join JOIN[20][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product PREHOOK: query: explain extended select count(*) FROM bucket_small_n15 a JOIN bucket_medium b ON a.key = b.key JOIN bucket_big_n15 c ON c.key = b.key JOIN bucket_medium d ON c.key = b.key PREHOOK: type: QUERY PREHOOK: Input: default@bucket_big_n15 @@ -156,17 +156,20 @@ POSTHOOK: Input: default@bucket_small_n15 POSTHOOK: Input: default@bucket_small_n15@ds=2008-04-08 #### A masked pattern was here #### OPTIMIZED SQL: SELECT COUNT(*) AS `$f0` +FROM (SELECT 0 AS `DUMMY` +FROM `default`.`bucket_medium`) AS `t`, +(SELECT 0 AS `DUMMY` +FROM (SELECT `t5`.`key`, `t3`.`key` AS `key0`, `t1`.`key` AS `key1` FROM (SELECT `key` FROM `default`.`bucket_big_n15` -WHERE `key` IS NOT NULL) AS `t0` +WHERE `key` IS NOT NULL) AS `t1` INNER JOIN (SELECT `key` FROM `default`.`bucket_medium` -WHERE `key` IS NOT NULL) AS `t2` ON `t0`.`key` = `t2`.`key` +WHERE `key` IS NOT NULL) AS `t3` ON `t1`.`key` = `t3`.`key` INNER JOIN (SELECT `key` FROM `default`.`bucket_small_n15` -WHERE `key` IS NOT NULL) AS `t4` ON `t2`.`key` = `t4`.`key`, -(SELECT 0 AS `DUMMY` -FROM `default`.`bucket_medium`) AS `t5` +WHERE `key` IS NOT NULL) AS `t5` ON `t3`.`key` = `t5`.`key`) AS `t6` +WHERE `t6`.`key1` = `t6`.`key0`) AS `t8` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -175,14 +178,84 @@ STAGE PLANS: Stage: Stage-1 Spark Edges: - Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 2), Map 5 (PARTITION-LEVEL SORT, 2), Map 6 (PARTITION-LEVEL SORT, 2) - Reducer 3 <- Map 7 (PARTITION-LEVEL SORT, 1), Reducer 2 (PARTITION-LEVEL SORT, 1) - Reducer 4 <- Reducer 3 (GROUP, 1) + Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 1), Reducer 5 (PARTITION-LEVEL SORT, 1) + Reducer 3 <- Reducer 2 (GROUP, 1) + Reducer 5 <- Map 4 (PARTITION-LEVEL SORT, 2), Map 6 (PARTITION-LEVEL SORT, 2), Map 7 (PARTITION-LEVEL SORT, 2) #### A masked pattern was here #### Vertices: Map 1 Map Operator Tree: TableScan + alias: d + Statistics: Num rows: 3 Data size: 1700 Basic stats: PARTIAL Column stats: NONE + GatherStats: false + Select Operator + Statistics: Num rows: 3 Data size: 1700 Basic stats: PARTIAL Column stats: NONE + Reduce Output Operator + null sort order: + sort order: + Statistics: Num rows: 3 Data size: 1700 Basic stats: PARTIAL Column stats: NONE + tag: 0 + auto parallelism: false + Execution mode: vectorized + Path -> Alias: +#### A masked pattern was here #### + Path -> Partition: +#### A masked pattern was here #### + Partition + base file name: ds=2008-04-08 + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + partition values: + ds 2008-04-08 + properties: + bucket_count 3 + bucket_field_name key + column.name.delimiter , + columns key,value + columns.comments + columns.types string:string +#### A masked pattern was here #### + name default.bucket_medium + numFiles 3 + numRows 0 + partition_columns ds + partition_columns.types string + rawDataSize 0 + serialization.ddl struct bucket_medium { string key, string value} + serialization.format 1 + serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + totalSize 170 +#### A masked pattern was here #### + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + + input format: org.apache.hadoop.mapred.TextInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat + properties: + SORTBUCKETCOLSPREFIX TRUE + bucket_count 3 + bucket_field_name key + bucketing_version 2 + column.name.delimiter , + columns key,value + columns.comments + columns.types string:string +#### A masked pattern was here #### + name default.bucket_medium + partition_columns ds + partition_columns.types string + serialization.ddl struct bucket_medium { string key, string value} + serialization.format 1 + serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe +#### A masked pattern was here #### + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + name: default.bucket_medium + name: default.bucket_medium + Truncated Path -> Alias: + /bucket_medium/ds=2008-04-08 [$hdt$_0:d] + Map 4 + Map Operator Tree: + TableScan alias: c filterExpr: key is not null (type: boolean) Statistics: Num rows: 240 Data size: 116240 Basic stats: PARTIAL Column stats: NONE @@ -308,9 +381,9 @@ STAGE PLANS: name: default.bucket_big_n15 name: default.bucket_big_n15 Truncated Path -> Alias: - /bucket_big_n15/ds=2008-04-08 [$hdt$_0:c] - /bucket_big_n15/ds=2008-04-09 [$hdt$_0:c] - Map 5 + /bucket_big_n15/ds=2008-04-08 [$hdt$_1:$hdt$_1:$hdt$_1:c] + /bucket_big_n15/ds=2008-04-09 [$hdt$_1:$hdt$_1:$hdt$_1:c] + Map 6 Map Operator Tree: TableScan alias: b @@ -388,8 +461,8 @@ STAGE PLANS: name: default.bucket_medium name: default.bucket_medium Truncated Path -> Alias: - /bucket_medium/ds=2008-04-08 [$hdt$_1:b] - Map 6 + /bucket_medium/ds=2008-04-08 [$hdt$_1:$hdt$_1:$hdt$_2:b] + Map 7 Map Operator Tree: TableScan alias: a @@ -467,105 +540,17 @@ STAGE PLANS: name: default.bucket_small_n15 name: default.bucket_small_n15 Truncated Path -> Alias: - /bucket_small_n15/ds=2008-04-08 [$hdt$_2:a] - Map 7 - Map Operator Tree: - TableScan - alias: d - Statistics: Num rows: 3 Data size: 1700 Basic stats: PARTIAL Column stats: NONE - GatherStats: false - Select Operator - Statistics: Num rows: 3 Data size: 1700 Basic stats: PARTIAL Column stats: NONE - Reduce Output Operator - null sort order: - sort order: - Statistics: Num rows: 3 Data size: 1700 Basic stats: PARTIAL Column stats: NONE - tag: 1 - auto parallelism: false - Execution mode: vectorized - Path -> Alias: -#### A masked pattern was here #### - Path -> Partition: -#### A masked pattern was here #### - Partition - base file name: ds=2008-04-08 - input format: org.apache.hadoop.mapred.TextInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - partition values: - ds 2008-04-08 - properties: - bucket_count 3 - bucket_field_name key - column.name.delimiter , - columns key,value - columns.comments - columns.types string:string -#### A masked pattern was here #### - name default.bucket_medium - numFiles 3 - numRows 0 - partition_columns ds - partition_columns.types string - rawDataSize 0 - serialization.ddl struct bucket_medium { string key, string value} - serialization.format 1 - serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - totalSize 170 -#### A masked pattern was here #### - serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - - input format: org.apache.hadoop.mapred.TextInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat - properties: - SORTBUCKETCOLSPREFIX TRUE - bucket_count 3 - bucket_field_name key - bucketing_version 2 - column.name.delimiter , - columns key,value - columns.comments - columns.types string:string -#### A masked pattern was here #### - name default.bucket_medium - partition_columns ds - partition_columns.types string - serialization.ddl struct bucket_medium { string key, string value} - serialization.format 1 - serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe -#### A masked pattern was here #### - serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - name: default.bucket_medium - name: default.bucket_medium - Truncated Path -> Alias: - /bucket_medium/ds=2008-04-08 [$hdt$_3:d] + /bucket_small_n15/ds=2008-04-08 [$hdt$_1:$hdt$_1:$hdt$_3:a] Reducer 2 Needs Tagging: true Reduce Operator Tree: Join Operator condition map: Inner Join 0 to 1 - Inner Join 1 to 2 - keys: - 0 _col0 (type: string) - 1 _col0 (type: string) - 2 _col0 (type: string) - Statistics: Num rows: 528 Data size: 255728 Basic stats: PARTIAL Column stats: NONE - Reduce Output Operator - null sort order: - sort order: - Statistics: Num rows: 528 Data size: 255728 Basic stats: PARTIAL Column stats: NONE - tag: 0 - auto parallelism: false - Reducer 3 - Needs Tagging: true - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 keys: 0 1 - Statistics: Num rows: 1584 Data size: 1666368 Basic stats: PARTIAL Column stats: NONE + Statistics: Num rows: 792 Data size: 833184 Basic stats: PARTIAL Column stats: NONE Group By Operator aggregations: count() mode: hash @@ -578,7 +563,7 @@ STAGE PLANS: tag: -1 value expressions: _col0 (type: bigint) auto parallelism: false - Reducer 4 + Reducer 3 Execution mode: vectorized Needs Tagging: false Reduce Operator Tree: @@ -609,6 +594,35 @@ STAGE PLANS: TotalFiles: 1 GatherStats: false MultiFileSpray: false + Reducer 5 + Needs Tagging: true + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + Inner Join 1 to 2 + keys: + 0 _col0 (type: string) + 1 _col0 (type: string) + 2 _col0 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 528 Data size: 255728 Basic stats: PARTIAL Column stats: NONE + Select Operator + expressions: _col1 (type: string), _col0 (type: string) + outputColumnNames: _col1, _col2 + Statistics: Num rows: 528 Data size: 255728 Basic stats: PARTIAL Column stats: NONE + Filter Operator + isSamplingPred: false + predicate: (_col2 = _col1) (type: boolean) + Statistics: Num rows: 264 Data size: 127864 Basic stats: PARTIAL Column stats: NONE + Select Operator + Statistics: Num rows: 264 Data size: 127864 Basic stats: PARTIAL Column stats: NONE + Reduce Output Operator + null sort order: + sort order: + Statistics: Num rows: 264 Data size: 127864 Basic stats: PARTIAL Column stats: NONE + tag: 1 + auto parallelism: false Stage: Stage-0 Fetch Operator @@ -616,7 +630,7 @@ STAGE PLANS: Processor Tree: ListSink -Warning: Shuffle Join JOIN[17][tables = [$hdt$_0, $hdt$_1, $hdt$_2, $hdt$_3]] in Work 'Reducer 3' is a cross product +Warning: Shuffle Join JOIN[20][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product PREHOOK: query: select count(*) FROM bucket_small_n15 a JOIN bucket_medium b ON a.key = b.key JOIN bucket_big_n15 c ON c.key = b.key JOIN bucket_medium d ON c.key = b.key PREHOOK: type: QUERY PREHOOK: Input: default@bucket_big_n15 diff --git ql/src/test/results/clientpositive/spark/bucket_map_join_tez2.q.out ql/src/test/results/clientpositive/spark/bucket_map_join_tez2.q.out index aecb230178..c9c7c5bf1e 100644 --- ql/src/test/results/clientpositive/spark/bucket_map_join_tez2.q.out +++ ql/src/test/results/clientpositive/spark/bucket_map_join_tez2.q.out @@ -2371,6 +2371,13 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@my_dim POSTHOOK: Input: default@my_fact #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `t0`.`bucket_col`, `t2`.`join_col` AS `account1`, `t0`.`accounting_period` +FROM (SELECT `bucket_col`, `join_col`, `accounting_period` +FROM `default`.`my_fact` +WHERE `fiscal_year` = '2015' AND `accounting_period` = 10 AND `join_col` IS NOT NULL) AS `t0` +INNER JOIN (SELECT `join_col` +FROM `default`.`my_dim` +WHERE `filter_col` IN ('VAL1', 'VAL2') AND `join_col` IS NOT NULL) AS `t2` ON `t0`.`join_col` = `t2`.`join_col` STAGE DEPENDENCIES: Stage-2 is a root stage Stage-1 depends on stages: Stage-2 diff --git ql/src/test/results/clientpositive/spark/cbo_simple_select.q.out ql/src/test/results/clientpositive/spark/cbo_simple_select.q.out index acf91bf178..3aa929d13c 100644 --- ql/src/test/results/clientpositive/spark/cbo_simple_select.q.out +++ ql/src/test/results/clientpositive/spark/cbo_simple_select.q.out @@ -761,9 +761,9 @@ STAGE PLANS: Processor Tree: TableScan alias: cbo_t2 - filterExpr: (c_int = c_int) (type: boolean) + filterExpr: c_int is not null (type: boolean) Filter Operator - predicate: (c_int = c_int) (type: boolean) + predicate: c_int is not null (type: boolean) Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 @@ -821,9 +821,9 @@ STAGE PLANS: Processor Tree: TableScan alias: cbo_t2 - filterExpr: (c_int = c_int) (type: boolean) + filterExpr: c_int is not null (type: boolean) Filter Operator - predicate: (c_int = c_int) (type: boolean) + predicate: c_int is not null (type: boolean) Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 @@ -833,13 +833,11 @@ PREHOOK: query: -- c_int is not null EXPLAIN select * from cbo_t2 where (cbo_t2.c_int) IN (NULL) PREHOOK: type: QUERY PREHOOK: Input: default@cbo_t2 -PREHOOK: Input: default@cbo_t2@dt=2014 #### A masked pattern was here #### POSTHOOK: query: -- c_int is not null EXPLAIN select * from cbo_t2 where (cbo_t2.c_int) IN (NULL) POSTHOOK: type: QUERY POSTHOOK: Input: default@cbo_t2 -POSTHOOK: Input: default@cbo_t2@dt=2014 #### A masked pattern was here #### STAGE DEPENDENCIES: Stage-0 is a root stage @@ -851,11 +849,10 @@ STAGE PLANS: Processor Tree: TableScan alias: cbo_t2 - filterExpr: (c_int = null) (type: boolean) Filter Operator - predicate: (c_int = null) (type: boolean) + predicate: false (type: boolean) Select Operator - expressions: key (type: string), value (type: string), null (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) + expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 ListSink @@ -881,9 +878,9 @@ STAGE PLANS: Processor Tree: TableScan alias: cbo_t2 - filterExpr: ((c_int = c_int) or (c_int = (2 * c_int))) (type: boolean) + filterExpr: (c_int is not null or (c_int = (2 * c_int))) (type: boolean) Filter Operator - predicate: ((c_int = (2 * c_int)) or (c_int = c_int)) (type: boolean) + predicate: ((c_int = (2 * c_int)) or c_int is not null) (type: boolean) Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 @@ -911,9 +908,9 @@ STAGE PLANS: Processor Tree: TableScan alias: cbo_t2 - filterExpr: ((c_int = c_int) or (c_int = 0)) (type: boolean) + filterExpr: (c_int is not null or (c_int = 0)) (type: boolean) Filter Operator - predicate: ((c_int = 0) or (c_int = c_int)) (type: boolean) + predicate: ((c_int = 0) or c_int is not null) (type: boolean) Select Operator expressions: key (type: string), value (type: string), c_int (type: int), c_float (type: float), c_boolean (type: boolean), dt (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 diff --git ql/src/test/results/clientpositive/spark/groupby_sort_1_23.q.out ql/src/test/results/clientpositive/spark/groupby_sort_1_23.q.out index 0bd26cb7cb..3d8bf78538 100644 --- ql/src/test/results/clientpositive/spark/groupby_sort_1_23.q.out +++ ql/src/test/results/clientpositive/spark/groupby_sort_1_23.q.out @@ -2091,7 +2091,7 @@ OPTIMIZED SQL: SELECT `key`, COUNT(*) AS `$f1` FROM `default`.`t1_n80` GROUP BY `key` UNION ALL -SELECT CAST(CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) AS STRING) AS `key`, COUNT(*) AS `_o__c1` +SELECT CAST(CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) AS VARCHAR(65536)) AS `key`, COUNT(*) AS `_o__c1` FROM `default`.`t1_n80` GROUP BY CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/spark/groupby_sort_skew_1_23.q.out ql/src/test/results/clientpositive/spark/groupby_sort_skew_1_23.q.out index 62c8f16a12..a083ccbdd5 100644 --- ql/src/test/results/clientpositive/spark/groupby_sort_skew_1_23.q.out +++ ql/src/test/results/clientpositive/spark/groupby_sort_skew_1_23.q.out @@ -1576,7 +1576,7 @@ group by key + key POSTHOOK: type: QUERY POSTHOOK: Input: default@t1_n56 POSTHOOK: Output: default@outputtbl1_n13 -OPTIMIZED SQL: SELECT CAST(CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) AS STRING) AS `_o__c0`, SUM(COUNT(*)) AS `_o__c1` +OPTIMIZED SQL: SELECT CAST(CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) AS VARCHAR(65536)) AS `_o__c0`, SUM(COUNT(*)) AS `_o__c1` FROM `default`.`t1_n56` GROUP BY CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) STAGE DEPENDENCIES: @@ -2171,7 +2171,7 @@ OPTIMIZED SQL: SELECT `key`, COUNT(*) AS `$f1` FROM `default`.`t1_n56` GROUP BY `key` UNION ALL -SELECT CAST(CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) AS STRING) AS `key`, COUNT(*) AS `_o__c1` +SELECT CAST(CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) AS VARCHAR(65536)) AS `key`, COUNT(*) AS `_o__c1` FROM `default`.`t1_n56` GROUP BY CAST(`key` AS DOUBLE) + CAST(`key` AS DOUBLE) STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/spark/join_filters_overlap.q.out ql/src/test/results/clientpositive/spark/join_filters_overlap.q.out index 49226b2622..936cfd0143 100644 --- ql/src/test/results/clientpositive/spark/join_filters_overlap.q.out +++ ql/src/test/results/clientpositive/spark/join_filters_overlap.q.out @@ -18,6 +18,15 @@ POSTHOOK: query: explain extended select * from a_n4 left outer join a_n4 b on ( POSTHOOK: type: QUERY POSTHOOK: Input: default@a_n4 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `t`.`key`, `t`.`value`, `t1`.`key` AS `key1`, `t1`.`value` AS `value1`, `t3`.`key` AS `key2`, `t3`.`value` AS `value2` +FROM (SELECT `key`, `value`, `value` = 60 AS `=`, `value` = 50 AS `=3` +FROM `default`.`a_n4`) AS `t` +LEFT JOIN (SELECT `key`, CAST(50 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 50) AS `t1` ON `t`.`key` = `t1`.`key` AND `t`.`=3` +LEFT JOIN (SELECT `key`, CAST(60 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 60) AS `t3` ON `t`.`key` = `t3`.`key` AND `t`.`=` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -340,6 +349,15 @@ POSTHOOK: query: explain extended select * from a_n4 right outer join a_n4 b on POSTHOOK: type: QUERY POSTHOOK: Input: default@a_n4 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`value`, `t1`.`key` AS `key1`, `t1`.`value` AS `value1`, `t3`.`key` AS `key2`, `t3`.`value` AS `value2` +FROM (SELECT `key`, CAST(50 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 50) AS `t0` +RIGHT JOIN (SELECT `key`, `value`, `value` = 60 AS `=`, `value` = 50 AS `=3` +FROM `default`.`a_n4`) AS `t1` ON `t0`.`key` = `t1`.`key` AND `t1`.`=3` +LEFT JOIN (SELECT `key`, CAST(60 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 60) AS `t3` ON `t1`.`key` = `t3`.`key` AND `t1`.`=` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -662,6 +680,15 @@ POSTHOOK: query: explain extended select * from a_n4 right outer join a_n4 b on POSTHOOK: type: QUERY POSTHOOK: Input: default@a_n4 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `t0`.`key`, `t0`.`value`, `t1`.`key` AS `key1`, `t1`.`value` AS `value1`, `t3`.`key` AS `key2`, `t3`.`value` AS `value2` +FROM (SELECT `key`, CAST(50 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 50) AS `t0` +RIGHT JOIN (SELECT `key`, `value`, `value` = 60 AS `=`, `value` = 50 AS `=3` +FROM `default`.`a_n4`) AS `t1` ON `t0`.`key` = `t1`.`key` AND `t1`.`=3` +LEFT JOIN (SELECT `key`, CAST(60 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 60) AS `t3` ON `t1`.`key` = `t3`.`key` AND `t1`.`=` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -984,6 +1011,17 @@ POSTHOOK: query: explain extended select * from a_n4 full outer join a_n4 b on ( POSTHOOK: type: QUERY POSTHOOK: Input: default@a_n4 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `t`.`key`, `t`.`value`, `t0`.`key` AS `key1`, `t0`.`value` AS `value1`, `t2`.`key` AS `key2`, `t2`.`value` AS `value2`, `t4`.`key` AS `key3`, `t4`.`value` AS `value3` +FROM (SELECT `key`, `value`, `value` = 40 AS `=`, `value` = 50 AS `=3` +FROM `default`.`a_n4`) AS `t` +FULL JOIN (SELECT `key`, `value`, `value` = 60 AS `=`, `value` = 50 AS `=3` +FROM `default`.`a_n4`) AS `t0` ON `t`.`key` = `t0`.`key` AND `t`.`=3` AND `t0`.`=3` +LEFT JOIN (SELECT `key`, CAST(60 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 60) AS `t2` ON `t0`.`key` = `t2`.`key` AND `t0`.`=` +LEFT JOIN (SELECT `key`, CAST(40 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 40) AS `t4` ON `t`.`key` = `t4`.`key` AND `t`.`=` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1374,6 +1412,18 @@ POSTHOOK: query: explain extended select * from a_n4 left outer join a_n4 b on ( POSTHOOK: type: QUERY POSTHOOK: Input: default@a_n4 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `t`.`key`, `t`.`value`, `t1`.`key` AS `key1`, `t1`.`value` AS `value1`, `t3`.`key` AS `key2`, `t3`.`value` AS `value2`, `t5`.`key` AS `key3`, `t5`.`value` AS `value3` +FROM (SELECT `key`, `value`, `value` = 40 AS `=`, `value` = 60 AS `=3`, `value` = 50 AS `=4` +FROM `default`.`a_n4`) AS `t` +LEFT JOIN (SELECT `key`, CAST(50 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 50) AS `t1` ON `t`.`key` = `t1`.`key` AND `t`.`=4` +LEFT JOIN (SELECT `key`, CAST(60 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 60) AS `t3` ON `t`.`key` = `t3`.`key` AND `t`.`=3` +LEFT JOIN (SELECT `key`, CAST(40 AS INTEGER) AS `value` +FROM `default`.`a_n4` +WHERE `value` = 40) AS `t5` ON `t`.`key` = `t5`.`key` AND `t`.`=` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 diff --git ql/src/test/results/clientpositive/spark/list_bucket_dml_2.q.out ql/src/test/results/clientpositive/spark/list_bucket_dml_2.q.out index 212b16327a..84281098f0 100644 --- ql/src/test/results/clientpositive/spark/list_bucket_dml_2.q.out +++ ql/src/test/results/clientpositive/spark/list_bucket_dml_2.q.out @@ -321,7 +321,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@list_bucketing_static_part_n4 POSTHOOK: Input: default@list_bucketing_static_part_n4@ds=2008-04-08/hr=11 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('484' AS STRING) AS `$f0`, CAST('val_484' AS STRING) AS `$f1`, CAST('2008-04-08' AS STRING) AS `$f2`, CAST('11' AS STRING) AS `$f3` +OPTIMIZED SQL: SELECT CAST('484' AS VARCHAR(65536)) AS `$f0`, CAST('val_484' AS VARCHAR(65536)) AS `$f1`, CAST('2008-04-08' AS VARCHAR(65536)) AS `$f2`, CAST('11' AS VARCHAR(65536)) AS `$f3` FROM `default`.`list_bucketing_static_part_n4` WHERE `ds` = '2008-04-08' AND `hr` = '11' AND `key` = '484' AND `value` = 'val_484' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/spark/parquet_vectorization_0.q.out ql/src/test/results/clientpositive/spark/parquet_vectorization_0.q.out index 1232957610..c950e5b73f 100644 --- ql/src/test/results/clientpositive/spark/parquet_vectorization_0.q.out +++ ql/src/test/results/clientpositive/spark/parquet_vectorization_0.q.out @@ -30593,6 +30593,9 @@ POSTHOOK: query: explain extended select * from alltypesparquet where POSTHOOK: type: QUERY POSTHOOK: Input: default@alltypesparquet #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `ctinyint`, `csmallint`, `cint`, `cbigint`, `cfloat`, `cdouble`, `cstring1`, `cstring2`, `ctimestamp1`, `ctimestamp2`, `cboolean1`, `cboolean2` +FROM `default`.`alltypesparquet` +WHERE ROW(`cint`, `cfloat`) IN (ROW(49, 3.5), ROW(47, 2.09), ROW(45, 3.02)) STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -30835,6 +30838,11 @@ POSTHOOK: query: explain extended select count(*),cstring1 from alltypesparquet POSTHOOK: type: QUERY POSTHOOK: Input: default@alltypesparquet #### A masked pattern was here #### +OPTIMIZED SQL: SELECT COUNT(*) AS `_o__c0`, `cstring1` +FROM `default`.`alltypesparquet` +WHERE `cstring1` IN ('biology', 'history', 'topology') +GROUP BY `cstring1` +ORDER BY `cstring1` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 diff --git ql/src/test/results/clientpositive/spark/parquet_vectorization_5.q.out ql/src/test/results/clientpositive/spark/parquet_vectorization_5.q.out index d40baf56a6..1f2db4e58c 100644 --- ql/src/test/results/clientpositive/spark/parquet_vectorization_5.q.out +++ ql/src/test/results/clientpositive/spark/parquet_vectorization_5.q.out @@ -61,7 +61,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesparquet - filterExpr: ((cboolean2 is not null and (cstring1 like '%b%')) or ((UDFToDouble(ctinyint) = cdouble) and ctimestamp2 is not null and (cstring2 like 'a'))) (type: boolean) + filterExpr: (((cstring1 like '%b%') and cboolean2 is not null) or ((UDFToDouble(ctinyint) = cdouble) and (cstring2 like 'a') and ctimestamp2 is not null)) (type: boolean) Statistics: Num rows: 12288 Data size: 147456 Basic stats: COMPLETE Column stats: NONE TableScan Vectorization: native: true @@ -69,8 +69,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: SelectColumnIsNotNull(col 11:boolean), FilterStringColLikeStringScalar(col 6:string, pattern %b%)), FilterExprAndExpr(children: FilterDoubleColEqualDoubleColumn(col 13:double, col 5:double)(children: CastLongToDouble(col 0:tinyint) -> 13:double), SelectColumnIsNotNull(col 9:timestamp), FilterStringColLikeStringScalar(col 7:string, pattern a))) - predicate: (((UDFToDouble(ctinyint) = cdouble) and ctimestamp2 is not null and (cstring2 like 'a')) or (cboolean2 is not null and (cstring1 like '%b%'))) (type: boolean) + predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: FilterStringColLikeStringScalar(col 6:string, pattern %b%), SelectColumnIsNotNull(col 11:boolean)), FilterExprAndExpr(children: FilterDoubleColEqualDoubleColumn(col 13:double, col 5:double)(children: CastLongToDouble(col 0:tinyint) -> 13:double), FilterStringColLikeStringScalar(col 7:string, pattern a), SelectColumnIsNotNull(col 9:timestamp))) + predicate: (((UDFToDouble(ctinyint) = cdouble) and (cstring2 like 'a') and ctimestamp2 is not null) or ((cstring1 like '%b%') and cboolean2 is not null)) (type: boolean) Statistics: Num rows: 9216 Data size: 110592 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int) diff --git ql/src/test/results/clientpositive/spark/parquet_vectorization_8.q.out ql/src/test/results/clientpositive/spark/parquet_vectorization_8.q.out index 31f1d4943e..617aeb5950 100644 --- ql/src/test/results/clientpositive/spark/parquet_vectorization_8.q.out +++ ql/src/test/results/clientpositive/spark/parquet_vectorization_8.q.out @@ -71,7 +71,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesparquet - filterExpr: ((cstring2 is not null and (UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D)) or (cfloat < -6432.0) or (cboolean1 is not null and (cdouble = 988888.0D))) (type: boolean) + filterExpr: (((UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D) and cstring2 is not null) or (cfloat < -6432.0) or ((cdouble = 988888.0D) and cboolean1 is not null)) (type: boolean) Statistics: Num rows: 12288 Data size: 147456 Basic stats: COMPLETE Column stats: NONE TableScan Vectorization: native: true @@ -79,8 +79,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: SelectColumnIsNotNull(col 7:string), FilterDoubleColLessEqualDoubleScalar(col 13:double, val 10.0)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 16.0)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: SelectColumnIsNotNull(col 10:boolean), FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0))) - predicate: ((cboolean1 is not null and (cdouble = 988888.0D)) or (cfloat < -6432.0) or (cstring2 is not null and (UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D))) (type: boolean) + predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: FilterDoubleColLessEqualDoubleScalar(col 13:double, val 10.0)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 16.0)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double), SelectColumnIsNotNull(col 7:string)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0), SelectColumnIsNotNull(col 10:boolean))) + predicate: (((UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D) and cstring2 is not null) or ((cdouble = 988888.0D) and cboolean1 is not null) or (cfloat < -6432.0)) (type: boolean) Statistics: Num rows: 12288 Data size: 147456 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctimestamp1 (type: timestamp), cdouble (type: double), cboolean1 (type: boolean), cstring1 (type: string), cfloat (type: float), (- cdouble) (type: double), (-5638.15D - cdouble) (type: double), (cdouble * -257.0D) (type: double), (UDFToFloat(cint) + cfloat) (type: float), ((- cdouble) + UDFToDouble(cbigint)) (type: double), (- cdouble) (type: double), (-1.389 - cfloat) (type: float), (- cfloat) (type: float), ((-5638.15D - cdouble) + UDFToDouble((UDFToFloat(cint) + cfloat))) (type: double) @@ -295,7 +295,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesparquet - filterExpr: ((cstring2 is not null and (UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D)) or (cfloat < -6432.0) or (cboolean1 is not null and (cdouble = 988888.0D))) (type: boolean) + filterExpr: (((UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D) and cstring2 is not null) or (cfloat < -6432.0) or ((cdouble = 988888.0D) and cboolean1 is not null)) (type: boolean) Statistics: Num rows: 12288 Data size: 147456 Basic stats: COMPLETE Column stats: NONE TableScan Vectorization: native: true @@ -303,8 +303,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: SelectColumnIsNotNull(col 7:string), FilterDoubleColLessEqualDoubleScalar(col 13:double, val 12.503)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 11.998)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: SelectColumnIsNotNull(col 10:boolean), FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0))) - predicate: ((cboolean1 is not null and (cdouble = 988888.0D)) or (cfloat < -6432.0) or (cstring2 is not null and (UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D))) (type: boolean) + predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: FilterDoubleColLessEqualDoubleScalar(col 13:double, val 12.503)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 11.998)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double), SelectColumnIsNotNull(col 7:string)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0), SelectColumnIsNotNull(col 10:boolean))) + predicate: (((UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D) and cstring2 is not null) or ((cdouble = 988888.0D) and cboolean1 is not null) or (cfloat < -6432.0)) (type: boolean) Statistics: Num rows: 12288 Data size: 147456 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctimestamp1 (type: timestamp), cdouble (type: double), cboolean1 (type: boolean), cstring1 (type: string), cfloat (type: float), (- cdouble) (type: double), (-5638.15D - cdouble) (type: double), (cdouble * -257.0D) (type: double), (UDFToFloat(cint) + cfloat) (type: float), ((- cdouble) + UDFToDouble(cbigint)) (type: double), (- cdouble) (type: double), (-1.389 - cfloat) (type: float), (- cfloat) (type: float), ((-5638.15D - cdouble) + UDFToDouble((UDFToFloat(cint) + cfloat))) (type: double) diff --git ql/src/test/results/clientpositive/spark/pcr.q.out ql/src/test/results/clientpositive/spark/pcr.q.out index 2c5b15aa3a..d61ab004b8 100644 --- ql/src/test/results/clientpositive/spark/pcr.q.out +++ ql/src/test/results/clientpositive/spark/pcr.q.out @@ -1564,6 +1564,11 @@ POSTHOOK: Input: default@pcr_t1 POSTHOOK: Input: default@pcr_t1@ds=2000-04-08 POSTHOOK: Input: default@pcr_t1@ds=2000-04-09 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT CAST(14 AS INTEGER) AS `key`, `value` +FROM (SELECT `value` +FROM `default`.`pcr_t1` +WHERE `ds` IN ('2000-04-08', '2000-04-09') AND `key` = 14 +ORDER BY `value`) AS `t1` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1761,6 +1766,10 @@ POSTHOOK: Input: default@pcr_t1 POSTHOOK: Input: default@pcr_t1@ds=2000-04-08 POSTHOOK: Input: default@pcr_t1@ds=2000-04-09 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value` +FROM `default`.`pcr_t1` +WHERE `ds` IN ('2000-04-08', '2000-04-09') +ORDER BY `key`, `value` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -1998,7 +2007,7 @@ POSTHOOK: Input: default@pcr_t1@ds=2000-04-10 #### A masked pattern was here #### OPTIMIZED SQL: SELECT `key`, `value` FROM `default`.`pcr_t1` -WHERE `ds` >= '2000-04-08' OR `ds` IS NOT NULL +WHERE `ds` >= '2000-04-08' OR `ds` < '2000-04-10' ORDER BY `key`, `value` STAGE DEPENDENCIES: Stage-1 is a root stage @@ -2015,7 +2024,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: pcr_t1 - filterExpr: ((ds >= '2000-04-08') or ds is not null) (type: boolean) + filterExpr: ((ds >= '2000-04-08') or (ds < '2000-04-10')) (type: boolean) Statistics: Num rows: 60 Data size: 480 Basic stats: COMPLETE Column stats: NONE GatherStats: false Select Operator @@ -2304,6 +2313,10 @@ POSTHOOK: Input: default@pcr_t1 POSTHOOK: Input: default@pcr_t1@ds=2000-04-08 POSTHOOK: Input: default@pcr_t1@ds=2000-04-09 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, `ds` +FROM `default`.`pcr_t1` +WHERE ROW(`key`, `ds`) IN (ROW(1, '2000-04-08'), ROW(2, '2000-04-09')) +ORDER BY `key`, `value`, `ds` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -2500,7 +2513,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@pcr_t1 POSTHOOK: Input: default@pcr_t1@ds=2000-04-08 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS STRING) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-08' AS STRING) AS `ds1` +OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds1` FROM (SELECT * FROM (SELECT `key`, `value` FROM `default`.`pcr_t1` @@ -2793,7 +2806,7 @@ POSTHOOK: Input: default@pcr_t1 POSTHOOK: Input: default@pcr_t1@ds=2000-04-08 POSTHOOK: Input: default@pcr_t1@ds=2000-04-09 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS STRING) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-09' AS STRING) AS `ds1` +OPTIMIZED SQL: SELECT `t3`.`key`, `t3`.`value`, CAST('2000-04-08' AS VARCHAR(65536)) AS `ds`, `t3`.`key0` AS `key1`, `t3`.`value0` AS `value1`, CAST('2000-04-09' AS VARCHAR(65536)) AS `ds1` FROM (SELECT * FROM (SELECT `key`, `value` FROM `default`.`pcr_t1` @@ -4418,6 +4431,11 @@ POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=12 #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `key`, `value`, CAST('2008-04-08' AS VARCHAR(65536)) AS `ds`, `hr` +FROM (SELECT `key`, `value`, `hr` +FROM `default`.`srcpart` +WHERE `hr` IN ('11', '12') AND `ds` = '2008-04-08' AND `key` = 11 +ORDER BY `key`, `hr`) AS `t1` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -4620,7 +4638,7 @@ POSTHOOK: Input: default@srcpart POSTHOOK: Input: default@srcpart@ds=2008-04-08/hr=11 POSTHOOK: Input: default@srcpart@ds=2008-04-09/hr=11 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT `key`, `value`, `ds`, CAST('11' AS STRING) AS `hr` +OPTIMIZED SQL: SELECT `key`, `value`, `ds`, CAST('11' AS VARCHAR(65536)) AS `hr` FROM (SELECT `key`, `value`, `ds` FROM `default`.`srcpart` WHERE `hr` = '11' AND `key` = 11 diff --git ql/src/test/results/clientpositive/spark/ppd_join_filter.q.out ql/src/test/results/clientpositive/spark/ppd_join_filter.q.out index c3bc6f4cb0..d5dd730e3b 100644 --- ql/src/test/results/clientpositive/spark/ppd_join_filter.q.out +++ ql/src/test/results/clientpositive/spark/ppd_join_filter.q.out @@ -36,7 +36,7 @@ INNER JOIN (SELECT `key`, CAST(MIN(`key`) AS DOUBLE) + CAST(2 AS DOUBLE) AS `k2` FROM `default`.`src` WHERE `key` IS NOT NULL GROUP BY `key` -HAVING CAST(MIN(`key`) AS DOUBLE) + 1 < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` +HAVING CAST(MIN(`key`) AS DOUBLE) + CAST(1 AS DOUBLE) < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -349,7 +349,7 @@ INNER JOIN (SELECT `key`, CAST(MIN(`key`) AS DOUBLE) + CAST(2 AS DOUBLE) AS `k2` FROM `default`.`src` WHERE `key` IS NOT NULL GROUP BY `key` -HAVING CAST(MIN(`key`) AS DOUBLE) + 1 < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` +HAVING CAST(MIN(`key`) AS DOUBLE) + CAST(1 AS DOUBLE) < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -662,7 +662,7 @@ INNER JOIN (SELECT `key`, CAST(MIN(`key`) AS DOUBLE) + CAST(2 AS DOUBLE) AS `k2` FROM `default`.`src` WHERE `key` IS NOT NULL GROUP BY `key` -HAVING CAST(MIN(`key`) AS DOUBLE) + 1 < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` +HAVING CAST(MIN(`key`) AS DOUBLE) + CAST(1 AS DOUBLE) < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -973,7 +973,7 @@ INNER JOIN (SELECT `key`, CAST(MIN(`key`) AS DOUBLE) + CAST(2 AS DOUBLE) AS `k2` FROM `default`.`src` WHERE `key` IS NOT NULL GROUP BY `key` -HAVING CAST(MIN(`key`) AS DOUBLE) + 1 < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` +HAVING CAST(MIN(`key`) AS DOUBLE) + CAST(1 AS DOUBLE) < 5.0) AS `t4` ON `t0`.`key` = `t4`.`key` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 diff --git ql/src/test/results/clientpositive/spark/spark_dynamic_partition_pruning.q.out ql/src/test/results/clientpositive/spark/spark_dynamic_partition_pruning.q.out index 5f06e4e832..3588a9a380 100644 --- ql/src/test/results/clientpositive/spark/spark_dynamic_partition_pruning.q.out +++ ql/src/test/results/clientpositive/spark/spark_dynamic_partition_pruning.q.out @@ -792,13 +792,13 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_n4 - filterExpr: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) is not null) (type: boolean) + filterExpr: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) is not null) (type: boolean) + predicate: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) (type: bigint) + expressions: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) (type: bigint) outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator @@ -811,7 +811,7 @@ STAGE PLANS: outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Spark Partition Pruning Sink Operator - Target Columns: [Map 1 -> [ds:string (abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)))]] + Target Columns: [Map 1 -> [ds:string (abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)))]] Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Stage: Stage-1 @@ -825,13 +825,13 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart - filterExpr: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) is not null (type: boolean) + filterExpr: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) is not null (type: boolean) Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) is not null (type: boolean) + predicate: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) is not null (type: boolean) Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) (type: bigint) + expressions: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) (type: bigint) outputColumnNames: _col0 Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -843,13 +843,13 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_n4 - filterExpr: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) is not null) (type: boolean) + filterExpr: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) is not null) (type: boolean) + predicate: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) (type: bigint) + expressions: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) (type: bigint) outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator diff --git ql/src/test/results/clientpositive/spark/spark_explainuser_1.q.out ql/src/test/results/clientpositive/spark/spark_explainuser_1.q.out index 0422dc21f4..70ee23744c 100644 --- ql/src/test/results/clientpositive/spark/spark_explainuser_1.q.out +++ ql/src/test/results/clientpositive/spark/spark_explainuser_1.q.out @@ -1807,7 +1807,7 @@ Stage-0 Group By Operator [GBY_3] (rows=1 width=101) Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(c_int)"],keys:key, c_int, c_float Filter Operator [FIL_35] (rows=1 width=93) - predicate:((((c_int + 1) + 1) >= 0) and (((c_int + 1) > 0) or (UDFToDouble(key) >= 0.0D)) and ((UDFToFloat(c_int) + c_float) >= 0) and ((c_int + 1) >= 0) and ((c_int > 0) or c_float is not null) and ((c_int >= 1) or (c_float >= 1.0)) and (UDFToDouble(key) > 0.0D) and (c_float > 0.0)) + predicate:((((c_int + 1) + 1) >= 0) and ((UDFToFloat(c_int) + c_float) >= 0) and ((c_int + 1) >= 0) and ((c_int > 0) or c_float is not null) and ((c_int >= 1) or (c_float >= 1.0)) and (UDFToDouble(key) > 0.0D) and (c_float > 0.0)) TableScan [TS_0] (rows=20 width=88) default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] <-Reducer 7 [PARTITION-LEVEL SORT] @@ -2511,7 +2511,7 @@ Stage-0 Select Operator [SEL_24] (rows=631 width=178) Output:["_col0","_col1"] Filter Operator [FIL_23] (rows=631 width=194) - predicate:((_col2 = 0L) or (_col5 is null and _col0 is not null and (_col3 >= _col2))) + predicate:(((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col0 is null) and (_col0 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) Select Operator [SEL_22] (rows=631 width=194) Output:["_col0","_col1","_col2","_col3","_col5"] Join Operator [JOIN_21] (rows=631 width=194) @@ -2590,10 +2590,10 @@ Stage-0 Stage-1 Reducer 3 File Output Operator [FS_24] - Select Operator [SEL_23] (rows=20 width=223) + Select Operator [SEL_23] (rows=41 width=223) Output:["_col0","_col1","_col2"] - Filter Operator [FIL_22] (rows=20 width=230) - predicate:CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END + Filter Operator [FIL_22] (rows=41 width=229) + predicate:(((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col0 is null) and (_col0 is not null or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) Join Operator [JOIN_21] (rows=41 width=229) Output:["_col0","_col1","_col2","_col4","_col5","_col8"],condition map:[{"":"{\"type\":\"Left Outer\",\"left\":0,\"right\":1}"}],keys:{"0":"_col0, _col1","1":"_col0, _col1"} <-Reducer 2 [PARTITION-LEVEL SORT] @@ -2685,7 +2685,7 @@ Stage-0 Select Operator [SEL_29] (rows=27 width=125) Output:["_col0","_col1"] Filter Operator [FIL_28] (rows=27 width=141) - predicate:((_col2 = 0L) or (_col5 is null and _col1 is not null and (_col3 >= _col2))) + predicate:(((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col1 is null) and (_col1 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) Select Operator [SEL_27] (rows=27 width=141) Output:["_col0","_col1","_col2","_col3","_col5"] Join Operator [JOIN_26] (rows=27 width=141) @@ -2767,14 +2767,14 @@ Stage-0 Stage-1 Reducer 5 File Output Operator [FS_36] - Select Operator [SEL_35] (rows=3 width=106) + Select Operator [SEL_35] (rows=7 width=106) Output:["_col0","_col1"] <-Reducer 4 [SORT] SORT [RS_34] - Select Operator [SEL_33] (rows=3 width=106) + Select Operator [SEL_33] (rows=7 width=106) Output:["_col0","_col1"] - Filter Operator [FIL_32] (rows=3 width=118) - predicate:CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END + Filter Operator [FIL_32] (rows=7 width=114) + predicate:(((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col0 is null) and (_col0 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) Join Operator [JOIN_31] (rows=7 width=114) Output:["_col0","_col1","_col3","_col4","_col7"],condition map:[{"":"{\"type\":\"Left Outer\",\"left\":0,\"right\":1}"}],keys:{"0":"_col0, _col1","1":"_col0, _col1"} <-Reducer 10 [PARTITION-LEVEL SORT] diff --git ql/src/test/results/clientpositive/spark/spark_vectorized_dynamic_partition_pruning.q.out ql/src/test/results/clientpositive/spark/spark_vectorized_dynamic_partition_pruning.q.out index 6fbab4641d..07575be56a 100644 --- ql/src/test/results/clientpositive/spark/spark_vectorized_dynamic_partition_pruning.q.out +++ ql/src/test/results/clientpositive/spark/spark_vectorized_dynamic_partition_pruning.q.out @@ -1321,7 +1321,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_n0 - filterExpr: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) is not null) (type: boolean) + filterExpr: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE TableScan Vectorization: native: true @@ -1331,10 +1331,10 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: FilterExprAndExpr(children: FilterStringGroupColEqualStringScalar(col 1:string, val 2008-04-08), SelectColumnIsNotNull(col 10:bigint)(children: FuncAbsLongToLong(col 9:bigint)(children: LongColAddLongScalar(col 8:bigint, val 10)(children: LongColUnaryMinus(col 7:bigint)(children: CastStringToLong(col 6:string)(children: StringGroupColConcatStringScalar(col 5:string, val 0)(children: CastLongToString(col 4:int)(children: VectorUDFDayOfMonthDate(col 3, field DAY_OF_MONTH)(children: CastStringToDate(col 0:string) -> 3:date) -> 4:int) -> 5:string) -> 6:string) -> 7:bigint) -> 8:bigint) -> 9:bigint) -> 10:bigint)) - predicate: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) is not null) (type: boolean) + predicate: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) (type: bigint) + expressions: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) (type: bigint) outputColumnNames: _col0 Select Vectorization: className: VectorSelectOperator @@ -1363,7 +1363,7 @@ STAGE PLANS: outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Spark Partition Pruning Sink Operator - Target Columns: [Map 1 -> [ds:string (abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)))]] + Target Columns: [Map 1 -> [ds:string (abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)))]] Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Execution mode: vectorized Map Vectorization: @@ -1393,7 +1393,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart - filterExpr: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) is not null (type: boolean) + filterExpr: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) is not null (type: boolean) Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE TableScan Vectorization: native: true @@ -1403,10 +1403,10 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: SelectColumnIsNotNull(col 12:bigint)(children: FuncAbsLongToLong(col 11:bigint)(children: LongColAddLongScalar(col 10:bigint, val 10)(children: LongColUnaryMinus(col 9:bigint)(children: CastStringToLong(col 8:string)(children: StringGroupColConcatStringScalar(col 7:string, val 0)(children: CastLongToString(col 6:int)(children: VectorUDFDayOfMonthDate(col 5, field DAY_OF_MONTH)(children: CastStringToDate(col 2:string) -> 5:date) -> 6:int) -> 7:string) -> 8:string) -> 9:bigint) -> 10:bigint) -> 11:bigint) -> 12:bigint) - predicate: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) is not null (type: boolean) + predicate: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) is not null (type: boolean) Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) (type: bigint) + expressions: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) (type: bigint) outputColumnNames: _col0 Select Vectorization: className: VectorSelectOperator @@ -1445,7 +1445,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_n0 - filterExpr: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) is not null) (type: boolean) + filterExpr: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE TableScan Vectorization: native: true @@ -1455,10 +1455,10 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: FilterExprAndExpr(children: FilterStringGroupColEqualStringScalar(col 1:string, val 2008-04-08), SelectColumnIsNotNull(col 10:bigint)(children: FuncAbsLongToLong(col 9:bigint)(children: LongColAddLongScalar(col 8:bigint, val 10)(children: LongColUnaryMinus(col 7:bigint)(children: CastStringToLong(col 6:string)(children: StringGroupColConcatStringScalar(col 5:string, val 0)(children: CastLongToString(col 4:int)(children: VectorUDFDayOfMonthDate(col 3, field DAY_OF_MONTH)(children: CastStringToDate(col 0:string) -> 3:date) -> 4:int) -> 5:string) -> 6:string) -> 7:bigint) -> 8:bigint) -> 9:bigint) -> 10:bigint)) - predicate: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) is not null) (type: boolean) + predicate: ((date = '2008-04-08') and abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10)) (type: bigint) + expressions: abs(((- UDFToLong(concat(CAST( day(CAST( ds AS DATE)) AS STRING), '0'))) + 10L)) (type: bigint) outputColumnNames: _col0 Select Vectorization: className: VectorSelectOperator diff --git ql/src/test/results/clientpositive/spark/subquery_in.q.out ql/src/test/results/clientpositive/spark/subquery_in.q.out index 09cd9d8550..3d0da817bf 100644 --- ql/src/test/results/clientpositive/spark/subquery_in.q.out +++ ql/src/test/results/clientpositive/spark/subquery_in.q.out @@ -2075,9 +2075,7 @@ STAGE PLANS: Stage: Stage-1 Spark Edges: - Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 2), Reducer 4 (PARTITION-LEVEL SORT, 2) - Reducer 4 <- Map 3 (PARTITION-LEVEL SORT, 2), Reducer 6 (PARTITION-LEVEL SORT, 2) - Reducer 6 <- Map 5 (GROUP, 2) + Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 2), Map 3 (PARTITION-LEVEL SORT, 2) #### A masked pattern was here #### Vertices: Map 1 @@ -2104,41 +2102,25 @@ STAGE PLANS: Map Operator Tree: TableScan alias: p - filterExpr: (p_size is not null and p_partkey is not null and p_name is not null) (type: boolean) + filterExpr: (((p_size + 121150) = p_partkey) and p_size is not null and p_name is not null) (type: boolean) Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (p_name is not null and p_partkey is not null and p_size is not null) (type: boolean) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + predicate: (((p_size + 121150) = p_partkey) and p_name is not null and p_size is not null) (type: boolean) + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: p_partkey (type: int), p_name (type: string), p_size (type: int) - outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col2 (type: int), _col0 (type: int) - sort order: ++ - Map-reduce partition columns: _col2 (type: int), _col0 (type: int) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: string) - Execution mode: vectorized - Map 5 - Map Operator Tree: - TableScan - alias: part - filterExpr: p_size is not null (type: boolean) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: p_size is not null (type: boolean) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: p_size (type: int) - mode: hash - outputColumnNames: _col0 - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: int) - sort order: + - Map-reduce partition columns: _col0 (type: int) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + expressions: p_name (type: string), p_size (type: int) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: string), _col1 (type: int) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int) + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE Execution mode: vectorized Reducer 2 Reduce Operator Tree: @@ -2149,55 +2131,14 @@ STAGE PLANS: 0 _col1 (type: string), _col5 (type: int) 1 _col0 (type: string), _col1 (type: int) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - Reducer 4 - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - keys: - 0 _col2 (type: int), _col0 (type: int) - 1 _col0 (type: int), _col1 (type: int) - outputColumnNames: _col1, _col3 - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: _col1 (type: string), _col3 (type: int) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: _col0 (type: string), _col1 (type: int) - mode: hash - outputColumnNames: _col0, _col1 - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: int) - sort order: ++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: int) - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE - Reducer 6 - Execution mode: vectorized - Reduce Operator Tree: - Group By Operator - keys: KEY._col0 (type: int) - mode: mergepartial - outputColumnNames: _col0 - Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: _col0 (type: int), (_col0 + 121150) (type: int) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: int), _col1 (type: int) - sort order: ++ - Map-reduce partition columns: _col0 (type: int), _col1 (type: int) - Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE Stage: Stage-0 Fetch Operator @@ -4905,15 +4846,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col14 Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col10 = 0L)) THEN (true) WHEN (_col10 is null) THEN (true) WHEN (_col14 is not null) THEN (false) WHEN (_col5 is null) THEN (null) WHEN ((_col11 < _col10)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 7 Data size: 865 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col11 < _col10) is not true or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null or _col5 is null) and (_col14 is null or ((_col10 = 0L) or _col10 is null) is true) and (_col5 is not null or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null)) (type: boolean) + Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 7 Data size: 865 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 7 Data size: 865 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -5151,15 +5092,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col14 Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col10 = 0L)) THEN (true) WHEN (_col10 is null) THEN (true) WHEN (_col14 is not null) THEN (false) WHEN (_col5 is null) THEN (null) WHEN ((_col11 < _col10)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 7 Data size: 865 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col11 < _col10) is not true or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null or _col5 is null) and (_col14 is null or ((_col10 = 0L) or _col10 is null) is true) and (_col5 is not null or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null)) (type: boolean) + Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 7 Data size: 865 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 7 Data size: 865 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git ql/src/test/results/clientpositive/spark/subquery_multi.q.out ql/src/test/results/clientpositive/spark/subquery_multi.q.out index 5bf5459b56..5c77e9c8d3 100644 --- ql/src/test/results/clientpositive/spark/subquery_multi.q.out +++ ql/src/test/results/clientpositive/spark/subquery_multi.q.out @@ -399,7 +399,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col13 Statistics: Num rows: 1 Data size: 39397 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col10 = 0L) or (_col13 is null and _col3 is not null and (_col11 >= _col10))) (type: boolean) + predicate: (((_col11 >= _col10) or (_col10 = 0L) or _col13 is not null or _col3 is null) and (_col13 is null or (_col10 = 0L)) and (_col3 is not null or (_col10 = 0L) or _col13 is not null)) (type: boolean) Statistics: Num rows: 1 Data size: 39397 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) @@ -621,7 +621,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col13 Statistics: Num rows: 1 Data size: 39397 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col10 = 0L) or (_col13 is null and _col3 is not null and (_col11 >= _col10))) (type: boolean) + predicate: (((_col11 >= _col10) or (_col10 = 0L) or _col13 is not null or _col3 is null) and (_col13 is null or (_col10 = 0L)) and (_col3 is not null or (_col10 = 0L) or _col13 is not null)) (type: boolean) Statistics: Num rows: 1 Data size: 39397 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) @@ -842,15 +842,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col13 Statistics: Num rows: 2 Data size: 71632 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col10 = 0L) or (_col13 is null and (_col11 >= _col10))) (type: boolean) - Statistics: Num rows: 1 Data size: 35816 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col11 >= _col10) or (_col10 = 0L) or _col13 is not null or _col3 is null) and (_col13 is null or (_col10 = 0L))) (type: boolean) + Statistics: Num rows: 2 Data size: 71632 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 1 Data size: 35816 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2 Data size: 71632 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 35816 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2 Data size: 71632 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -1067,7 +1067,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 1 Data size: 35833 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: ((_col12 is null and _col1 is not null and (_col10 >= _col9)) or (_col9 = 0L)) (type: boolean) + predicate: (((_col10 >= _col9) or (_col9 = 0L) or _col12 is not null or _col1 is null) and (_col1 is not null or (_col9 = 0L) or _col12 is not null) and (_col12 is null or (_col9 = 0L))) (type: boolean) Statistics: Num rows: 1 Data size: 35833 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) @@ -1725,12 +1725,16 @@ STAGE PLANS: Stage: Stage-1 Spark Edges: - Reducer 11 <- Map 10 (PARTITION-LEVEL SORT, 2), Map 13 (PARTITION-LEVEL SORT, 2) - Reducer 12 <- Reducer 11 (GROUP, 2) + Reducer 10 <- Map 9 (PARTITION-LEVEL SORT, 2), Reducer 12 (PARTITION-LEVEL SORT, 2) + Reducer 12 <- Map 11 (GROUP, 2) + Reducer 14 <- Map 13 (PARTITION-LEVEL SORT, 2), Reducer 17 (PARTITION-LEVEL SORT, 2) + Reducer 15 <- Reducer 14 (GROUP, 2) + Reducer 17 <- Map 16 (PARTITION-LEVEL SORT, 2), Reducer 19 (PARTITION-LEVEL SORT, 2) + Reducer 19 <- Map 11 (GROUP, 2) Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 2), Map 5 (PARTITION-LEVEL SORT, 2) Reducer 3 <- Reducer 2 (PARTITION-LEVEL SORT, 2), Reducer 8 (PARTITION-LEVEL SORT, 2) - Reducer 4 <- Reducer 12 (PARTITION-LEVEL SORT, 2), Reducer 3 (PARTITION-LEVEL SORT, 2) - Reducer 7 <- Map 6 (PARTITION-LEVEL SORT, 2), Map 9 (PARTITION-LEVEL SORT, 2) + Reducer 4 <- Reducer 15 (PARTITION-LEVEL SORT, 2), Reducer 3 (PARTITION-LEVEL SORT, 2) + Reducer 7 <- Map 6 (PARTITION-LEVEL SORT, 2), Reducer 10 (PARTITION-LEVEL SORT, 2) Reducer 8 <- Reducer 7 (GROUP, 2) #### A masked pattern was here #### Vertices: @@ -1754,7 +1758,27 @@ STAGE PLANS: Statistics: Num rows: 1 Data size: 32560 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: int), _col2 (type: string), _col3 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) Execution mode: vectorized - Map 10 + Map 11 + Map Operator Tree: + TableScan + alias: part + filterExpr: p_type is not null (type: boolean) + Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: p_type is not null (type: boolean) + Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: p_type (type: string) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + Execution mode: vectorized + Map 13 Map Operator Tree: TableScan alias: part @@ -1774,7 +1798,7 @@ STAGE PLANS: Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE value expressions: _col2 (type: string) Execution mode: vectorized - Map 13 + Map 16 Map Operator Tree: TableScan alias: pp @@ -1784,19 +1808,15 @@ STAGE PLANS: predicate: (p_brand is not null and p_type is not null) (type: boolean) Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: p_type (type: string), p_brand (type: string) + expressions: p_brand (type: string), p_type (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: _col0 (type: string), _col1 (type: string) - mode: hash - outputColumnNames: _col0, _col1 + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string) - sort order: ++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string) Execution mode: vectorized Map 5 Map Operator Tree: @@ -1852,21 +1872,54 @@ STAGE PLANS: predicate: (p_brand is not null and p_type is not null) (type: boolean) Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: p_type (type: string), p_brand (type: string) + expressions: p_brand (type: string), p_type (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: _col0 (type: string), _col1 (type: string) - mode: hash - outputColumnNames: _col0, _col1 + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string) - sort order: ++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string) Execution mode: vectorized - Reducer 11 + Reducer 10 + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col0, _col2 + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col2 (type: string), _col0 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: string), _col1 (type: string) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string) + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Reducer 12 + Execution mode: vectorized + Reduce Operator Tree: + Group By Operator + keys: KEY._col0 (type: string) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + Reducer 14 Reduce Operator Tree: Join Operator condition map: @@ -1875,35 +1928,72 @@ STAGE PLANS: 0 _col1 (type: string), _col0 (type: string) 1 _col0 (type: string), _col1 (type: string) outputColumnNames: _col1, _col2 - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Group By Operator keys: _col2 (type: string), _col1 (type: string) mode: hash outputColumnNames: _col0, _col1 - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: string) sort order: ++ Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE - Reducer 12 + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE + Reducer 15 Execution mode: vectorized Reduce Operator Tree: Group By Operator keys: KEY._col0 (type: string), KEY._col1 (type: string) mode: mergepartial outputColumnNames: _col0, _col1 - Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string), _col1 (type: string), true (type: boolean) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: string) sort order: ++ Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE value expressions: _col2 (type: boolean) + Reducer 17 + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col0, _col2 + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col2 (type: string), _col0 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: string), _col1 (type: string) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string) + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Reducer 19 + Execution mode: vectorized + Reduce Operator Tree: + Group By Operator + keys: KEY._col0 (type: string) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE Reducer 2 Reduce Operator Tree: Join Operator @@ -1947,15 +2037,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col14 Statistics: Num rows: 33 Data size: 4187 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col10 = 0L)) THEN (true) WHEN (_col10 is null) THEN (true) WHEN (_col14 is not null) THEN (false) WHEN (_col3 is null) THEN (null) WHEN ((_col11 < _col10)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 16 Data size: 2030 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col11 < _col10) is not true or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null or _col3 is null) and (_col14 is null or ((_col10 = 0L) or _col10 is null) is true) and (_col3 is not null or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null)) (type: boolean) + Statistics: Num rows: 32 Data size: 4060 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 16 Data size: 2030 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 32 Data size: 4060 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 16 Data size: 2030 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 32 Data size: 4060 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -1969,18 +2059,18 @@ STAGE PLANS: 0 _col1 (type: string), _col0 (type: string) 1 _col0 (type: string), _col1 (type: string) outputColumnNames: _col1, _col2 - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count(), count(_col2) keys: _col1 (type: string) mode: hash outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: bigint), _col2 (type: bigint) Reducer 8 Execution mode: vectorized @@ -1990,12 +2080,12 @@ STAGE PLANS: keys: KEY._col0 (type: string) mode: mergepartial outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: bigint), _col2 (type: bigint) Stage: Stage-0 @@ -2238,12 +2328,16 @@ STAGE PLANS: Stage: Stage-1 Spark Edges: - Reducer 11 <- Map 10 (PARTITION-LEVEL SORT, 2), Map 13 (PARTITION-LEVEL SORT, 2) - Reducer 12 <- Reducer 11 (GROUP, 2) + Reducer 10 <- Map 9 (PARTITION-LEVEL SORT, 2), Reducer 12 (PARTITION-LEVEL SORT, 2) + Reducer 12 <- Map 11 (GROUP, 2) + Reducer 14 <- Map 13 (PARTITION-LEVEL SORT, 2), Reducer 17 (PARTITION-LEVEL SORT, 2) + Reducer 15 <- Reducer 14 (GROUP, 2) + Reducer 17 <- Map 16 (PARTITION-LEVEL SORT, 2), Reducer 19 (PARTITION-LEVEL SORT, 2) + Reducer 19 <- Map 11 (GROUP, 2) Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 2), Map 5 (PARTITION-LEVEL SORT, 2) Reducer 3 <- Reducer 2 (PARTITION-LEVEL SORT, 2), Reducer 8 (PARTITION-LEVEL SORT, 2) - Reducer 4 <- Reducer 12 (PARTITION-LEVEL SORT, 2), Reducer 3 (PARTITION-LEVEL SORT, 2) - Reducer 7 <- Map 6 (PARTITION-LEVEL SORT, 2), Map 9 (PARTITION-LEVEL SORT, 2) + Reducer 4 <- Reducer 15 (PARTITION-LEVEL SORT, 2), Reducer 3 (PARTITION-LEVEL SORT, 2) + Reducer 7 <- Map 6 (PARTITION-LEVEL SORT, 2), Reducer 10 (PARTITION-LEVEL SORT, 2) Reducer 8 <- Reducer 7 (GROUP, 2) #### A masked pattern was here #### Vertices: @@ -2267,7 +2361,27 @@ STAGE PLANS: Statistics: Num rows: 1 Data size: 32560 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: int), _col2 (type: string), _col3 (type: string), _col5 (type: int), _col7 (type: double), _col8 (type: string) Execution mode: vectorized - Map 10 + Map 11 + Map Operator Tree: + TableScan + alias: part + filterExpr: p_type is not null (type: boolean) + Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + Filter Operator + predicate: p_type is not null (type: boolean) + Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: p_type (type: string) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + Execution mode: vectorized + Map 13 Map Operator Tree: TableScan alias: part @@ -2287,7 +2401,7 @@ STAGE PLANS: Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE value expressions: _col2 (type: string) Execution mode: vectorized - Map 13 + Map 16 Map Operator Tree: TableScan alias: pp @@ -2297,19 +2411,15 @@ STAGE PLANS: predicate: (p_brand is not null and p_type is not null) (type: boolean) Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: p_type (type: string), p_brand (type: string) + expressions: p_brand (type: string), p_type (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: _col0 (type: string), _col1 (type: string) - mode: hash - outputColumnNames: _col0, _col1 + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string) - sort order: ++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string) Execution mode: vectorized Map 5 Map Operator Tree: @@ -2365,21 +2475,54 @@ STAGE PLANS: predicate: (p_brand is not null and p_type is not null) (type: boolean) Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: p_type (type: string), p_brand (type: string) + expressions: p_brand (type: string), p_type (type: string) outputColumnNames: _col0, _col1 Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: _col0 (type: string), _col1 (type: string) - mode: hash - outputColumnNames: _col0, _col1 + Reduce Output Operator + key expressions: _col1 (type: string) + sort order: + + Map-reduce partition columns: _col1 (type: string) Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: string) - sort order: ++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string) Execution mode: vectorized - Reducer 11 + Reducer 10 + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col0, _col2 + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col2 (type: string), _col0 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: string), _col1 (type: string) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string) + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Reducer 12 + Execution mode: vectorized + Reduce Operator Tree: + Group By Operator + keys: KEY._col0 (type: string) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + Reducer 14 Reduce Operator Tree: Join Operator condition map: @@ -2388,35 +2531,72 @@ STAGE PLANS: 0 _col1 (type: string), _col0 (type: string) 1 _col0 (type: string), _col1 (type: string) outputColumnNames: _col1, _col2 - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Group By Operator keys: _col2 (type: string), _col1 (type: string) mode: hash outputColumnNames: _col0, _col1 - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: string) sort order: ++ Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE - Reducer 12 + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE + Reducer 15 Execution mode: vectorized Reduce Operator Tree: Group By Operator keys: KEY._col0 (type: string), KEY._col1 (type: string) mode: mergepartial outputColumnNames: _col0, _col1 - Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string), _col1 (type: string), true (type: boolean) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string), _col1 (type: string) sort order: ++ Map-reduce partition columns: _col0 (type: string), _col1 (type: string) - Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE value expressions: _col2 (type: boolean) + Reducer 17 + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col1 (type: string) + 1 _col0 (type: string) + outputColumnNames: _col0, _col2 + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: _col2 (type: string), _col0 (type: string) + outputColumnNames: _col0, _col1 + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: string), _col1 (type: string) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: string) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: string) + Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Reducer 19 + Execution mode: vectorized + Reduce Operator Tree: + Group By Operator + keys: KEY._col0 (type: string) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string) + sort order: + + Map-reduce partition columns: _col0 (type: string) + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE Reducer 2 Reduce Operator Tree: Join Operator @@ -2460,15 +2640,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col14 Statistics: Num rows: 33 Data size: 4187 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col10 = 0L)) THEN (true) WHEN (_col10 is null) THEN (true) WHEN (_col14 is not null) THEN (false) WHEN (_col3 is null) THEN (null) WHEN ((_col11 < _col10)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 16 Data size: 2030 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col11 < _col10) is not true or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null or _col3 is null) and (_col14 is null or ((_col10 = 0L) or _col10 is null) is true) and (_col3 is not null or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null)) (type: boolean) + Statistics: Num rows: 32 Data size: 4060 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 16 Data size: 2030 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 32 Data size: 4060 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 16 Data size: 2030 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 32 Data size: 4060 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -2482,18 +2662,18 @@ STAGE PLANS: 0 _col1 (type: string), _col0 (type: string) 1 _col0 (type: string), _col1 (type: string) outputColumnNames: _col1, _col2 - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count(), count(_col2) keys: _col1 (type: string) mode: hash outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: bigint), _col2 (type: bigint) Reducer 8 Execution mode: vectorized @@ -2503,12 +2683,12 @@ STAGE PLANS: keys: KEY._col0 (type: string) mode: mergepartial outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: bigint), _col2 (type: bigint) Stage: Stage-0 @@ -2707,15 +2887,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col14 Statistics: Num rows: 33 Data size: 4187 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col10 = 0L)) THEN (true) WHEN (_col10 is null) THEN (true) WHEN (_col14 is not null) THEN (false) WHEN (_col3 is null) THEN (null) WHEN ((_col11 < _col10)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 16 Data size: 2030 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col11 < _col10) is not true or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null or _col3 is null) and (_col14 is null or ((_col10 = 0L) or _col10 is null) is true) and (_col3 is not null or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null)) (type: boolean) + Statistics: Num rows: 32 Data size: 4060 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 16 Data size: 2030 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 32 Data size: 4060 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 16 Data size: 2030 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 32 Data size: 4060 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -3171,22 +3351,22 @@ STAGE PLANS: outputColumnNames: _col0, _col2, _col4, _col5, _col7 Statistics: Num rows: 27 Data size: 3757 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col4 = 0L) or (_col7 is null and _col2 is not null and (_col5 >= _col4))) (type: boolean) - Statistics: Num rows: 17 Data size: 2365 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col5 >= _col4) or (_col4 = 0L) or _col7 is not null or _col2 is null) and (_col2 is not null or (_col4 = 0L) or _col7 is not null) and (_col7 is null or (_col4 = 0L))) (type: boolean) + Statistics: Num rows: 26 Data size: 3617 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), 1 (type: int) outputColumnNames: _col0, _col1 - Statistics: Num rows: 17 Data size: 2365 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 26 Data size: 3617 Basic stats: COMPLETE Column stats: NONE Group By Operator keys: _col0 (type: int), _col1 (type: int) mode: hash outputColumnNames: _col0, _col1 - Statistics: Num rows: 17 Data size: 2365 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 26 Data size: 3617 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: int), _col1 (type: int) sort order: ++ Map-reduce partition columns: _col0 (type: int), _col1 (type: int) - Statistics: Num rows: 17 Data size: 2365 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 26 Data size: 3617 Basic stats: COMPLETE Column stats: NONE Reducer 9 Execution mode: vectorized Reduce Operator Tree: @@ -4070,7 +4250,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col0 = 3) or CASE WHEN ((_col9 = 0L)) THEN (true) WHEN (_col12 is not null) THEN (false) WHEN (_col5 is null) THEN (null) WHEN ((_col10 < _col9)) THEN (null) ELSE (true) END) (type: boolean) + predicate: (((_col9 <> 0L) and _col12 is null and (_col10 >= _col9) and _col5 is not null) or (_col0 = 3) or (_col9 = 0L)) (type: boolean) Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) @@ -4290,7 +4470,7 @@ STAGE PLANS: outputColumnNames: _col1, _col2, _col4, _col5 Statistics: Num rows: 550 Data size: 13543 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col4 is not null and (_col2 <> 0L)) or _col1 is not null or _col5 is not null) (type: boolean) + predicate: (((_col2 <> 0L) and _col4 is not null) or _col1 is not null or _col5 is not null) (type: boolean) Statistics: Num rows: 550 Data size: 13543 Basic stats: COMPLETE Column stats: NONE Select Operator Statistics: Num rows: 550 Data size: 13543 Basic stats: COMPLETE Column stats: NONE diff --git ql/src/test/results/clientpositive/spark/subquery_notin.q.out ql/src/test/results/clientpositive/spark/subquery_notin.q.out index 89d032f8c3..150e34b116 100644 --- ql/src/test/results/clientpositive/spark/subquery_notin.q.out +++ ql/src/test/results/clientpositive/spark/subquery_notin.q.out @@ -117,15 +117,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col5 Statistics: Num rows: 550 Data size: 15193 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col2 = 0L) or (_col5 is null and _col0 is not null and (_col3 >= _col2))) (type: boolean) - Statistics: Num rows: 366 Data size: 10110 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col0 is null) and (_col0 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) + Statistics: Num rows: 550 Data size: 15193 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string), _col1 (type: string) outputColumnNames: _col0, _col1 - Statistics: Num rows: 366 Data size: 10110 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 550 Data size: 15193 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 366 Data size: 10110 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 550 Data size: 15193 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -399,15 +399,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col4, _col5, _col8 Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col0 is null) and (_col0 is not null or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) (type: boolean) + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col1 (type: string), _col0 (type: string), _col2 (type: int) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -678,15 +678,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col5 Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col2 = 0L) or (_col5 is null and _col1 is not null and (_col3 >= _col2))) (type: boolean) - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col1 is null) and (_col1 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string), _col1 (type: int) outputColumnNames: _col0, _col1 - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -1083,15 +1083,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col4, _col5, _col8 Statistics: Num rows: 9 Data size: 1345 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN (_col2 is null) THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 4 Data size: 597 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col2 is null) and (_col2 is not null or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) (type: boolean) + Statistics: Num rows: 8 Data size: 1195 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col1 (type: string), _col0 (type: string), _col2 (type: int) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 4 Data size: 597 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 8 Data size: 1195 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 4 Data size: 597 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 8 Data size: 1195 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -1504,27 +1504,27 @@ STAGE PLANS: Map Operator Tree: TableScan alias: src - filterExpr: ((key < '11') and CASE WHEN ((key > '104')) THEN (null) ELSE ((key < '11')) END) (type: boolean) + filterExpr: ((key < '11') and (((key > '104') is true and null) or (key is not null and (key > '104') is not true))) (type: boolean) properties: insideView TRUE Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((key < '11') and CASE WHEN ((key > '104')) THEN (null) ELSE ((key < '11')) END) (type: boolean) - Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE + predicate: ((((key > '104') is true and null) or (key is not null and (key > '104') is not true)) and (key < '11')) (type: boolean) + Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: CASE WHEN ((key > '104')) THEN (null) ELSE (key) END (type: string) outputColumnNames: _col0 - Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Group By Operator keys: _col0 (type: string) mode: hash outputColumnNames: _col0 - Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Execution mode: vectorized Map 6 Map Operator Tree: @@ -1580,15 +1580,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col4 Statistics: Num rows: 182 Data size: 5033 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col1 = 0L) or (_col4 is null and _col0 is not null and (_col2 >= _col1))) (type: boolean) - Statistics: Num rows: 121 Data size: 3346 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col2 >= _col1) or (_col1 = 0L) or _col4 is not null or _col0 is null) and (_col0 is not null or (_col1 = 0L) or _col4 is not null) and (_col4 is null or (_col1 = 0L))) (type: boolean) + Statistics: Num rows: 182 Data size: 5033 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string) outputColumnNames: _col0 - Statistics: Num rows: 121 Data size: 3346 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 182 Data size: 5033 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 121 Data size: 3346 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 182 Data size: 5033 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -1600,16 +1600,16 @@ STAGE PLANS: keys: KEY._col0 (type: string) mode: mergepartial outputColumnNames: _col0 - Statistics: Num rows: 41 Data size: 435 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string), true (type: boolean) outputColumnNames: _col0, _col1 - Statistics: Num rows: 41 Data size: 435 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 41 Data size: 435 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: boolean) Reducer 7 Execution mode: vectorized @@ -1764,15 +1764,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col14 Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col10 = 0L)) THEN (true) WHEN (_col10 is null) THEN (true) WHEN (_col14 is not null) THEN (false) WHEN (_col5 is null) THEN (null) WHEN ((_col11 < _col10)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col11 < _col10) is not true or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null or _col5 is null) and (_col14 is null or ((_col10 = 0L) or _col10 is null) is true) and (_col5 is not null or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null)) (type: boolean) + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -1953,16 +1953,16 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col12 is null and _col5 is not null and (_col10 >= _col9)) or (_col9 = 0L)) (type: boolean) - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col10 >= _col9) or (_col9 = 0L) or _col12 is not null or _col5 is null) and (_col12 is null or (_col9 = 0L)) and (_col5 is not null or (_col9 = 0L) or _col12 is not null)) (type: boolean) + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: int) sort order: + - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) Reducer 4 Execution mode: vectorized @@ -1970,10 +1970,10 @@ STAGE PLANS: Select Operator expressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: string), VALUE._col1 (type: string), VALUE._col2 (type: string), VALUE._col3 (type: string), VALUE._col4 (type: int), VALUE._col5 (type: string), VALUE._col6 (type: double), VALUE._col7 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -2165,15 +2165,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col12 is null and _col0 is not null and _col5 is not null and (_col10 >= _col9)) or (_col9 = 0L)) (type: boolean) - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col0 is not null and _col5 is not null) or (_col9 = 0L) or _col12 is not null) and ((_col10 >= _col9) or (_col9 = 0L) or _col12 is not null or _col0 is null or _col5 is null) and (_col12 is null or (_col9 = 0L))) (type: boolean) + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -2438,10 +2438,10 @@ STAGE PLANS: outputColumnNames: _col1, _col3, _col4, _col7 Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN ((_col1 + 100) is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col1 is null) and (_col1 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Select Operator - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count() mode: hash @@ -2623,15 +2623,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col12 is null and _col7 is not null and (_col10 >= _col9)) or (_col9 = 0L)) (type: boolean) - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col10 >= _col9) or (_col9 = 0L) or _col12 is not null or _col7 is null) and (_col12 is null or (_col9 = 0L)) and (_col7 is not null or (_col9 = 0L) or _col12 is not null)) (type: boolean) + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -2744,14 +2744,10 @@ STAGE PLANS: Stage: Stage-1 Spark Edges: - Reducer 10 <- Map 9 (PARTITION-LEVEL SORT, 2), Reducer 13 (PARTITION-LEVEL SORT, 2) - Reducer 11 <- Reducer 10 (GROUP, 2) - Reducer 13 <- Map 12 (GROUP, 2) - Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 2), Reducer 6 (PARTITION-LEVEL SORT, 2) - Reducer 3 <- Reducer 11 (PARTITION-LEVEL SORT, 2), Reducer 2 (PARTITION-LEVEL SORT, 2) - Reducer 5 <- Map 4 (PARTITION-LEVEL SORT, 2), Reducer 8 (PARTITION-LEVEL SORT, 2) - Reducer 6 <- Reducer 5 (GROUP, 2) - Reducer 8 <- Map 12 (GROUP, 2) + Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 2), Reducer 5 (PARTITION-LEVEL SORT, 2) + Reducer 3 <- Reducer 2 (PARTITION-LEVEL SORT, 2), Reducer 7 (PARTITION-LEVEL SORT, 2) + Reducer 5 <- Map 4 (GROUP, 2) + Reducer 7 <- Map 6 (GROUP, 2) #### A masked pattern was here #### Vertices: Map 1 @@ -2770,121 +2766,56 @@ STAGE PLANS: Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col6 (type: string), _col7 (type: double), _col8 (type: string) Execution mode: vectorized - Map 12 - Map Operator Tree: - TableScan - alias: part - filterExpr: p_size is not null (type: boolean) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: p_size is not null (type: boolean) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: p_size (type: int) - mode: hash - outputColumnNames: _col0 - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: int) - sort order: + - Map-reduce partition columns: _col0 (type: int) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Execution mode: vectorized Map 4 Map Operator Tree: TableScan alias: p - filterExpr: (p_size is not null and p_partkey is not null) (type: boolean) + filterExpr: (((p_size + 121150) = p_partkey) and p_size is not null) (type: boolean) Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (p_partkey is not null and p_size is not null) (type: boolean) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + predicate: (((p_size + 121150) = p_partkey) and p_size is not null) (type: boolean) + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: p_partkey (type: int), p_name (type: string), p_size (type: int) - outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col2 (type: int), _col0 (type: int) - sort order: ++ - Map-reduce partition columns: _col2 (type: int), _col0 (type: int) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: string) + expressions: p_name (type: string), p_size (type: int) + outputColumnNames: p_name, p_size + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + Group By Operator + aggregations: count(), count(p_name) + keys: p_size (type: int) + mode: hash + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: int) + sort order: + + Map-reduce partition columns: _col0 (type: int) + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: bigint), _col2 (type: bigint) Execution mode: vectorized - Map 9 + Map 6 Map Operator Tree: TableScan alias: p - filterExpr: (p_size is not null and p_partkey is not null and p_name is not null) (type: boolean) + filterExpr: (((p_size + 121150) = p_partkey) and p_size is not null and p_name is not null) (type: boolean) Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (p_name is not null and p_partkey is not null and p_size is not null) (type: boolean) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE + predicate: (((p_size + 121150) = p_partkey) and p_name is not null and p_size is not null) (type: boolean) + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: p_partkey (type: int), p_name (type: string), p_size (type: int) - outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col2 (type: int), _col0 (type: int) - sort order: ++ - Map-reduce partition columns: _col2 (type: int), _col0 (type: int) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: string) - Execution mode: vectorized - Reducer 10 - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - keys: - 0 _col2 (type: int), _col0 (type: int) - 1 _col0 (type: int), _col1 (type: int) - outputColumnNames: _col1, _col3 - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: _col1 (type: string), _col3 (type: int) - mode: hash - outputColumnNames: _col0, _col1 - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: int) - sort order: ++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: int) - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE - Reducer 11 - Execution mode: vectorized - Reduce Operator Tree: - Group By Operator - keys: KEY._col0 (type: string), KEY._col1 (type: int) - mode: mergepartial - outputColumnNames: _col0, _col1 - Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: _col0 (type: string), _col1 (type: int), true (type: boolean) - outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string), _col1 (type: int) - sort order: ++ - Map-reduce partition columns: _col0 (type: string), _col1 (type: int) - Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE - value expressions: _col2 (type: boolean) - Reducer 13 + expressions: p_name (type: string), p_size (type: int) + outputColumnNames: p_name, p_size + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: p_name (type: string), p_size (type: int) + mode: hash + outputColumnNames: _col0, _col1 + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + key expressions: _col0 (type: string), _col1 (type: int) + sort order: ++ + Map-reduce partition columns: _col0 (type: string), _col1 (type: int) + Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE Execution mode: vectorized - Reduce Operator Tree: - Group By Operator - keys: KEY._col0 (type: int) - mode: mergepartial - outputColumnNames: _col0 - Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: _col0 (type: int), (_col0 + 121150) (type: int) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: int), _col1 (type: int) - sort order: ++ - Map-reduce partition columns: _col0 (type: int), _col1 (type: int) - Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE Reducer 2 Reduce Operator Tree: Join Operator @@ -2912,42 +2843,20 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col14 Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col10 = 0L)) THEN (true) WHEN (_col10 is null) THEN (true) WHEN (_col14 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col11 < _col10)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col11 < _col10) is not true or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null or _col1 is null) and (_col1 is not null or ((_col10 = 0L) or _col10 is null) is true or _col14 is not null) and (_col14 is null or ((_col10 = 0L) or _col10 is null) is true)) (type: boolean) + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe Reducer 5 - Reduce Operator Tree: - Join Operator - condition map: - Inner Join 0 to 1 - keys: - 0 _col2 (type: int), _col0 (type: int) - 1 _col0 (type: int), _col1 (type: int) - outputColumnNames: _col1, _col3 - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE - Group By Operator - aggregations: count(), count(_col1) - keys: _col3 (type: int) - mode: hash - outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: int) - sort order: + - Map-reduce partition columns: _col0 (type: int) - Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: bigint), _col2 (type: bigint) - Reducer 6 Execution mode: vectorized Reduce Operator Tree: Group By Operator @@ -2955,30 +2864,31 @@ STAGE PLANS: keys: KEY._col0 (type: int) mode: mergepartial outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 6 Data size: 726 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: int) sort order: + Map-reduce partition columns: _col0 (type: int) - Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 6 Data size: 726 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: bigint), _col2 (type: bigint) - Reducer 8 + Reducer 7 Execution mode: vectorized Reduce Operator Tree: Group By Operator - keys: KEY._col0 (type: int) + keys: KEY._col0 (type: string), KEY._col1 (type: int) mode: mergepartial - outputColumnNames: _col0 - Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + outputColumnNames: _col0, _col1 + Statistics: Num rows: 6 Data size: 726 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col0 (type: int), (_col0 + 121150) (type: int) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + expressions: _col0 (type: string), _col1 (type: int), true (type: boolean) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 6 Data size: 726 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: _col0 (type: int), _col1 (type: int) + key expressions: _col0 (type: string), _col1 (type: int) sort order: ++ - Map-reduce partition columns: _col0 (type: int), _col1 (type: int) - Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + Map-reduce partition columns: _col0 (type: string), _col1 (type: int) + Statistics: Num rows: 6 Data size: 726 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: boolean) Stage: Stage-0 Fetch Operator @@ -3125,15 +3035,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col11, _col12, _col16 Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col11 = 0L)) THEN (true) WHEN (_col11 is null) THEN (true) WHEN (_col16 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col12 < _col11)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col12 < _col11) is not true or ((_col11 = 0L) or _col11 is null) is true or _col16 is not null or _col1 is null) and (_col1 is not null or ((_col11 = 0L) or _col11 is null) is true or _col16 is not null) and (_col16 is null or ((_col11 = 0L) or _col11 is null) is true)) (type: boolean) + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -3301,15 +3211,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col4, _col5, _col8 Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col1 is null) and (_col1 is not null or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) (type: boolean) + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string) outputColumnNames: _col0 - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -3546,15 +3456,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col4, _col5, _col8 Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col1 is null) and (_col1 is not null or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) (type: boolean) + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string) outputColumnNames: _col0 - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -3814,23 +3724,23 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col5 Statistics: Num rows: 550 Data size: 15193 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col2 = 0L) or (_col5 is null and _col1 is not null and (_col3 >= _col2))) (type: boolean) - Statistics: Num rows: 366 Data size: 10110 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col1 is null) and (_col1 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) + Statistics: Num rows: 550 Data size: 15193 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string) outputColumnNames: _col0 - Statistics: Num rows: 366 Data size: 10110 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 550 Data size: 15193 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count() keys: _col0 (type: string) mode: hash outputColumnNames: _col0, _col1 - Statistics: Num rows: 366 Data size: 10110 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 550 Data size: 15193 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 366 Data size: 10110 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 550 Data size: 15193 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: bigint) Reducer 4 Execution mode: vectorized @@ -3840,15 +3750,15 @@ STAGE PLANS: keys: KEY._col0 (type: string) mode: mergepartial outputColumnNames: _col0, _col1 - Statistics: Num rows: 183 Data size: 5055 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 275 Data size: 7596 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: _col1 is not null (type: boolean) - Statistics: Num rows: 183 Data size: 5055 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 275 Data size: 7596 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col1 (type: bigint) sort order: + Map-reduce partition columns: _col1 (type: bigint) - Statistics: Num rows: 183 Data size: 5055 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 275 Data size: 7596 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: string) Reducer 5 Reduce Operator Tree: @@ -3859,10 +3769,10 @@ STAGE PLANS: 0 _col1 (type: bigint) 1 _col0 (type: bigint) outputColumnNames: _col0, _col1 - Statistics: Num rows: 201 Data size: 5560 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 302 Data size: 8355 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 201 Data size: 5560 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 302 Data size: 8355 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -4116,23 +4026,23 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col3, _col4, _col7 Statistics: Num rows: 605 Data size: 6427 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 302 Data size: 3208 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col1 is null) and (_col1 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 604 Data size: 6416 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string) outputColumnNames: _col0 - Statistics: Num rows: 302 Data size: 3208 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 604 Data size: 6416 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count() keys: _col0 (type: string) mode: hash outputColumnNames: _col0, _col1 - Statistics: Num rows: 302 Data size: 3208 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 604 Data size: 6416 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 302 Data size: 3208 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 604 Data size: 6416 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: bigint) Reducer 4 Execution mode: vectorized @@ -4142,15 +4052,15 @@ STAGE PLANS: keys: KEY._col0 (type: string) mode: mergepartial outputColumnNames: _col0, _col1 - Statistics: Num rows: 151 Data size: 1604 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 302 Data size: 3208 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: _col1 is not null (type: boolean) - Statistics: Num rows: 151 Data size: 1604 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 302 Data size: 3208 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col1 (type: bigint) sort order: + Map-reduce partition columns: _col1 (type: bigint) - Statistics: Num rows: 151 Data size: 1604 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 302 Data size: 3208 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: string) Reducer 5 Reduce Operator Tree: @@ -4161,10 +4071,10 @@ STAGE PLANS: 0 _col1 (type: bigint) 1 _col0 (type: bigint) outputColumnNames: _col0, _col1 - Statistics: Num rows: 166 Data size: 1764 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 332 Data size: 3528 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 166 Data size: 1764 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 332 Data size: 3528 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -4353,16 +4263,16 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col12 is null and _col5 is not null and (_col10 >= _col9)) or (_col9 = 0L)) (type: boolean) - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col10 >= _col9) or (_col9 = 0L) or _col12 is not null or _col5 is null) and (_col12 is null or (_col9 = 0L)) and (_col5 is not null or (_col9 = 0L) or _col12 is not null)) (type: boolean) + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col3 (type: string) sort order: + - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) Reducer 4 Execution mode: vectorized @@ -4370,10 +4280,10 @@ STAGE PLANS: Select Operator expressions: VALUE._col0 (type: int), VALUE._col1 (type: string), VALUE._col2 (type: string), KEY.reducesinkkey0 (type: string), VALUE._col3 (type: string), VALUE._col4 (type: int), VALUE._col5 (type: string), VALUE._col6 (type: double), VALUE._col7 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -4578,16 +4488,16 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col12 is null and _col5 is not null and (_col10 >= _col9)) or (_col9 = 0L)) (type: boolean) - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col10 >= _col9) or (_col9 = 0L) or _col12 is not null or _col5 is null) and (_col12 is null or (_col9 = 0L)) and (_col5 is not null or (_col9 = 0L) or _col12 is not null)) (type: boolean) + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col3 (type: string), _col0 (type: int) sort order: ++ - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE TopN Hash Memory Usage: 0.1 value expressions: _col1 (type: string), _col2 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) Reducer 4 @@ -4596,7 +4506,7 @@ STAGE PLANS: Select Operator expressions: KEY.reducesinkkey1 (type: int), VALUE._col0 (type: string), VALUE._col1 (type: string), KEY.reducesinkkey0 (type: string), VALUE._col2 (type: string), VALUE._col3 (type: int), VALUE._col4 (type: string), VALUE._col5 (type: double), VALUE._col6 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 18 Data size: 2530 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Limit Number of rows: 4 Statistics: Num rows: 4 Data size: 560 Basic stats: COMPLETE Column stats: NONE @@ -4838,15 +4748,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col5 Statistics: Num rows: 550 Data size: 15193 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col2 = 0L) or (_col5 is null and _col0 is not null and (_col3 >= _col2))) (type: boolean) - Statistics: Num rows: 366 Data size: 10110 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col0 is null) and (_col0 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) + Statistics: Num rows: 550 Data size: 15193 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string), _col1 (type: string) outputColumnNames: _col0, _col1 - Statistics: Num rows: 366 Data size: 10110 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 550 Data size: 15193 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 366 Data size: 10110 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 550 Data size: 15193 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -5543,10 +5453,10 @@ STAGE PLANS: outputColumnNames: _col1, _col3, _col4, _col7 Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN ((_col1 + 100) is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col1 is null) and (_col1 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Select Operator - Statistics: Num rows: 15 Data size: 1903 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count() mode: hash @@ -5779,15 +5689,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col4 Statistics: Num rows: 4 Data size: 412 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col1 = 0L) or (_col4 is null and _col0 is not null and (_col2 >= _col1))) (type: boolean) - Statistics: Num rows: 2 Data size: 206 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col2 >= _col1) or (_col1 = 0L) or _col4 is not null or _col0 is null) and (_col0 is not null or (_col1 = 0L) or _col4 is not null) and (_col4 is null or (_col1 = 0L))) (type: boolean) + Statistics: Num rows: 4 Data size: 412 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int) outputColumnNames: _col0 - Statistics: Num rows: 2 Data size: 206 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 4 Data size: 412 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 2 Data size: 206 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 4 Data size: 412 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -6027,15 +5937,15 @@ STAGE PLANS: outputColumnNames: _col0, _col3, _col4, _col7 Statistics: Num rows: 4 Data size: 378 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 2 Data size: 189 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col0 is null) and (_col0 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 4 Data size: 378 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int) outputColumnNames: _col0 - Statistics: Num rows: 2 Data size: 189 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 4 Data size: 378 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 2 Data size: 189 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 4 Data size: 378 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -6277,15 +6187,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col3, _col4, _col7 Statistics: Num rows: 3 Data size: 9 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col1 is null) and (_col1 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int) outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -6508,15 +6418,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col3, _col4, _col6 Statistics: Num rows: 4 Data size: 19 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col6 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 2 Data size: 9 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col6 is not null or _col1 is null) and (_col1 is not null or ((_col3 = 0L) or _col3 is null) is true or _col6 is not null) and (_col6 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 4 Data size: 19 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: int) outputColumnNames: _col0, _col1 - Statistics: Num rows: 2 Data size: 9 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 4 Data size: 19 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 2 Data size: 9 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 4 Data size: 19 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -6749,15 +6659,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col3, _col4, _col6 Statistics: Num rows: 6 Data size: 22 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col6 is not null) THEN (false) WHEN (_col1 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 3 Data size: 11 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col6 is not null or _col1 is null) and (_col1 is not null or ((_col3 = 0L) or _col3 is null) is true or _col6 is not null) and (_col6 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 6 Data size: 22 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int) outputColumnNames: _col0 - Statistics: Num rows: 3 Data size: 11 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 6 Data size: 22 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 3 Data size: 11 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 6 Data size: 22 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -6949,15 +6859,15 @@ STAGE PLANS: outputColumnNames: _col0, _col3, _col4, _col7 Statistics: Num rows: 3 Data size: 12 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col0 is null) and (_col0 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int) outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -7118,15 +7028,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col5 Statistics: Num rows: 3 Data size: 62 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col2 = 0L) or (_col5 is null and _col1 is not null and (_col3 >= _col2))) (type: boolean) - Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col1 is null) and (_col1 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) + Statistics: Num rows: 2 Data size: 41 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int) outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2 Data size: 41 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2 Data size: 41 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -7285,15 +7195,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col4 Statistics: Num rows: 3 Data size: 62 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col1 = 0L) or (_col4 is null and _col0 is not null and (_col2 >= _col1))) (type: boolean) - Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col2 >= _col1) or (_col1 = 0L) or _col4 is not null or _col0 is null) and (_col0 is not null or (_col1 = 0L) or _col4 is not null) and (_col4 is null or (_col1 = 0L))) (type: boolean) + Statistics: Num rows: 2 Data size: 41 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int) outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2 Data size: 41 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 20 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2 Data size: 41 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -7505,15 +7415,15 @@ STAGE PLANS: residual filter predicates: {(_col1 > _col6)} Statistics: Num rows: 8367 Data size: 186148 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 4183 Data size: 93062 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col0 is null) and (_col0 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 8366 Data size: 186125 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string), _col1 (type: string) outputColumnNames: _col0, _col1 - Statistics: Num rows: 4183 Data size: 93062 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 8366 Data size: 186125 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 4183 Data size: 93062 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 8366 Data size: 186125 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git ql/src/test/results/clientpositive/spark/subquery_null_agg.q.out ql/src/test/results/clientpositive/spark/subquery_null_agg.q.out index 4223d6dc99..aa079cc18a 100644 --- ql/src/test/results/clientpositive/spark/subquery_null_agg.q.out +++ ql/src/test/results/clientpositive/spark/subquery_null_agg.q.out @@ -6,8 +6,8 @@ POSTHOOK: query: CREATE TABLE table_7 (int_col INT) POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@table_7 -Warning: Shuffle Join JOIN[21][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product -Warning: Shuffle Join JOIN[24][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Work 'Reducer 3' is a cross product +Warning: Shuffle Join JOIN[16][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product +Warning: Shuffle Join JOIN[19][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Work 'Reducer 3' is a cross product PREHOOK: query: explain SELECT (t1.int_col) * (t1.int_col) AS int_col @@ -58,10 +58,9 @@ STAGE PLANS: Stage: Stage-1 Spark Edges: - Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 1), Reducer 5 (PARTITION-LEVEL SORT, 1) - Reducer 3 <- Reducer 2 (PARTITION-LEVEL SORT, 1), Reducer 7 (PARTITION-LEVEL SORT, 1) - Reducer 5 <- Map 4 (GROUP, 2) - Reducer 7 <- Map 6 (GROUP, 1) + Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 1), Map 4 (PARTITION-LEVEL SORT, 1) + Reducer 3 <- Reducer 2 (PARTITION-LEVEL SORT, 1), Reducer 6 (PARTITION-LEVEL SORT, 1) + Reducer 6 <- Map 5 (GROUP, 1) #### A masked pattern was here #### Vertices: Map 1 @@ -85,18 +84,16 @@ STAGE PLANS: Filter Operator predicate: false (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE - Group By Operator - keys: true (type: boolean) - mode: hash + Select Operator + expressions: true (type: boolean) outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE Reduce Output Operator - key expressions: _col0 (type: boolean) - sort order: + - Map-reduce partition columns: _col0 (type: boolean) + sort order: Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE + value expressions: _col0 (type: boolean) Execution mode: vectorized - Map 6 + Map 5 Map Operator Tree: TableScan alias: table_7 @@ -138,14 +135,14 @@ STAGE PLANS: keys: 0 1 - outputColumnNames: _col1, _col2 + outputColumnNames: _col1, _col2, _col3 Statistics: Num rows: 1 Data size: 10 Basic stats: PARTIAL Column stats: NONE Select Operator - expressions: _col2 (type: bigint), _col1 (type: boolean) - outputColumnNames: _col1, _col2 + expressions: _col2 (type: bigint), _col3 (type: bigint), _col1 (type: boolean) + outputColumnNames: _col1, _col2, _col3 Statistics: Num rows: 1 Data size: 10 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: ((_col1 = 0L) or _col2 is null) (type: boolean) + predicate: ((_col1 = 0L) or (_col3 is null and (_col2 >= _col1))) (type: boolean) Statistics: Num rows: 1 Data size: 10 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: null (type: void) @@ -158,23 +155,7 @@ STAGE PLANS: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe - Reducer 5 - Execution mode: vectorized - Reduce Operator Tree: - Group By Operator - keys: KEY._col0 (type: boolean) - mode: mergepartial - outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE - Select Operator - expressions: true (type: boolean) - outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE - Reduce Output Operator - sort order: - Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: COMPLETE - value expressions: _col0 (type: boolean) - Reducer 7 + Reducer 6 Execution mode: vectorized Reduce Operator Tree: Group By Operator @@ -182,10 +163,14 @@ STAGE PLANS: mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE - Reduce Output Operator - sort order: + Select Operator + expressions: _col0 (type: bigint), _col0 (type: bigint) + outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE - value expressions: _col0 (type: bigint) + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: PARTIAL Column stats: COMPLETE + value expressions: _col0 (type: bigint), _col1 (type: bigint) Stage: Stage-0 Fetch Operator diff --git ql/src/test/results/clientpositive/spark/subquery_scalar.q.out ql/src/test/results/clientpositive/spark/subquery_scalar.q.out index 82b080e8d5..91bcbbbf93 100644 --- ql/src/test/results/clientpositive/spark/subquery_scalar.q.out +++ ql/src/test/results/clientpositive/spark/subquery_scalar.q.out @@ -332,7 +332,7 @@ STAGE PLANS: Processor Tree: ListSink -Warning: Shuffle Join JOIN[18][tables = [$hdt$_1, $hdt$_2, $hdt$_0]] in Work 'Reducer 3' is a cross product +Warning: Shuffle Join JOIN[19][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Work 'Reducer 2' is a cross product PREHOOK: query: explain select * from part where p_name = (select p_name from part_null_n0 where p_name is null) PREHOOK: type: QUERY PREHOOK: Input: default@part @@ -351,81 +351,62 @@ STAGE PLANS: Stage: Stage-1 Spark Edges: - Reducer 2 <- Map 1 (GROUP, 1) - Reducer 3 <- Map 4 (PARTITION-LEVEL SORT, 1), Map 5 (PARTITION-LEVEL SORT, 1), Reducer 2 (PARTITION-LEVEL SORT, 1) + Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 1), Map 5 (PARTITION-LEVEL SORT, 1), Reducer 4 (PARTITION-LEVEL SORT, 1) + Reducer 4 <- Map 3 (GROUP, 1) #### A masked pattern was here #### Vertices: Map 1 Map Operator Tree: TableScan - alias: part_null_n0 - filterExpr: p_name is null (type: boolean) - Statistics: Num rows: 1 Data size: 32560 Basic stats: COMPLETE Column stats: NONE + alias: part + Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: p_name is null (type: boolean) - Statistics: Num rows: 1 Data size: 32560 Basic stats: COMPLETE Column stats: NONE + predicate: false (type: boolean) + Statistics: Num rows: 1 Data size: 121 Basic stats: COMPLETE Column stats: NONE Select Operator - Statistics: Num rows: 1 Data size: 32560 Basic stats: COMPLETE Column stats: NONE + expressions: p_partkey (type: int), p_name (type: string), p_mfgr (type: string), p_brand (type: string), p_type (type: string), p_size (type: int), p_container (type: string), p_retailprice (type: double), p_comment (type: string) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 121 Basic stats: COMPLETE Column stats: NONE + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 121 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) + Execution mode: vectorized + Map 3 + Map Operator Tree: + TableScan + alias: part_null_n0 + Statistics: Num rows: 1 Data size: 32560 Basic stats: COMPLETE Column stats: COMPLETE + Select Operator + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE + Filter Operator + predicate: false (type: boolean) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE Group By Operator - aggregations: count() + aggregations: count(0) mode: hash outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator sort order: - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE value expressions: _col0 (type: bigint) Execution mode: vectorized - Map 4 - Map Operator Tree: - TableScan - alias: part_null_n0 - filterExpr: p_name is null (type: boolean) - Statistics: Num rows: 1 Data size: 32560 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: p_name is null (type: boolean) - Statistics: Num rows: 1 Data size: 32560 Basic stats: COMPLETE Column stats: NONE - Select Operator - Statistics: Num rows: 1 Data size: 32560 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - sort order: - Statistics: Num rows: 1 Data size: 32560 Basic stats: COMPLETE Column stats: NONE - Execution mode: vectorized Map 5 Map Operator Tree: TableScan - alias: part - filterExpr: (p_name = null) (type: boolean) - Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: (p_name = null) (type: boolean) - Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: p_partkey (type: int), p_mfgr (type: string), p_brand (type: string), p_type (type: string), p_size (type: int), p_container (type: string), p_retailprice (type: double), p_comment (type: string) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 - Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE + alias: part_null_n0 + Statistics: Num rows: 1 Data size: 32560 Basic stats: COMPLETE Column stats: COMPLETE + Select Operator + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE + Filter Operator + predicate: false (type: boolean) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator sort order: - Statistics: Num rows: 13 Data size: 1573 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: int), _col5 (type: string), _col6 (type: double), _col7 (type: string) + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: COMPLETE Execution mode: vectorized Reducer 2 - Execution mode: vectorized - Reduce Operator Tree: - Group By Operator - aggregations: count(VALUE._col0) - mode: mergepartial - outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE - Filter Operator - predicate: (sq_count_check(_col0) <= 1) (type: boolean) - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE - Select Operator - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - sort order: - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE - Reducer 3 Reduce Operator Tree: Join Operator condition map: @@ -435,19 +416,28 @@ STAGE PLANS: 0 1 2 - outputColumnNames: _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9 - Statistics: Num rows: 13 Data size: 424970 Basic stats: COMPLETE Column stats: NONE + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 + Statistics: Num rows: 1 Data size: 134 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + Statistics: Num rows: 1 Data size: 134 Basic stats: COMPLETE Column stats: NONE + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + Reducer 4 + Execution mode: vectorized + Reduce Operator Tree: + Group By Operator + aggregations: count(VALUE._col0) + mode: mergepartial + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: _col2 (type: int), null (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: string), _col6 (type: int), _col7 (type: string), _col8 (type: double), _col9 (type: string) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 13 Data size: 424970 Basic stats: COMPLETE Column stats: NONE - File Output Operator - compressed: false - Statistics: Num rows: 13 Data size: 424970 Basic stats: COMPLETE Column stats: NONE - table: - input format: org.apache.hadoop.mapred.SequenceFileInputFormat - output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat - serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: COMPLETE Stage: Stage-0 Fetch Operator @@ -455,7 +445,7 @@ STAGE PLANS: Processor Tree: ListSink -Warning: Shuffle Join JOIN[18][tables = [$hdt$_1, $hdt$_2, $hdt$_0]] in Work 'Reducer 3' is a cross product +Warning: Shuffle Join JOIN[19][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Work 'Reducer 2' is a cross product PREHOOK: query: select * from part where p_name = (select p_name from part_null_n0 where p_name is null) PREHOOK: type: QUERY PREHOOK: Input: default@part @@ -3409,15 +3399,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col10, _col11, _col13 Statistics: Num rows: 7 Data size: 2279 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col10 = 0L) or (_col13 is null and _col3 is not null and (_col11 >= _col10))) (type: boolean) - Statistics: Num rows: 4 Data size: 1302 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col11 >= _col10) or (_col10 = 0L) or _col13 is not null or _col3 is null) and (_col13 is null or (_col10 = 0L)) and (_col3 is not null or (_col10 = 0L) or _col13 is not null)) (type: boolean) + Statistics: Num rows: 6 Data size: 1953 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 4 Data size: 1302 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 6 Data size: 1953 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 4 Data size: 1302 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 6 Data size: 1953 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -3666,17 +3656,17 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col12 Statistics: Num rows: 14 Data size: 1968 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((_col12 is null and _col3 is not null and (_col10 >= _col9)) or (_col9 = 0L)) (type: boolean) - Statistics: Num rows: 9 Data size: 1265 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col10 >= _col9) or (_col9 = 0L) or _col12 is not null or _col3 is null) and (_col12 is null or (_col9 = 0L)) and (_col3 is not null or (_col9 = 0L) or _col12 is not null)) (type: boolean) + Statistics: Num rows: 14 Data size: 1968 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 9 Data size: 1265 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 14 Data size: 1968 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col4 (type: string) sort order: + Map-reduce partition columns: _col4 (type: string) - Statistics: Num rows: 9 Data size: 1265 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 14 Data size: 1968 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) Reducer 5 Reduce Operator Tree: @@ -3687,17 +3677,17 @@ STAGE PLANS: 0 _col4 (type: string) 1 _col1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9 - Statistics: Num rows: 9 Data size: 1391 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 2164 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (not (_col1 like _col9)) (type: boolean) - Statistics: Num rows: 5 Data size: 772 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 8 Data size: 1154 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: string), _col2 (type: string), _col3 (type: string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 (type: double), _col8 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 5 Data size: 772 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 8 Data size: 1154 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 5 Data size: 772 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 8 Data size: 1154 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -6265,15 +6255,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN (_col3 is null) THEN (true) ELSE ((_col2 = 0L)) END (type: boolean) - Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE + predicate: ((_col2 = 0L) or _col3 is null) (type: boolean) + Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: int) outputColumnNames: _col0, _col1 - Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -6606,15 +6596,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 2 Data size: 6 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: CASE WHEN (_col3 is null) THEN (true) ELSE ((_col2 = 0L)) END (type: boolean) - Statistics: Num rows: 1 Data size: 3 Basic stats: PARTIAL Column stats: NONE + predicate: ((_col2 = 0L) or _col3 is null) (type: boolean) + Statistics: Num rows: 2 Data size: 6 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: _col0 (type: int), _col1 (type: int) outputColumnNames: _col0, _col1 - Statistics: Num rows: 1 Data size: 3 Basic stats: PARTIAL Column stats: NONE + Statistics: Num rows: 2 Data size: 6 Basic stats: PARTIAL Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 1 Data size: 3 Basic stats: PARTIAL Column stats: NONE + Statistics: Num rows: 2 Data size: 6 Basic stats: PARTIAL Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git ql/src/test/results/clientpositive/spark/subquery_select.q.out ql/src/test/results/clientpositive/spark/subquery_select.q.out index ead76b42b0..04056382fa 100644 --- ql/src/test/results/clientpositive/spark/subquery_select.q.out +++ ql/src/test/results/clientpositive/spark/subquery_select.q.out @@ -85,7 +85,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col3, _col4, _col5 Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col0 (type: int), CASE WHEN (_col4) THEN (false) WHEN (_col3 is not null) THEN (true) WHEN (_col1) THEN (null) WHEN (_col5) THEN (null) ELSE (false) END (type: boolean) + expressions: _col0 (type: int), ((_col3 is not null and _col4) or ((_col1 or _col5) and null and _col4 and _col3 is null)) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -127,7 +127,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: (_col0 = 0L) (type: boolean), (_col1 < _col0) (type: boolean) + expressions: (_col0 <> 0L) (type: boolean), (_col1 < _col0) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -271,7 +271,7 @@ STAGE PLANS: outputColumnNames: _col1, _col2, _col4, _col5, _col6, _col9 Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col1 (type: int), CASE WHEN (_col5) THEN (false) WHEN (_col4 is null) THEN (false) WHEN (_col9 is not null) THEN (true) WHEN (_col2) THEN (null) WHEN (_col6) THEN (null) ELSE (false) END (type: boolean) + expressions: _col1 (type: int), ((_col9 is not null and (_col5 or _col4 is null) is not true) or ((_col2 or _col6) is true and null and (_col5 or _col4 is null) is not true and _col9 is null)) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 30 Data size: 3807 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -406,15 +406,15 @@ STAGE PLANS: alias: part Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: p_size (type: int), p_size is null (type: boolean) - outputColumnNames: _col0, _col1 + expressions: p_size (type: int), p_size is null (type: boolean), p_size is not null (type: boolean) + outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: int) sort order: + Map-reduce partition columns: _col0 (type: int) Statistics: Num rows: 26 Data size: 3147 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: boolean) + value expressions: _col1 (type: boolean), _col2 (type: boolean) Execution mode: vectorized Map 4 Map Operator Tree: @@ -443,12 +443,12 @@ STAGE PLANS: keys: 0 _col0 (type: int) 1 _col0 (type: int) - outputColumnNames: _col0, _col1, _col3 + outputColumnNames: _col0, _col1, _col2, _col4 Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: int), _col1 (type: boolean), _col3 (type: boolean) + value expressions: _col0 (type: int), _col1 (type: boolean), _col2 (type: boolean), _col4 (type: boolean) Reducer 3 Reduce Operator Tree: Join Operator @@ -457,10 +457,10 @@ STAGE PLANS: keys: 0 1 - outputColumnNames: _col0, _col1, _col3, _col4, _col5 + outputColumnNames: _col0, _col1, _col2, _col4, _col5, _col6, _col7, _col8 Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col0 (type: int), CASE WHEN (_col4) THEN (true) WHEN (_col3 is not null) THEN (false) WHEN (_col1) THEN (null) WHEN (_col5) THEN (null) ELSE (true) END (type: boolean) + expressions: _col0 (type: int), (_col5 or ((_col1 or _col6) and null and _col7 and _col4 is null) or (_col7 and _col4 is null and _col2 and _col8)) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -502,13 +502,13 @@ STAGE PLANS: outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: (_col0 = 0L) (type: boolean), (_col1 < _col0) (type: boolean) - outputColumnNames: _col0, _col1 + expressions: (_col0 = 0L) (type: boolean), (_col1 < _col0) (type: boolean), (_col0 <> 0L) (type: boolean), (_col1 >= _col0) (type: boolean) + outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator sort order: Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: boolean), _col1 (type: boolean) + value expressions: _col0 (type: boolean), _col1 (type: boolean), _col2 (type: boolean), _col3 (type: boolean) Stage: Stage-0 Fetch Operator @@ -713,7 +713,7 @@ STAGE PLANS: outputColumnNames: _col1, _col2, _col4, _col5, _col6, _col9 Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col1 (type: int), CASE WHEN (_col5) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col9 is not null) THEN (false) WHEN (_col2) THEN (null) WHEN (_col6) THEN (null) ELSE (true) END (type: boolean) + expressions: _col1 (type: int), ((_col5 or _col4 is null) is true or ((_col2 or _col6) is true and null and (_col5 or _col4 is null) is not true and _col9 is null) or ((_col5 or _col4 is null) is not true and _col9 is null and (_col2 or _col6) is not true)) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 14 Data size: 1730 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -2254,7 +2254,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col3, _col4, _col5 Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col0 (type: int), CASE WHEN (_col4) THEN (false) WHEN (_col3 is not null) THEN (true) WHEN (_col1) THEN (null) WHEN (_col5) THEN (null) ELSE (false) END (type: boolean) + expressions: _col0 (type: int), ((_col3 is not null and _col4) or ((_col1 or _col5) and null and _col4 and _col3 is null)) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -2291,7 +2291,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: (_col0 = 0L) (type: boolean), (_col1 < _col0) (type: boolean) + expressions: (_col0 <> 0L) (type: boolean), (_col1 < _col0) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -2836,7 +2836,7 @@ STAGE PLANS: outputColumnNames: _col1, _col2, _col3 Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col1 (type: int), CASE WHEN (_col3 is null) THEN (false) ELSE (_col2 is null) END (type: boolean) + expressions: _col1 (type: int), (_col2 is null and _col3 is not null) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 28 Data size: 3461 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -3226,7 +3226,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: (_col0 = 0L) (type: boolean), (_col1 < _col0) (type: boolean) + expressions: (_col0 <> 0L) (type: boolean), (_col1 < _col0) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 192 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -3290,7 +3290,7 @@ STAGE PLANS: outputColumnNames: _col2, _col3, _col4, _col6, _col7, _col8, _col11, _col13, _col14, _col15 Statistics: Num rows: 33 Data size: 10556 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col2 (type: int), (CASE WHEN (_col7) THEN (false) WHEN (_col6 is null) THEN (false) WHEN (_col11 is not null) THEN (true) WHEN (_col3) THEN (null) WHEN (_col8) THEN (null) ELSE (false) END and CASE WHEN (_col14) THEN (false) WHEN (_col13 is not null) THEN (true) WHEN (_col4) THEN (null) WHEN (_col15) THEN (null) ELSE (false) END) (type: boolean) + expressions: _col2 (type: int), (((_col11 is not null and (_col7 or _col6 is null) is not true) or ((_col3 or _col8) is true and null and (_col7 or _col6 is null) is not true and _col11 is null)) and ((_col13 is not null and _col14) or ((_col4 or _col15) and null and _col14 and _col13 is null))) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 33 Data size: 10556 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -3662,7 +3662,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: (_col0 = 0L) (type: boolean), (_col1 < _col0) (type: boolean) + expressions: (_col0 <> 0L) (type: boolean), (_col1 < _col0) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 1 Data size: 16 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator @@ -3706,7 +3706,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col3, _col4, _col5 Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col0 (type: int), CASE WHEN (_col4) THEN (false) WHEN (_col3 is not null) THEN (true) WHEN (_col1) THEN (null) WHEN (_col5) THEN (null) ELSE (false) END (type: boolean) + expressions: _col0 (type: int), ((_col3 is not null and _col4) or ((_col1 or _col5) and null and _col4 and _col3 is null)) (type: boolean) outputColumnNames: _col0, _col1 Statistics: Num rows: 28 Data size: 3937 Basic stats: COMPLETE Column stats: NONE File Output Operator diff --git ql/src/test/results/clientpositive/spark/subquery_views.q.out ql/src/test/results/clientpositive/spark/subquery_views.q.out index 30bcf4b43c..0d4408fb1c 100644 --- ql/src/test/results/clientpositive/spark/subquery_views.q.out +++ ql/src/test/results/clientpositive/spark/subquery_views.q.out @@ -256,22 +256,22 @@ STAGE PLANS: outputColumnNames: _col0, _col4, _col5, _col8 Statistics: Num rows: 365 Data size: 3878 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 182 Data size: 1933 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col0 is null) and (_col0 is not null or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) (type: boolean) + Statistics: Num rows: 364 Data size: 3867 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string) outputColumnNames: _col0 - Statistics: Num rows: 182 Data size: 1933 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 364 Data size: 3867 Basic stats: COMPLETE Column stats: NONE Group By Operator keys: _col0 (type: string) mode: hash outputColumnNames: _col0 - Statistics: Num rows: 182 Data size: 1933 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 364 Data size: 3867 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 182 Data size: 1933 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 364 Data size: 3867 Basic stats: COMPLETE Column stats: NONE Reducer 14 Execution mode: vectorized Reduce Operator Tree: @@ -347,17 +347,17 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col4, _col5, _col8 Statistics: Num rows: 365 Data size: 3878 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 182 Data size: 1933 Basic stats: COMPLETE Column stats: NONE + predicate: (((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col0 is null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) (type: boolean) + Statistics: Num rows: 364 Data size: 3867 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: string), _col1 (type: string) outputColumnNames: _col0, _col1 - Statistics: Num rows: 182 Data size: 1933 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 364 Data size: 3867 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 182 Data size: 1933 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 364 Data size: 3867 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: string) Reducer 3 Reduce Operator Tree: @@ -368,10 +368,10 @@ STAGE PLANS: 0 _col0 (type: string) 1 _col0 (type: string) outputColumnNames: _col0, _col1 - Statistics: Num rows: 200 Data size: 2126 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 400 Data size: 4253 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 200 Data size: 2126 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 400 Data size: 4253 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git ql/src/test/results/clientpositive/spark/union22.q.out ql/src/test/results/clientpositive/spark/union22.q.out index 3798d87f7b..b587d62a7a 100644 --- ql/src/test/results/clientpositive/spark/union22.q.out +++ ql/src/test/results/clientpositive/spark/union22.q.out @@ -80,6 +80,17 @@ POSTHOOK: Input: default@dst_union22@ds=1 POSTHOOK: Input: default@dst_union22_delta POSTHOOK: Input: default@dst_union22_delta@ds=1 POSTHOOK: Output: default@dst_union22@ds=2 +OPTIMIZED SQL: SELECT `k1`, `k2`, `k3`, `k4` +FROM `default`.`dst_union22_delta` +WHERE `ds` = '1' AND `k0` <= 50 +UNION ALL +SELECT `t2`.`k1`, `t2`.`k2`, `t4`.`k3`, `t4`.`k4` +FROM (SELECT `k1`, `k2`, `ds` = '1' AS `=` +FROM `default`.`dst_union22` +WHERE `k1` > 20) AS `t2` +LEFT JOIN (SELECT `k1`, `k3`, `k4` +FROM `default`.`dst_union22_delta` +WHERE `ds` = '1' AND `k0` > 50 AND `k1` > 20) AS `t4` ON `t2`.`k1` = `t4`.`k1` AND `t2`.`=` STAGE DEPENDENCIES: Stage-3 is a root stage Stage-1 depends on stages: Stage-3 diff --git ql/src/test/results/clientpositive/spark/vectorization_0.q.out ql/src/test/results/clientpositive/spark/vectorization_0.q.out index ac8675cdf4..bd65620392 100644 --- ql/src/test/results/clientpositive/spark/vectorization_0.q.out +++ ql/src/test/results/clientpositive/spark/vectorization_0.q.out @@ -30749,6 +30749,9 @@ POSTHOOK: query: explain extended select * from alltypesorc where POSTHOOK: type: QUERY POSTHOOK: Input: default@alltypesorc #### A masked pattern was here #### +OPTIMIZED SQL: SELECT `ctinyint`, `csmallint`, `cint`, `cbigint`, `cfloat`, `cdouble`, `cstring1`, `cstring2`, `ctimestamp1`, `ctimestamp2`, `cboolean1`, `cboolean2` +FROM `default`.`alltypesorc` +WHERE ROW(`cint`, `cfloat`) IN (ROW(49, 3.5), ROW(47, 2.09), ROW(45, 3.02)) STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 @@ -30991,6 +30994,11 @@ POSTHOOK: query: explain extended select count(*),cstring1 from alltypesorc wher POSTHOOK: type: QUERY POSTHOOK: Input: default@alltypesorc #### A masked pattern was here #### +OPTIMIZED SQL: SELECT COUNT(*) AS `_o__c0`, `cstring1` +FROM `default`.`alltypesorc` +WHERE `cstring1` IN ('biology', 'history', 'topology') +GROUP BY `cstring1` +ORDER BY `cstring1` STAGE DEPENDENCIES: Stage-1 is a root stage Stage-0 depends on stages: Stage-1 diff --git ql/src/test/results/clientpositive/spark/vectorization_5.q.out ql/src/test/results/clientpositive/spark/vectorization_5.q.out index 1a0ac89661..bb4d6c31be 100644 --- ql/src/test/results/clientpositive/spark/vectorization_5.q.out +++ ql/src/test/results/clientpositive/spark/vectorization_5.q.out @@ -61,7 +61,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((cboolean2 is not null and (cstring1 like '%b%')) or ((UDFToDouble(ctinyint) = cdouble) and ctimestamp2 is not null and (cstring2 like 'a'))) (type: boolean) + filterExpr: (((cstring1 like '%b%') and cboolean2 is not null) or ((UDFToDouble(ctinyint) = cdouble) and (cstring2 like 'a') and ctimestamp2 is not null)) (type: boolean) Statistics: Num rows: 12288 Data size: 2907994 Basic stats: COMPLETE Column stats: NONE TableScan Vectorization: native: true @@ -70,8 +70,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: SelectColumnIsNotNull(col 11:boolean), FilterStringColLikeStringScalar(col 6:string, pattern %b%)), FilterExprAndExpr(children: FilterDoubleColEqualDoubleColumn(col 13:double, col 5:double)(children: CastLongToDouble(col 0:tinyint) -> 13:double), SelectColumnIsNotNull(col 9:timestamp), FilterStringColLikeStringScalar(col 7:string, pattern a))) - predicate: (((UDFToDouble(ctinyint) = cdouble) and ctimestamp2 is not null and (cstring2 like 'a')) or (cboolean2 is not null and (cstring1 like '%b%'))) (type: boolean) + predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: FilterStringColLikeStringScalar(col 6:string, pattern %b%), SelectColumnIsNotNull(col 11:boolean)), FilterExprAndExpr(children: FilterDoubleColEqualDoubleColumn(col 13:double, col 5:double)(children: CastLongToDouble(col 0:tinyint) -> 13:double), FilterStringColLikeStringScalar(col 7:string, pattern a), SelectColumnIsNotNull(col 9:timestamp))) + predicate: (((UDFToDouble(ctinyint) = cdouble) and (cstring2 like 'a') and ctimestamp2 is not null) or ((cstring1 like '%b%') and cboolean2 is not null)) (type: boolean) Statistics: Num rows: 9216 Data size: 2180995 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int) diff --git ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out index 96565305d3..e4a1746502 100644 --- ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out +++ ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out @@ -617,7 +617,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((ctimestamp1 = ctimestamp2) or (cfloat = 762.0) or (cstring1 = 'ss') or ((UDFToLong(csmallint) <= cbigint) and (cboolean2 = 1)) or (cboolean1 is not null and ctimestamp2 is not null and (cstring2 > 'a'))) (type: boolean) + filterExpr: ((ctimestamp1 = ctimestamp2) or (cfloat = 762.0) or (cstring1 = 'ss') or ((UDFToLong(csmallint) <= cbigint) and (cboolean2 = 1)) or ((cstring2 > 'a') and cboolean1 is not null and ctimestamp2 is not null)) (type: boolean) Statistics: Num rows: 12288 Data size: 2907994 Basic stats: COMPLETE Column stats: NONE TableScan Vectorization: native: true @@ -625,8 +625,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterTimestampColEqualTimestampColumn(col 8:timestamp, col 9:timestamp), FilterDoubleColEqualDoubleScalar(col 4:float, val 762.0), FilterStringGroupColEqualStringScalar(col 6:string, val ss), FilterExprAndExpr(children: FilterLongColLessEqualLongColumn(col 1:bigint, col 3:bigint)(children: col 1:smallint), FilterLongColEqualLongScalar(col 11:boolean, val 1)), FilterExprAndExpr(children: SelectColumnIsNotNull(col 10:boolean), SelectColumnIsNotNull(col 9:timestamp), FilterStringGroupColGreaterStringScalar(col 7:string, val a))) - predicate: (((UDFToLong(csmallint) <= cbigint) and (cboolean2 = 1)) or (cboolean1 is not null and ctimestamp2 is not null and (cstring2 > 'a')) or (cfloat = 762.0) or (cstring1 = 'ss') or (ctimestamp1 = ctimestamp2)) (type: boolean) + predicateExpression: FilterExprOrExpr(children: FilterTimestampColEqualTimestampColumn(col 8:timestamp, col 9:timestamp), FilterDoubleColEqualDoubleScalar(col 4:float, val 762.0), FilterStringGroupColEqualStringScalar(col 6:string, val ss), FilterExprAndExpr(children: FilterLongColLessEqualLongColumn(col 1:bigint, col 3:bigint)(children: col 1:smallint), FilterLongColEqualLongScalar(col 11:boolean, val 1)), FilterExprAndExpr(children: FilterStringGroupColGreaterStringScalar(col 7:string, val a), SelectColumnIsNotNull(col 10:boolean), SelectColumnIsNotNull(col 9:timestamp))) + predicate: (((UDFToLong(csmallint) <= cbigint) and (cboolean2 = 1)) or ((cstring2 > 'a') and cboolean1 is not null and ctimestamp2 is not null) or (cfloat = 762.0) or (cstring1 = 'ss') or (ctimestamp1 = ctimestamp2)) (type: boolean) Statistics: Num rows: 12288 Data size: 2907994 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cbigint (type: bigint), ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cdouble (type: double), UDFToDouble(cbigint) (type: double), (UDFToDouble(cbigint) * UDFToDouble(cbigint)) (type: double), UDFToDouble(csmallint) (type: double), (UDFToDouble(csmallint) * UDFToDouble(csmallint)) (type: double), (cdouble * cdouble) (type: double) @@ -2202,7 +2202,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((UDFToInteger(csmallint) >= -257) and ((UDFToInteger(csmallint) = -6432) or ((UDFToDouble(cint) >= cdouble) and (UDFToInteger(ctinyint) <= cint)))) (type: boolean) + filterExpr: ((UDFToInteger(csmallint) >= -257) and (UDFToDouble(cint) >= cdouble) and (UDFToInteger(ctinyint) <= cint)) (type: boolean) Statistics: Num rows: 12288 Data size: 2907994 Basic stats: COMPLETE Column stats: NONE TableScan Vectorization: native: true @@ -2210,9 +2210,9 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprAndExpr(children: FilterLongColGreaterEqualLongScalar(col 1:int, val -257)(children: col 1:smallint), FilterExprOrExpr(children: FilterLongColEqualLongScalar(col 1:int, val -6432)(children: col 1:smallint), FilterExprAndExpr(children: FilterDoubleColGreaterEqualDoubleColumn(col 13:double, col 5:double)(children: CastLongToDouble(col 2:int) -> 13:double), FilterLongColLessEqualLongColumn(col 0:int, col 2:int)(children: col 0:tinyint)))) - predicate: (((UDFToInteger(csmallint) = -6432) or ((UDFToDouble(cint) >= cdouble) and (UDFToInteger(ctinyint) <= cint))) and (UDFToInteger(csmallint) >= -257)) (type: boolean) - Statistics: Num rows: 2503 Data size: 592342 Basic stats: COMPLETE Column stats: NONE + predicateExpression: FilterExprAndExpr(children: FilterLongColGreaterEqualLongScalar(col 1:int, val -257)(children: col 1:smallint), FilterDoubleColGreaterEqualDoubleColumn(col 13:double, col 5:double)(children: CastLongToDouble(col 2:int) -> 13:double), FilterLongColLessEqualLongColumn(col 0:int, col 2:int)(children: col 0:tinyint)) + predicate: ((UDFToDouble(cint) >= cdouble) and (UDFToInteger(csmallint) >= -257) and (UDFToInteger(ctinyint) <= cint)) (type: boolean) + Statistics: Num rows: 455 Data size: 107677 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: csmallint (type: smallint), cbigint (type: bigint), ctinyint (type: tinyint), UDFToDouble(csmallint) (type: double), (UDFToDouble(csmallint) * UDFToDouble(csmallint)) (type: double), UDFToDouble(ctinyint) (type: double), (UDFToDouble(ctinyint) * UDFToDouble(ctinyint)) (type: double) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 @@ -2221,7 +2221,7 @@ STAGE PLANS: native: true projectedOutputColumnNums: [1, 3, 0, 14, 17, 18, 21] selectExpressions: CastLongToDouble(col 1:smallint) -> 14:double, DoubleColMultiplyDoubleColumn(col 15:double, col 16:double)(children: CastLongToDouble(col 1:smallint) -> 15:double, CastLongToDouble(col 1:smallint) -> 16:double) -> 17:double, CastLongToDouble(col 0:tinyint) -> 18:double, DoubleColMultiplyDoubleColumn(col 19:double, col 20:double)(children: CastLongToDouble(col 0:tinyint) -> 19:double, CastLongToDouble(col 0:tinyint) -> 20:double) -> 21:double - Statistics: Num rows: 2503 Data size: 592342 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 455 Data size: 107677 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: sum(_col4), sum(_col3), count(_col0), sum(_col1), sum(_col6), sum(_col5), count(_col2), count() Group By Vectorization: @@ -2235,7 +2235,7 @@ STAGE PLANS: keys: _col0 (type: smallint) mode: hash outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 2503 Data size: 592342 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 455 Data size: 107677 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: smallint) sort order: + @@ -2244,7 +2244,7 @@ STAGE PLANS: className: VectorReduceSinkLongOperator native: true nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine spark IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true - Statistics: Num rows: 2503 Data size: 592342 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 455 Data size: 107677 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: double), _col2 (type: double), _col3 (type: bigint), _col4 (type: bigint), _col5 (type: double), _col6 (type: double), _col7 (type: bigint), _col8 (type: bigint) Execution mode: vectorized Map Vectorization: @@ -2278,7 +2278,7 @@ STAGE PLANS: keys: KEY._col0 (type: smallint) mode: mergepartial outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 - Statistics: Num rows: 1251 Data size: 296052 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 227 Data size: 53720 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: _col0 (type: smallint), (UDFToInteger(_col0) % -75) (type: int), power(((_col1 - ((_col2 * _col2) / _col3)) / CASE WHEN ((_col3 = 1L)) THEN (null) ELSE ((_col3 - 1)) END), 0.5) (type: double), (-1.389 / CAST( _col0 AS decimal(5,0))) (type: decimal(10,9)), _col4 (type: bigint), (UDFToDouble((UDFToInteger(_col0) % -75)) / UDFToDouble(_col4)) (type: double), (- (UDFToInteger(_col0) % -75)) (type: int), ((_col5 - ((_col6 * _col6) / _col7)) / _col7) (type: double), (- (- (UDFToInteger(_col0) % -75))) (type: int), _col8 (type: bigint), (_col8 - -89010L) (type: bigint) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 @@ -2287,7 +2287,7 @@ STAGE PLANS: native: true projectedOutputColumnNums: [0, 9, 17, 19, 4, 23, 25, 29, 32, 8, 33] selectExpressions: LongColModuloLongScalar(col 0:int, val -75)(children: col 0:smallint) -> 9:int, FuncPowerDoubleToDouble(col 16:double)(children: DoubleColDivideLongColumn(col 12:double, col 15:bigint)(children: DoubleColSubtractDoubleColumn(col 1:double, col 11:double)(children: DoubleColDivideLongColumn(col 10:double, col 3:bigint)(children: DoubleColMultiplyDoubleColumn(col 2:double, col 2:double) -> 10:double) -> 11:double) -> 12:double, IfExprNullCondExpr(col 13:boolean, null, col 14:bigint)(children: LongColEqualLongScalar(col 3:bigint, val 1) -> 13:boolean, LongColSubtractLongScalar(col 3:bigint, val 1) -> 14:bigint) -> 15:bigint) -> 16:double) -> 17:double, DecimalScalarDivideDecimalColumn(val -1.389, col 18:decimal(5,0))(children: CastLongToDecimal(col 0:smallint) -> 18:decimal(5,0)) -> 19:decimal(10,9), DoubleColDivideDoubleColumn(col 21:double, col 22:double)(children: CastLongToDouble(col 20:int)(children: LongColModuloLongScalar(col 0:int, val -75)(children: col 0:smallint) -> 20:int) -> 21:double, CastLongToDouble(col 4:bigint) -> 22:double) -> 23:double, LongColUnaryMinus(col 24:int)(children: LongColModuloLongScalar(col 0:int, val -75)(children: col 0:smallint) -> 24:int) -> 25:int, DoubleColDivideLongColumn(col 28:double, col 7:bigint)(children: DoubleColSubtractDoubleColumn(col 5:double, col 27:double)(children: DoubleColDivideLongColumn(col 26:double, col 7:bigint)(children: DoubleColMultiplyDoubleColumn(col 6:double, col 6:double) -> 26:double) -> 27:double) -> 28:double) -> 29:double, LongColUnaryMinus(col 31:int)(children: LongColUnaryMinus(col 30:int)(children: LongColModuloLongScalar(col 0:int, val -75)(children: col 0:smallint) -> 30:int) -> 31:int) -> 32:int, LongColSubtractLongScalar(col 8:bigint, val -89010) -> 33:bigint - Statistics: Num rows: 1251 Data size: 296052 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 227 Data size: 53720 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: smallint), _col1 (type: int), _col2 (type: double), _col3 (type: decimal(10,9)), _col4 (type: bigint), _col5 (type: double), _col6 (type: int), _col7 (type: double), _col8 (type: int), _col9 (type: bigint), _col10 (type: bigint) sort order: +++++++++++ @@ -2295,7 +2295,7 @@ STAGE PLANS: className: VectorReduceSinkObjectHashOperator native: true nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine spark IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true - Statistics: Num rows: 1251 Data size: 296052 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 227 Data size: 53720 Basic stats: COMPLETE Column stats: NONE TopN Hash Memory Usage: 0.1 Reducer 3 Execution mode: vectorized @@ -2313,7 +2313,7 @@ STAGE PLANS: className: VectorSelectOperator native: true projectedOutputColumnNums: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] - Statistics: Num rows: 1251 Data size: 296052 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 227 Data size: 53720 Basic stats: COMPLETE Column stats: NONE Limit Number of rows: 20 Limit Vectorization: diff --git ql/src/test/results/clientpositive/spark/vectorized_math_funcs.q.out ql/src/test/results/clientpositive/spark/vectorized_math_funcs.q.out index 977725ca4c..d74264432d 100644 --- ql/src/test/results/clientpositive/spark/vectorized_math_funcs.q.out +++ ql/src/test/results/clientpositive/spark/vectorized_math_funcs.q.out @@ -123,7 +123,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: (((cbigint % 500) = 0) and (sin(cfloat) >= -1.0D)) (type: boolean) + filterExpr: (((cbigint % 500L) = 0) and (sin(cfloat) >= -1.0D)) (type: boolean) Statistics: Num rows: 12288 Data size: 2907994 Basic stats: COMPLETE Column stats: NONE TableScan Vectorization: native: true @@ -132,7 +132,7 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: FilterExprAndExpr(children: FilterLongColEqualLongScalar(col 13:bigint, val 0)(children: LongColModuloLongScalar(col 3:bigint, val 500) -> 13:bigint), FilterDoubleColGreaterEqualDoubleScalar(col 14:double, val -1.0)(children: FuncSinDoubleToDouble(col 4:float) -> 14:double)) - predicate: (((cbigint % 500) = 0) and (sin(cfloat) >= -1.0D)) (type: boolean) + predicate: (((cbigint % 500L) = 0) and (sin(cfloat) >= -1.0D)) (type: boolean) Statistics: Num rows: 2048 Data size: 484665 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cdouble (type: double), round(cdouble, 2) (type: double), floor(cdouble) (type: bigint), ceil(cdouble) (type: bigint), rand() (type: double), rand(98007) (type: double), exp(ln(cdouble)) (type: double), ln(cdouble) (type: double), ln(cfloat) (type: double), log10(cdouble) (type: double), log2(cdouble) (type: double), log2((cdouble - 15601.0D)) (type: double), log2(cfloat) (type: double), log2(cbigint) (type: double), log2(cint) (type: double), log2(csmallint) (type: double), log2(ctinyint) (type: double), log(2, cdouble) (type: double), power(log2(cdouble), 2) (type: double), power(log2(cdouble), 2) (type: double), sqrt(cdouble) (type: double), sqrt(cbigint) (type: double), bin(cbigint) (type: string), hex(cdouble) (type: string), conv(cbigint, 10, 16) (type: string), abs(cdouble) (type: double), abs(ctinyint) (type: int), (cint pmod 3) (type: int), sin(cdouble) (type: double), asin(cdouble) (type: double), cos(cdouble) (type: double), acos(cdouble) (type: double), atan(cdouble) (type: double), degrees(cdouble) (type: double), radians(cdouble) (type: double), cdouble (type: double), cbigint (type: bigint), (- cdouble) (type: double), sign(cdouble) (type: double), sign(cbigint) (type: double), cos(((- sin(log(cdouble))) + 3.14159D)) (type: double) diff --git ql/src/test/results/clientpositive/spark/vectorized_string_funcs.q.out ql/src/test/results/clientpositive/spark/vectorized_string_funcs.q.out index 79546c5a73..4e781071c4 100644 --- ql/src/test/results/clientpositive/spark/vectorized_string_funcs.q.out +++ ql/src/test/results/clientpositive/spark/vectorized_string_funcs.q.out @@ -63,10 +63,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: (((cbigint % 237) = 0) and (length(substr(cstring1, 1, 2)) <= 2) and (cstring1 like '%')) (type: boolean) + filterExpr: (((cbigint % 237L) = 0) and (length(substr(cstring1, 1, 2)) <= 2) and (cstring1 like '%')) (type: boolean) Statistics: Num rows: 12288 Data size: 2907994 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((cbigint % 237) = 0) and (cstring1 like '%') and (length(substr(cstring1, 1, 2)) <= 2)) (type: boolean) + predicate: (((cbigint % 237L) = 0) and (cstring1 like '%') and (length(substr(cstring1, 1, 2)) <= 2)) (type: boolean) Statistics: Num rows: 1024 Data size: 242332 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: substr(cstring1, 1, 2) (type: string), substr(cstring1, 2) (type: string), lower(cstring1) (type: string), upper(cstring1) (type: string), upper(cstring1) (type: string), length(cstring1) (type: int), trim(cstring1) (type: string), ltrim(cstring1) (type: string), rtrim(cstring1) (type: string), concat(cstring1, cstring2) (type: string), concat('>', cstring1) (type: string), concat(cstring1, '<') (type: string), concat(substr(cstring1, 1, 2), substr(cstring2, 1, 2)) (type: string) diff --git ql/src/test/results/clientpositive/subquery_notin_having.q.out ql/src/test/results/clientpositive/subquery_notin_having.q.out index eca27ad8f4..25bf7f4612 100644 --- ql/src/test/results/clientpositive/subquery_notin_having.q.out +++ ql/src/test/results/clientpositive/subquery_notin_having.q.out @@ -127,7 +127,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col5 Statistics: Num rows: 333 Data size: 37299 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col2 = 0L) or (_col5 is null and _col0 is not null and (_col3 >= _col2))) (type: boolean) + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col0 is null) and (_col0 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) Statistics: Num rows: 333 Data size: 37299 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: bigint) @@ -349,15 +349,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col3, _col4, _col7 Statistics: Num rows: 7 Data size: 798 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col3 = 0L)) THEN (true) WHEN (_col3 is null) THEN (true) WHEN (_col7 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col4 < _col3)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 3 Data size: 354 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col4 < _col3) is not true or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null or _col0 is null) and (_col0 is not null or ((_col3 = 0L) or _col3 is null) is true or _col7 is not null) and (_col7 is null or ((_col3 = 0L) or _col3 is null) is true)) (type: boolean) + Statistics: Num rows: 7 Data size: 798 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: double) outputColumnNames: _col0, _col1 - Statistics: Num rows: 3 Data size: 318 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 7 Data size: 742 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 3 Data size: 318 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 7 Data size: 742 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -646,7 +646,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col5 Statistics: Num rows: 6 Data size: 740 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col2 = 0L) or (_col5 is null and _col0 is not null and (_col3 >= _col2))) (type: boolean) + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col0 is null) and (_col0 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) Statistics: Num rows: 6 Data size: 740 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: double) @@ -956,7 +956,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col4 Statistics: Num rows: 2 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col1 = 0L) or (_col4 is null and _col0 is not null and (_col2 >= _col1))) (type: boolean) + predicate: (((_col2 >= _col1) or (_col1 = 0L) or _col4 is not null or _col0 is null) and (_col0 is not null or (_col1 = 0L) or _col4 is not null) and (_col4 is null or (_col1 = 0L))) (type: boolean) Statistics: Num rows: 2 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int) @@ -1172,7 +1172,7 @@ STAGE PLANS: outputColumnNames: _col0, _col2, _col3, _col5 Statistics: Num rows: 2 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col2 = 0L)) THEN (true) WHEN (_col2 is null) THEN (true) WHEN (_col5 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col3 < _col2)) THEN (false) ELSE (true) END (type: boolean) + predicate: (((_col3 < _col2) is not true or ((_col2 = 0L) or _col2 is null) is true or _col5 is not null or _col0 is null) and (_col0 is not null or ((_col2 = 0L) or _col2 is null) is true or _col5 is not null) and (_col5 is null or ((_col2 = 0L) or _col2 is null) is true)) (type: boolean) Statistics: Num rows: 1 Data size: 24 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: int) diff --git ql/src/test/results/clientpositive/subquery_unqualcolumnrefs.q.out ql/src/test/results/clientpositive/subquery_unqualcolumnrefs.q.out index e28860dd01..f331d7a04a 100644 --- ql/src/test/results/clientpositive/subquery_unqualcolumnrefs.q.out +++ ql/src/test/results/clientpositive/subquery_unqualcolumnrefs.q.out @@ -465,15 +465,15 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col4, _col5, _col8 Statistics: Num rows: 38 Data size: 8914 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: CASE WHEN ((_col4 = 0L)) THEN (true) WHEN (_col4 is null) THEN (true) WHEN (_col8 is not null) THEN (false) WHEN (_col0 is null) THEN (null) WHEN ((_col5 < _col4)) THEN (false) ELSE (true) END (type: boolean) - Statistics: Num rows: 19 Data size: 4457 Basic stats: COMPLETE Column stats: COMPLETE + predicate: (((_col5 < _col4) is not true or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null or _col0 is null) and (_col0 is not null or ((_col4 = 0L) or _col4 is null) is true or _col8 is not null) and (_col8 is null or ((_col4 = 0L) or _col4 is null) is true)) (type: boolean) + Statistics: Num rows: 38 Data size: 8914 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col1 (type: string), _col0 (type: string), _col2 (type: int) outputColumnNames: _col0, _col1, _col2 - Statistics: Num rows: 19 Data size: 4237 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 38 Data size: 8474 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false - Statistics: Num rows: 19 Data size: 4237 Basic stats: COMPLETE Column stats: COMPLETE + Statistics: Num rows: 38 Data size: 8474 Basic stats: COMPLETE Column stats: COMPLETE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git ql/src/test/results/clientpositive/timestamp_ints_casts.q.out ql/src/test/results/clientpositive/timestamp_ints_casts.q.out index 83d4557c8a..c73d41dc95 100644 --- ql/src/test/results/clientpositive/timestamp_ints_casts.q.out +++ ql/src/test/results/clientpositive/timestamp_ints_casts.q.out @@ -48,10 +48,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((cbigint % 250) = 0) (type: boolean) + filterExpr: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 12288 Data size: 1684250 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((cbigint % 250) = 0) (type: boolean) + predicate: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 6144 Data size: 842180 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: CAST( ctinyint AS TIMESTAMP) (type: timestamp), CAST( csmallint AS TIMESTAMP) (type: timestamp), CAST( cint AS TIMESTAMP) (type: timestamp), CAST( cbigint AS TIMESTAMP) (type: timestamp), CAST( cfloat AS TIMESTAMP) (type: timestamp), CAST( cdouble AS TIMESTAMP) (type: timestamp), CAST( cboolean1 AS TIMESTAMP) (type: timestamp), CAST( (cbigint * 0L) AS TIMESTAMP) (type: timestamp), ctimestamp1 (type: timestamp), CAST( cstring1 AS TIMESTAMP) (type: timestamp), CAST( substr(cstring1, 1, 1) AS TIMESTAMP) (type: timestamp) @@ -186,10 +186,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((cbigint % 250) = 0) (type: boolean) + filterExpr: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 12288 Data size: 1684250 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((cbigint % 250) = 0) (type: boolean) + predicate: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 6144 Data size: 842180 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: CAST( ctinyint AS TIMESTAMP) (type: timestamp), CAST( csmallint AS TIMESTAMP) (type: timestamp), CAST( cint AS TIMESTAMP) (type: timestamp), CAST( cbigint AS TIMESTAMP) (type: timestamp), CAST( cfloat AS TIMESTAMP) (type: timestamp), CAST( cdouble AS TIMESTAMP) (type: timestamp), CAST( cboolean1 AS TIMESTAMP) (type: timestamp), CAST( (cbigint * 0L) AS TIMESTAMP) (type: timestamp), ctimestamp1 (type: timestamp), CAST( cstring1 AS TIMESTAMP) (type: timestamp), CAST( substr(cstring1, 1, 1) AS TIMESTAMP) (type: timestamp) diff --git ql/src/test/results/clientpositive/truncate_column_list_bucket.q.out ql/src/test/results/clientpositive/truncate_column_list_bucket.q.out index dc44d1da72..3cc5b46652 100644 --- ql/src/test/results/clientpositive/truncate_column_list_bucket.q.out +++ ql/src/test/results/clientpositive/truncate_column_list_bucket.q.out @@ -59,7 +59,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@test_tab_n3 POSTHOOK: Input: default@test_tab_n3@part=1 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('484' AS STRING) AS `key`, `value`, CAST('1' AS STRING) AS `part` +OPTIMIZED SQL: SELECT CAST('484' AS VARCHAR(65536)) AS `key`, `value`, CAST('1' AS VARCHAR(65536)) AS `part` FROM `default`.`test_tab_n3` WHERE `part` = '1' AND `key` = '484' STAGE DEPENDENCIES: @@ -186,7 +186,7 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@test_tab_n3 POSTHOOK: Input: default@test_tab_n3@part=1 #### A masked pattern was here #### -OPTIMIZED SQL: SELECT CAST('0' AS STRING) AS `key`, `value`, CAST('1' AS STRING) AS `part` +OPTIMIZED SQL: SELECT CAST('0' AS VARCHAR(65536)) AS `key`, `value`, CAST('1' AS VARCHAR(65536)) AS `part` FROM `default`.`test_tab_n3` WHERE `part` = '1' AND `key` = '0' STAGE DEPENDENCIES: diff --git ql/src/test/results/clientpositive/udf_isops_simplify.q.out ql/src/test/results/clientpositive/udf_isops_simplify.q.out index 0c5580f59b..dfbfa4334a 100644 --- ql/src/test/results/clientpositive/udf_isops_simplify.q.out +++ ql/src/test/results/clientpositive/udf_isops_simplify.q.out @@ -163,7 +163,7 @@ STAGE PLANS: outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: (not _col0 is not null) (type: boolean) + expressions: _col0 is null (type: boolean) outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE File Output Operator diff --git ql/src/test/results/clientpositive/union22.q.out ql/src/test/results/clientpositive/union22.q.out index abbbce0c8f..046ffaa374 100644 --- ql/src/test/results/clientpositive/union22.q.out +++ ql/src/test/results/clientpositive/union22.q.out @@ -80,6 +80,17 @@ POSTHOOK: Input: default@dst_union22@ds=1 POSTHOOK: Input: default@dst_union22_delta POSTHOOK: Input: default@dst_union22_delta@ds=1 POSTHOOK: Output: default@dst_union22@ds=2 +OPTIMIZED SQL: SELECT `k1`, `k2`, `k3`, `k4` +FROM `default`.`dst_union22_delta` +WHERE `ds` = '1' AND `k0` <= 50 +UNION ALL +SELECT `t2`.`k1`, `t2`.`k2`, `t4`.`k3`, `t4`.`k4` +FROM (SELECT `k1`, `k2`, `ds` = '1' AS `=` +FROM `default`.`dst_union22` +WHERE `k1` > 20) AS `t2` +LEFT JOIN (SELECT `k1`, `k3`, `k4` +FROM `default`.`dst_union22_delta` +WHERE `ds` = '1' AND `k0` > 50 AND `k1` > 20) AS `t4` ON `t2`.`k1` = `t4`.`k1` AND `t2`.`=` STAGE DEPENDENCIES: Stage-7 is a root stage , consists of Stage-8, Stage-4 Stage-8 has a backup stage: Stage-4 diff --git ql/src/test/results/clientpositive/union_offcbo.q.out ql/src/test/results/clientpositive/union_offcbo.q.out index 2e5675fe8e..76d99da9d8 100644 --- ql/src/test/results/clientpositive/union_offcbo.q.out +++ ql/src/test/results/clientpositive/union_offcbo.q.out @@ -644,10 +644,10 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((COALESCE(_col0,-1) <> COALESCE(_col7,-1)) or (COALESCE(_col1,-1) <> COALESCE(_col8,-1))) and CASE WHEN ((_col0 is null and (_col3 >= '2016-02-05'))) THEN (true) WHEN ((_col0 is null and (_col3 <= '2016-02-05'))) THEN (false) WHEN (((_col7 = _col0) and (_col8 <> _col1))) THEN (true) ELSE (true) END) (type: boolean) + predicate: (((COALESCE(_col0,-1) <> COALESCE(_col7,-1)) or (COALESCE(_col1,-1) <> COALESCE(_col8,-1))) and (CASE WHEN ((_col0 is null and (_col3 >= '2016-02-05') and _col7 is not null)) THEN ('DEL') WHEN ((_col0 is null and (_col3 <= '2016-02-05') and _col7 is not null)) THEN ('RET') WHEN (((_col7 = _col0) and (_col8 <> _col1))) THEN ('A_INS') ELSE ('NA') END <> 'RET')) (type: boolean) Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col2 (type: bigint), _col5 (type: string), _col6 (type: bigint), _col4 (type: string), _col7 (type: string), _col8 (type: string), CASE WHEN ((_col0 is null and (_col3 >= '2016-02-05'))) THEN ('DEL') WHEN ((_col0 is null and (_col3 <= '2016-02-05'))) THEN ('RET') WHEN (((_col7 = _col0) and (_col8 <> _col1))) THEN ('A_INS') ELSE ('NA') END (type: string) + expressions: _col2 (type: bigint), _col5 (type: string), _col6 (type: bigint), _col4 (type: string), _col7 (type: string), _col8 (type: string), CASE WHEN ((_col0 is null and (_col3 >= '2016-02-05') and _col7 is not null)) THEN ('DEL') WHEN ((_col0 is null and (_col3 <= '2016-02-05') and _col7 is not null)) THEN ('RET') WHEN (((_col7 = _col0) and (_col8 <> _col1))) THEN ('A_INS') ELSE ('NA') END (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -715,34 +715,34 @@ STAGE PLANS: TableScan alias: ttest2 filterExpr: ('2015-11-20' BETWEEN dt1 AND dt2 and khash is not null) (type: boolean) - Statistics: Num rows: 1 Data size: 736 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 920 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: ('2015-11-20' BETWEEN dt1 AND dt2 and khash is not null) (type: boolean) - Statistics: Num rows: 1 Data size: 736 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 920 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: khash (type: string), rhash (type: string) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 1 Data size: 736 Basic stats: COMPLETE Column stats: NONE + expressions: ts1 (type: string), khash (type: string), rhash (type: string) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 920 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: _col0 (type: string) + key expressions: _col1 (type: string) sort order: + - Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 1 Data size: 736 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: string) + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 1 Data size: 920 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col2 (type: string) Reduce Operator Tree: Join Operator condition map: Left Outer Join 0 to 1 keys: 0 _col3 (type: string) - 1 _col0 (type: string) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + 1 _col1 (type: string) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 Statistics: Num rows: 1 Data size: 422 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((COALESCE(_col3,-1) <> COALESCE(_col5,-1)) or (COALESCE(_col4,-1) <> COALESCE(_col6,-1))) (type: boolean) + predicate: (((COALESCE(_col3,-1) <> COALESCE(_col6,-1)) or (COALESCE(_col4,-1) <> COALESCE(_col7,-1))) and (CASE WHEN ((_col3 is null and (_col5 <= '2015-11-20') and _col6 is not null)) THEN ('DEL') WHEN (((_col6 is null and _col3 is not null) or ((_col6 = _col3) and (_col7 <> _col4)))) THEN ('INS') ELSE ('NA') END <> 'RET')) (type: boolean) Statistics: Num rows: 1 Data size: 422 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: bigint), '2099-12-31' (type: string), _col3 (type: string), _col4 (type: string), CASE WHEN ((_col5 is null or ((_col5 = _col3) and (_col6 <> _col4)))) THEN ('INS') ELSE ('NA') END (type: string) + expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: bigint), '2099-12-31' (type: string), _col3 (type: string), _col4 (type: string), CASE WHEN ((_col3 is null and (_col5 <= '2015-11-20') and _col6 is not null)) THEN ('DEL') WHEN (((_col6 is null and _col3 is not null) or ((_col6 = _col3) and (_col7 <> _col4)))) THEN ('INS') ELSE ('NA') END (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 Statistics: Num rows: 1 Data size: 422 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -1713,10 +1713,10 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8 Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((COALESCE(_col0,-1) <> COALESCE(_col7,-1)) or (COALESCE(_col1,-1) <> COALESCE(_col8,-1))) and CASE WHEN ((_col0 is null and (_col3 >= '2016-02-05'))) THEN (true) WHEN ((_col0 is null and (_col3 <= '2016-02-05'))) THEN (false) WHEN (((_col7 = _col0) and (_col8 <> _col1))) THEN (true) ELSE (true) END) (type: boolean) + predicate: (((COALESCE(_col0,-1) <> COALESCE(_col7,-1)) or (COALESCE(_col1,-1) <> COALESCE(_col8,-1))) and (CASE WHEN ((_col0 is null and (_col3 >= '2016-02-05') and _col7 is not null)) THEN ('DEL') WHEN ((_col0 is null and (_col3 <= '2016-02-05') and _col7 is not null)) THEN ('RET') WHEN (((_col7 = _col0) and (_col8 <> _col1))) THEN ('A_INS') ELSE ('NA') END <> 'RET')) (type: boolean) Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col2 (type: bigint), _col5 (type: string), _col6 (type: bigint), _col4 (type: string), _col7 (type: string), _col8 (type: string), CASE WHEN ((_col0 is null and (_col3 >= '2016-02-05'))) THEN ('DEL') WHEN ((_col0 is null and (_col3 <= '2016-02-05'))) THEN ('RET') WHEN (((_col7 = _col0) and (_col8 <> _col1))) THEN ('A_INS') ELSE ('NA') END (type: string) + expressions: _col2 (type: bigint), _col5 (type: string), _col6 (type: bigint), _col4 (type: string), _col7 (type: string), _col8 (type: string), CASE WHEN ((_col0 is null and (_col3 >= '2016-02-05') and _col7 is not null)) THEN ('DEL') WHEN ((_col0 is null and (_col3 <= '2016-02-05') and _col7 is not null)) THEN ('RET') WHEN (((_col7 = _col0) and (_col8 <> _col1))) THEN ('A_INS') ELSE ('NA') END (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 Statistics: Num rows: 1 Data size: 220 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -1782,34 +1782,34 @@ STAGE PLANS: value expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: bigint), _col4 (type: string) TableScan alias: ttest2 - Statistics: Num rows: 1 Data size: 736 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 920 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: ('2015-11-20' BETWEEN dt1 AND dt2 and khash is not null) (type: boolean) - Statistics: Num rows: 1 Data size: 736 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 920 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: khash (type: string), rhash (type: string) - outputColumnNames: _col0, _col1 - Statistics: Num rows: 1 Data size: 736 Basic stats: COMPLETE Column stats: NONE + expressions: ts1 (type: string), khash (type: string), rhash (type: string) + outputColumnNames: _col0, _col1, _col2 + Statistics: Num rows: 1 Data size: 920 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: _col0 (type: string) + key expressions: _col1 (type: string) sort order: + - Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 1 Data size: 736 Basic stats: COMPLETE Column stats: NONE - value expressions: _col1 (type: string) + Map-reduce partition columns: _col1 (type: string) + Statistics: Num rows: 1 Data size: 920 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: string), _col2 (type: string) Reduce Operator Tree: Join Operator condition map: Left Outer Join 0 to 1 keys: 0 _col3 (type: string) - 1 _col0 (type: string) - outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 + 1 _col1 (type: string) + outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 Statistics: Num rows: 1 Data size: 422 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((COALESCE(_col3,-1) <> COALESCE(_col5,-1)) or (COALESCE(_col4,-1) <> COALESCE(_col6,-1))) (type: boolean) + predicate: (((COALESCE(_col3,-1) <> COALESCE(_col6,-1)) or (COALESCE(_col4,-1) <> COALESCE(_col7,-1))) and (CASE WHEN ((_col3 is null and (_col5 <= '2015-11-20') and _col6 is not null)) THEN ('DEL') WHEN (((_col6 is null and _col3 is not null) or ((_col6 = _col3) and (_col7 <> _col4)))) THEN ('INS') ELSE ('NA') END <> 'RET')) (type: boolean) Statistics: Num rows: 1 Data size: 422 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: bigint), '2099-12-31' (type: string), _col3 (type: string), _col4 (type: string), CASE WHEN ((_col5 is null or ((_col5 = _col3) and (_col6 <> _col4)))) THEN ('INS') ELSE ('NA') END (type: string) + expressions: _col0 (type: bigint), _col1 (type: string), _col2 (type: bigint), '2099-12-31' (type: string), _col3 (type: string), _col4 (type: string), CASE WHEN ((_col3 is null and (_col5 <= '2015-11-20') and _col6 is not null)) THEN ('DEL') WHEN (((_col6 is null and _col3 is not null) or ((_col6 = _col3) and (_col7 <> _col4)))) THEN ('INS') ELSE ('NA') END (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6 Statistics: Num rows: 1 Data size: 422 Basic stats: COMPLETE Column stats: NONE File Output Operator diff --git ql/src/test/results/clientpositive/vector_case_when_1.q.out ql/src/test/results/clientpositive/vector_case_when_1.q.out index 61062e1f8e..217af673ba 100644 --- ql/src/test/results/clientpositive/vector_case_when_1.q.out +++ ql/src/test/results/clientpositive/vector_case_when_1.q.out @@ -206,13 +206,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:l_orderkey:int, 1:l_partkey:int, 2:l_suppkey:int, 3:l_linenumber:int, 4:l_quantity:int, 5:l_extendedprice:double, 6:l_discount:double, 7:l_tax:decimal(10,2)/DECIMAL_64, 8:l_returnflag:char(1), 9:l_linestatus:char(1), 10:l_shipdate:date, 11:l_commitdate:date, 12:l_receiptdate:date, 13:l_shipinstruct:varchar(20), 14:l_shipmode:char(10), 15:l_comment:string, 16:ROW__ID:struct] Select Operator - expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN (null) ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) + expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16 Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [4, 21, 26, 31, 35, 39, 43, 45, 47, 49, 51, 53, 55, 59, 62, 65, 68] - selectExpressions: VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 22:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 23:boolean, LongColLessLongScalar(col 4:int, val 10) -> 24:boolean, LongColLessLongScalar(col 4:int, val 100) -> 25:boolean) -> 26:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN (null) ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 27:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 28:boolean, LongColLessLongScalar(col 4:int, val 10) -> 29:boolean, LongColLessLongScalar(col 4:int, val 100) -> 30:boolean) -> 31:string, IfExprLongColumnLongColumn(col 32:boolean, col 33:date, col 34:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 32:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 33:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 34:date) -> 35:date, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 36:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 37:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 37:double) -> 38:double) -> 39:double, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 40:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 41:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 41:double) -> 42:double) -> 43:double, VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 44:boolean) -> 45:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 46:boolean) -> 47:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 48:boolean) -> 49:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 50:boolean) -> 51:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 52:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 52:boolean) -> 53:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 54:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 54:boolean) -> 55:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 56:boolean, col 57:timestampcol 58:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 56:boolean, CastDateToTimestamp(col 12:date) -> 57:timestamp, CastDateToTimestamp(col 11:date) -> 58:timestamp) -> 59:timestamp, VectorUDFAdaptor(if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 60:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 61:int) -> 62:int, VectorUDFAdaptor(if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 63:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 64:int) -> 65:int, IfExprLongScalarLongScalar(col 67:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 66:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 66:int) -> 67:boolean) -> 68:date + projectedOutputColumnNums: [4, 21, 26, 30, 34, 38, 42, 44, 46, 48, 50, 52, 54, 58, 61, 64, 67] + selectExpressions: VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 22:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 23:boolean, LongColLessLongScalar(col 4:int, val 10) -> 24:boolean, LongColLessLongScalar(col 4:int, val 100) -> 25:boolean) -> 26:string, VectorUDFAdaptor(CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END)(children: LongColEqualLongScalar(col 4:int, val 1) -> 27:boolean, LongColEqualLongScalar(col 4:int, val 2) -> 28:boolean, LongColLessLongScalar(col 4:int, val 10) -> 29:boolean) -> 30:string, IfExprLongColumnLongColumn(col 31:boolean, col 32:date, col 33:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 31:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 32:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 33:date) -> 34:date, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 35:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 36:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 36:double) -> 37:double) -> 38:double, VectorUDFAdaptor(CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 39:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 40:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 40:double) -> 41:double) -> 42:double, VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 43:boolean) -> 44:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 45:boolean) -> 46:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 47:boolean) -> 48:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 49:boolean) -> 50:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 51:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 51:boolean) -> 52:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 53:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 53:boolean) -> 54:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 55:boolean, col 56:timestampcol 57:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 55:boolean, CastDateToTimestamp(col 12:date) -> 56:timestamp, CastDateToTimestamp(col 11:date) -> 57:timestamp) -> 58:timestamp, VectorUDFAdaptor(if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 59:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 60:int) -> 61:int, VectorUDFAdaptor(if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)))(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 62:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 63:int) -> 64:int, IfExprLongScalarLongScalar(col 66:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 65:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 65:int) -> 66:boolean) -> 67:date Statistics: Num rows: 101 Data size: 141804 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -239,7 +239,7 @@ STAGE PLANS: includeColumns: [1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14] dataColumns: l_orderkey:int, l_partkey:int, l_suppkey:int, l_linenumber:int, l_quantity:int, l_extendedprice:double, l_discount:double, l_tax:decimal(10,2)/DECIMAL_64, l_returnflag:char(1), l_linestatus:char(1), l_shipdate:date, l_commitdate:date, l_receiptdate:date, l_shipinstruct:varchar(20), l_shipmode:char(10), l_comment:string partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, double, double, double, bigint, double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, decimal(12,2), bigint, decimal(12,2), bigint, decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, bigint, timestamp, timestamp, timestamp, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, double, double, double, bigint, double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, decimal(12,2), bigint, decimal(12,2), bigint, decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, bigint, timestamp, timestamp, timestamp, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint] Stage: Stage-0 Fetch Operator @@ -539,13 +539,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:l_orderkey:int, 1:l_partkey:int, 2:l_suppkey:int, 3:l_linenumber:int, 4:l_quantity:int, 5:l_extendedprice:double, 6:l_discount:double, 7:l_tax:decimal(10,2)/DECIMAL_64, 8:l_returnflag:char(1), 9:l_linestatus:char(1), 10:l_shipdate:date, 11:l_commitdate:date, 12:l_receiptdate:date, 13:l_shipinstruct:varchar(20), 14:l_shipmode:char(10), 15:l_comment:string, 16:ROW__ID:struct] Select Operator - expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN (null) ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) + expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16 Select Vectorization: className: VectorSelectOperator native: true projectedOutputColumnNums: [4, 24, 33, 40, 44, 49, 53, 55, 57, 59, 61, 63, 65, 69, 72, 75, 78] - selectExpressions: IfExprStringScalarStringGroupColumn(col 17:boolean, val Singlecol 23:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 22:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, IfExprStringScalarStringGroupColumn(col 19:boolean, val Somecol 21:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, IfExprStringScalarStringScalar(col 20:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string) -> 22:string) -> 23:string) -> 24:string, IfExprStringScalarStringGroupColumn(col 25:boolean, val Singlecol 32:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 25:boolean, IfExprStringScalarStringGroupColumn(col 26:boolean, val Twocol 31:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 26:boolean, IfExprStringScalarStringGroupColumn(col 27:boolean, val Somecol 30:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 27:boolean, IfExprColumnNull(col 28:boolean, col 29:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 28:boolean, ConstantVectorExpression(val Many) -> 29:string) -> 30:string) -> 31:string) -> 32:string) -> 33:string, IfExprStringScalarStringGroupColumn(col 34:boolean, val Singlecol 39:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 34:boolean, IfExprStringScalarStringGroupColumn(col 35:boolean, val Twocol 38:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 35:boolean, IfExprStringScalarStringGroupColumn(col 36:boolean, val Somecol 37:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 36:boolean, IfExprNullNull(null, null) -> 37:string) -> 38:string) -> 39:string) -> 40:string, IfExprLongColumnLongColumn(col 41:boolean, col 42:date, col 43:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 41:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 42:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 43:date) -> 44:date, IfExprDoubleColumnDoubleColumn(col 45:boolean, col 47:doublecol 48:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 45:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 46:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 46:double) -> 47:double, ConstantVectorExpression(val 0.0) -> 48:double) -> 49:double, IfExprDoubleColumnDoubleScalar(col 50:boolean, col 52:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 50:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 51:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 51:double) -> 52:double) -> 53:double, IfExprNullColumn(col 54:boolean, null, col 79)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 54:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 79:decimal(10,2)) -> 55:decimal(10,2), IfExprColumnNull(col 56:boolean, col 80:decimal(10,2), null)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 56:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 80:decimal(10,2)) -> 57:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 58:boolean) -> 59:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 60:boolean) -> 61:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 62:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 62:boolean) -> 63:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 64:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 64:boolean) -> 65:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 66:boolean, col 67:timestampcol 68:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 66:boolean, CastDateToTimestamp(col 12:date) -> 67:timestamp, CastDateToTimestamp(col 11:date) -> 68:timestamp) -> 69:timestamp, IfExprColumnNull(col 70:boolean, col 71:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 70:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 71:int) -> 72:int, IfExprNullColumn(col 73:boolean, null, col 74)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 73:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 74:int) -> 75:int, IfExprLongScalarLongScalar(col 77:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 76:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 76:int) -> 77:boolean) -> 78:date + selectExpressions: IfExprStringScalarStringGroupColumn(col 17:boolean, val Singlecol 23:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, IfExprStringScalarStringGroupColumn(col 18:boolean, val Twocol 22:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 18:boolean, IfExprStringScalarStringGroupColumn(col 19:boolean, val Somecol 21:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 19:boolean, IfExprStringScalarStringScalar(col 20:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 20:boolean) -> 21:string) -> 22:string) -> 23:string) -> 24:string, IfExprStringScalarStringGroupColumn(col 25:boolean, val Singlecol 32:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 25:boolean, IfExprStringScalarStringGroupColumn(col 26:boolean, val Twocol 31:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 26:boolean, IfExprStringScalarStringGroupColumn(col 27:boolean, val Somecol 30:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 27:boolean, IfExprColumnNull(col 28:boolean, col 29:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 28:boolean, ConstantVectorExpression(val Many) -> 29:string) -> 30:string) -> 31:string) -> 32:string) -> 33:string, IfExprStringScalarStringGroupColumn(col 34:boolean, val Singlecol 39:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 34:boolean, IfExprStringScalarStringGroupColumn(col 35:boolean, val Twocol 38:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 35:boolean, IfExprColumnNull(col 36:boolean, col 37:string, null)(children: LongColLessLongScalar(col 4:int, val 10) -> 36:boolean, ConstantVectorExpression(val Some) -> 37:string) -> 38:string) -> 39:string) -> 40:string, IfExprLongColumnLongColumn(col 41:boolean, col 42:date, col 43:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 41:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 42:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 43:date) -> 44:date, IfExprDoubleColumnDoubleColumn(col 45:boolean, col 47:doublecol 48:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 45:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 46:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 46:double) -> 47:double, ConstantVectorExpression(val 0.0) -> 48:double) -> 49:double, IfExprDoubleColumnDoubleScalar(col 50:boolean, col 52:double, val 0.0)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 50:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 51:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 51:double) -> 52:double) -> 53:double, IfExprNullColumn(col 54:boolean, null, col 79)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 54:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 79:decimal(10,2)) -> 55:decimal(10,2), IfExprColumnNull(col 56:boolean, col 80:decimal(10,2), null)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 56:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 80:decimal(10,2)) -> 57:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 58:boolean) -> 59:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 60:boolean) -> 61:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 62:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 62:boolean) -> 63:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 64:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 64:boolean) -> 65:decimal(10,2)/DECIMAL_64, IfExprTimestampColumnColumn(col 66:boolean, col 67:timestampcol 68:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 66:boolean, CastDateToTimestamp(col 12:date) -> 67:timestamp, CastDateToTimestamp(col 11:date) -> 68:timestamp) -> 69:timestamp, IfExprColumnNull(col 70:boolean, col 71:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 70:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 71:int) -> 72:int, IfExprNullColumn(col 73:boolean, null, col 74)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 73:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 74:int) -> 75:int, IfExprLongScalarLongScalar(col 77:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 76:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 76:int) -> 77:boolean) -> 78:date Statistics: Num rows: 101 Data size: 141804 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -872,13 +872,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:l_orderkey:int, 1:l_partkey:int, 2:l_suppkey:int, 3:l_linenumber:int, 4:l_quantity:int, 5:l_extendedprice:double, 6:l_discount:double, 7:l_tax:decimal(10,2)/DECIMAL_64, 8:l_returnflag:char(1), 9:l_linestatus:char(1), 10:l_shipdate:date, 11:l_commitdate:date, 12:l_receiptdate:date, 13:l_shipinstruct:varchar(20), 14:l_shipmode:char(10), 15:l_comment:string, 16:ROW__ID:struct] Select Operator - expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN (null) ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) + expressions: l_quantity (type: int), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE ('Huge number') END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') WHEN ((l_quantity < 100)) THEN ('Many') ELSE (null) END (type: string), CASE WHEN ((l_quantity = 1)) THEN ('Single') WHEN ((l_quantity = 2)) THEN ('Two') WHEN ((l_quantity < 10)) THEN ('Some') ELSE (null) END (type: string), if((l_shipmode = 'SHIP '), date_add(l_shipdate, 10), date_add(l_shipdate, 5)) (type: date), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0) END (type: double), CASE WHEN ((l_returnflag = 'N')) THEN ((l_extendedprice * (1.0D - l_discount))) ELSE (0.0D) END (type: double), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), null, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, null) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(12,2)), if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax) (type: decimal(10,2)), if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0) (type: decimal(10,2)), if((l_partkey > 30), CAST( l_receiptdate AS TIMESTAMP), CAST( l_commitdate AS TIMESTAMP)) (type: timestamp), if((l_suppkey > 10000), datediff(l_receiptdate, l_commitdate), null) (type: int), if((l_suppkey > 10000), null, datediff(l_receiptdate, l_commitdate)) (type: int), if(((l_suppkey % 500) > 100), DATE'2009-01-01', DATE'2009-12-31') (type: date) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16 Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [4, 27, 39, 49, 53, 58, 63, 65, 67, 72, 77, 79, 81, 85, 88, 91, 94] - selectExpressions: IfExprColumnCondExpr(col 17:boolean, col 18:stringcol 26:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, ConstantVectorExpression(val Single) -> 18:string, IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 25:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 19:boolean, ConstantVectorExpression(val Two) -> 20:string, IfExprColumnCondExpr(col 21:boolean, col 22:stringcol 24:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 21:boolean, ConstantVectorExpression(val Some) -> 22:string, IfExprStringScalarStringScalar(col 23:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 23:boolean) -> 24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 28:boolean, col 29:stringcol 38:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 28:boolean, ConstantVectorExpression(val Single) -> 29:string, IfExprColumnCondExpr(col 30:boolean, col 31:stringcol 37:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 30:boolean, ConstantVectorExpression(val Two) -> 31:string, IfExprColumnCondExpr(col 32:boolean, col 33:stringcol 36:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 32:boolean, ConstantVectorExpression(val Some) -> 33:string, IfExprColumnNull(col 34:boolean, col 35:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 34:boolean, ConstantVectorExpression(val Many) -> 35:string) -> 36:string) -> 37:string) -> 38:string) -> 39:string, IfExprColumnCondExpr(col 40:boolean, col 41:stringcol 48:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 40:boolean, ConstantVectorExpression(val Single) -> 41:string, IfExprColumnCondExpr(col 42:boolean, col 43:stringcol 47:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 42:boolean, ConstantVectorExpression(val Two) -> 43:string, IfExprColumnCondExpr(col 44:boolean, col 45:stringcol 46:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 44:boolean, ConstantVectorExpression(val Some) -> 45:string, IfExprNullNull(null, null) -> 46:string) -> 47:string) -> 48:string) -> 49:string, IfExprCondExprCondExpr(col 50:boolean, col 51:datecol 52:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 50:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 51:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 52:date) -> 53:date, IfExprCondExprCondExpr(col 54:boolean, col 56:doublecol 57:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 54:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 55:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 55:double) -> 56:double, ConstantVectorExpression(val 0.0) -> 57:double) -> 58:double, IfExprCondExprColumn(col 59:boolean, col 61:double, col 62:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 59:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 60:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 60:double) -> 61:double, ConstantVectorExpression(val 0.0) -> 62:double) -> 63:double, IfExprNullColumn(col 64:boolean, null, col 95)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 64:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 95:decimal(10,2)) -> 65:decimal(10,2), IfExprColumnNull(col 66:boolean, col 96:decimal(10,2), null)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 66:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 96:decimal(10,2)) -> 67:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 71:boolean) -> 72:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 76:boolean) -> 77:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 78:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 78:boolean) -> 79:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 80:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 80:boolean) -> 81:decimal(10,2)/DECIMAL_64, IfExprCondExprCondExpr(col 82:boolean, col 83:timestampcol 84:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 82:boolean, CastDateToTimestamp(col 12:date) -> 83:timestamp, CastDateToTimestamp(col 11:date) -> 84:timestamp) -> 85:timestamp, IfExprCondExprNull(col 86:boolean, col 87:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 86:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 87:int) -> 88:int, IfExprNullCondExpr(col 89:boolean, null, col 90:int)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 89:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 90:int) -> 91:int, IfExprLongScalarLongScalar(col 93:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 92:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 92:int) -> 93:boolean) -> 94:date + projectedOutputColumnNums: [4, 27, 39, 48, 52, 57, 62, 64, 66, 71, 76, 78, 80, 84, 87, 90, 93] + selectExpressions: IfExprColumnCondExpr(col 17:boolean, col 18:stringcol 26:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 17:boolean, ConstantVectorExpression(val Single) -> 18:string, IfExprColumnCondExpr(col 19:boolean, col 20:stringcol 25:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 19:boolean, ConstantVectorExpression(val Two) -> 20:string, IfExprColumnCondExpr(col 21:boolean, col 22:stringcol 24:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 21:boolean, ConstantVectorExpression(val Some) -> 22:string, IfExprStringScalarStringScalar(col 23:boolean, val Many, val Huge number)(children: LongColLessLongScalar(col 4:int, val 100) -> 23:boolean) -> 24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 28:boolean, col 29:stringcol 38:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 28:boolean, ConstantVectorExpression(val Single) -> 29:string, IfExprColumnCondExpr(col 30:boolean, col 31:stringcol 37:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 30:boolean, ConstantVectorExpression(val Two) -> 31:string, IfExprColumnCondExpr(col 32:boolean, col 33:stringcol 36:string)(children: LongColLessLongScalar(col 4:int, val 10) -> 32:boolean, ConstantVectorExpression(val Some) -> 33:string, IfExprColumnNull(col 34:boolean, col 35:string, null)(children: LongColLessLongScalar(col 4:int, val 100) -> 34:boolean, ConstantVectorExpression(val Many) -> 35:string) -> 36:string) -> 37:string) -> 38:string) -> 39:string, IfExprColumnCondExpr(col 40:boolean, col 41:stringcol 47:string)(children: LongColEqualLongScalar(col 4:int, val 1) -> 40:boolean, ConstantVectorExpression(val Single) -> 41:string, IfExprColumnCondExpr(col 42:boolean, col 43:stringcol 46:string)(children: LongColEqualLongScalar(col 4:int, val 2) -> 42:boolean, ConstantVectorExpression(val Two) -> 43:string, IfExprColumnNull(col 44:boolean, col 45:string, null)(children: LongColLessLongScalar(col 4:int, val 10) -> 44:boolean, ConstantVectorExpression(val Some) -> 45:string) -> 46:string) -> 47:string) -> 48:string, IfExprCondExprCondExpr(col 49:boolean, col 50:datecol 51:date)(children: StringGroupColEqualCharScalar(col 14:char(10), val SHIP) -> 49:boolean, VectorUDFDateAddColScalar(col 10:date, val 10) -> 50:date, VectorUDFDateAddColScalar(col 10:date, val 5) -> 51:date) -> 52:date, IfExprCondExprCondExpr(col 53:boolean, col 55:doublecol 56:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 53:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 54:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 54:double) -> 55:double, ConstantVectorExpression(val 0.0) -> 56:double) -> 57:double, IfExprCondExprColumn(col 58:boolean, col 60:double, col 61:double)(children: StringGroupColEqualCharScalar(col 8:char(1), val N) -> 58:boolean, DoubleColMultiplyDoubleColumn(col 5:double, col 59:double)(children: DoubleScalarSubtractDoubleColumn(val 1.0, col 6:double) -> 59:double) -> 60:double, ConstantVectorExpression(val 0.0) -> 61:double) -> 62:double, IfExprNullColumn(col 63:boolean, null, col 94)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 63:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 94:decimal(10,2)) -> 64:decimal(10,2), IfExprColumnNull(col 65:boolean, col 95:decimal(10,2), null)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 65:boolean, ConvertDecimal64ToDecimal(col 7:decimal(10,2)/DECIMAL_64) -> 95:decimal(10,2)) -> 66:decimal(10,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'DELIVER IN PERSON'), 0, l_tax))(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 70:boolean) -> 71:decimal(12,2), VectorUDFAdaptor(if((CAST( l_shipinstruct AS STRING) = 'TAKE BACK RETURN'), l_tax, 0))(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 75:boolean) -> 76:decimal(12,2), IfExprDecimal64ScalarDecimal64Column(col 77:boolean, decimal64Val 0, decimalVal 0, col 7:decimal(10,2)/DECIMAL_64)(children: StringGroupColEqualStringScalar(col 13:string, val DELIVER IN PERSON)(children: col 13:varchar(20)) -> 77:boolean) -> 78:decimal(10,2)/DECIMAL_64, IfExprDecimal64ColumnDecimal64Scalar(col 79:boolean, col 7:decimal(10,2)/DECIMAL_64, decimal64Val 0, decimalVal 0)(children: StringGroupColEqualStringScalar(col 13:string, val TAKE BACK RETURN)(children: col 13:varchar(20)) -> 79:boolean) -> 80:decimal(10,2)/DECIMAL_64, IfExprCondExprCondExpr(col 81:boolean, col 82:timestampcol 83:timestamp)(children: LongColGreaterLongScalar(col 1:int, val 30) -> 81:boolean, CastDateToTimestamp(col 12:date) -> 82:timestamp, CastDateToTimestamp(col 11:date) -> 83:timestamp) -> 84:timestamp, IfExprCondExprNull(col 85:boolean, col 86:int, null)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 85:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 86:int) -> 87:int, IfExprNullCondExpr(col 88:boolean, null, col 89:int)(children: LongColGreaterLongScalar(col 2:int, val 10000) -> 88:boolean, VectorUDFDateDiffColCol(col 12:date, col 11:date) -> 89:int) -> 90:int, IfExprLongScalarLongScalar(col 92:boolean, val 14245, val 14609)(children: LongColGreaterLongScalar(col 91:int, val 100)(children: LongColModuloLongScalar(col 2:int, val 500) -> 91:int) -> 92:boolean) -> 93:date Statistics: Num rows: 101 Data size: 141804 Basic stats: COMPLETE Column stats: COMPLETE File Output Operator compressed: false @@ -905,7 +905,7 @@ STAGE PLANS: includeColumns: [1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14] dataColumns: l_orderkey:int, l_partkey:int, l_suppkey:int, l_linenumber:int, l_quantity:int, l_extendedprice:double, l_discount:double, l_tax:decimal(10,2)/DECIMAL_64, l_returnflag:char(1), l_linestatus:char(1), l_shipdate:date, l_commitdate:date, l_receiptdate:date, l_shipinstruct:varchar(20), l_shipmode:char(10), l_comment:string partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, string, bigint, string, bigint, string, bigint, string, string, string, string, string, bigint, bigint, bigint, bigint, bigint, double, double, double, double, bigint, double, double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, bigint, decimal(12,2), bigint, decimal(12,2), bigint, decimal(12,2), bigint, bigint, decimal(12,2), bigint, decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, bigint, timestamp, timestamp, timestamp, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, decimal(10,2), decimal(10,2)] + scratchColumnTypeNames: [bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, string, bigint, string, bigint, string, bigint, string, string, string, string, bigint, bigint, bigint, bigint, bigint, double, double, double, double, bigint, double, double, double, double, bigint, decimal(10,2), bigint, decimal(10,2), bigint, bigint, decimal(12,2), bigint, decimal(12,2), bigint, decimal(12,2), bigint, bigint, decimal(12,2), bigint, decimal(10,2)/DECIMAL_64, bigint, decimal(10,2)/DECIMAL_64, bigint, timestamp, timestamp, timestamp, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, decimal(10,2), decimal(10,2)] Stage: Stage-0 Fetch Operator diff --git ql/src/test/results/clientpositive/vector_case_when_2.q.out ql/src/test/results/clientpositive/vector_case_when_2.q.out index 29b0823961..aba9ff2e11 100644 --- ql/src/test/results/clientpositive/vector_case_when_2.q.out +++ ql/src/test/results/clientpositive/vector_case_when_2.q.out @@ -138,13 +138,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:cdate:date, 1:ctimestamp1:timestamp, 2:stimestamp1:string, 3:ctimestamp2:timestamp, 4:ROW__ID:struct] Select Operator - expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) + expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [1, 3, 9, 14, 19, 23, 25, 28, 33, 39, 2] - selectExpressions: VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 6:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 9:string, VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 10:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 11:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 12:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 13:boolean) -> 14:string, VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 15:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 16:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 17:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 18:boolean) -> 19:string, IfExprLongColumnLongColumn(col 20:boolean, col 21:int, col 22:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 20:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 21:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 22:int) -> 23:int, VectorUDFAdaptor(CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END)(children: SelectStringColLikeStringScalar(col 2:string) -> 24:boolean) -> 25:string, VectorUDFAdaptor(if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)))(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 26:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 27:int) -> 28:int, VectorUDFAdaptor(if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null))(children: ColAndCol(col 29:boolean, col 30:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 29:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 30:boolean) -> 31:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 32:int) -> 33:int, IfExprLongColumnLongColumn(col 36:boolean, col 37:date, col 38:date)(children: DoubleColGreaterDoubleScalar(col 35:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 34:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 34:double) -> 35:double) -> 36:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 37:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 38:date) -> 39:date + projectedOutputColumnNums: [1, 3, 9, 14, 18, 22, 24, 27, 32, 38, 2] + selectExpressions: VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 6:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 9:string, VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 10:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 11:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 12:boolean, TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 13:boolean) -> 14:string, VectorUDFAdaptor(CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') ELSE (null) END)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 15:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 16:boolean, TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 17:boolean) -> 18:string, IfExprLongColumnLongColumn(col 19:boolean, col 20:int, col 21:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 19:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 20:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 21:int) -> 22:int, VectorUDFAdaptor(CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END)(children: SelectStringColLikeStringScalar(col 2:string) -> 23:boolean) -> 24:string, VectorUDFAdaptor(if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)))(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 25:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 26:int) -> 27:int, VectorUDFAdaptor(if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null))(children: ColAndCol(col 28:boolean, col 29:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 28:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 29:boolean) -> 30:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 31:int) -> 32:int, IfExprLongColumnLongColumn(col 35:boolean, col 36:date, col 37:date)(children: DoubleColGreaterDoubleScalar(col 34:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 33:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 33:double) -> 34:double) -> 35:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 36:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 37:date) -> 38:date Statistics: Num rows: 51 Data size: 50745 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: timestamp), _col10 (type: string), _col1 (type: timestamp) @@ -171,7 +171,7 @@ STAGE PLANS: includeColumns: [0, 1, 2, 3] dataColumns: cdate:date, ctimestamp1:timestamp, stimestamp1:string, ctimestamp2:timestamp partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, double, double, bigint, bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, double, double, bigint, bigint, bigint, bigint] Reduce Vectorization: enabled: false enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true @@ -401,13 +401,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:cdate:date, 1:ctimestamp1:timestamp, 2:stimestamp1:string, 3:ctimestamp2:timestamp, 4:ROW__ID:struct] Select Operator - expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) + expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 Select Vectorization: className: VectorSelectOperator native: true projectedOutputColumnNums: [1, 3, 12, 21, 28, 32, 34, 37, 42, 48, 2] - selectExpressions: IfExprStringScalarStringGroupColumn(col 5:boolean, val 1800s or Earliercol 11:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, IfExprStringScalarStringGroupColumn(col 6:boolean, val 1900scol 10:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 6:boolean, IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 9:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, IfExprStringScalarStringScalar(col 8:boolean, val Early 2010s, val Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 9:string) -> 10:string) -> 11:string) -> 12:string, IfExprStringScalarStringGroupColumn(col 13:boolean, val Oldcol 20:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 13:boolean, IfExprStringScalarStringGroupColumn(col 14:boolean, val Early 2000scol 19:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 14:boolean, IfExprStringScalarStringGroupColumn(col 15:boolean, val Late 2000scol 18:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 15:boolean, IfExprColumnNull(col 16:boolean, col 17:string, null)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 16:boolean, ConstantVectorExpression(val Early 2010s) -> 17:string) -> 18:string) -> 19:string) -> 20:string) -> 21:string, IfExprStringScalarStringGroupColumn(col 22:boolean, val Oldcol 27:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 22:boolean, IfExprStringScalarStringGroupColumn(col 23:boolean, val Early 2000scol 26:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 23:boolean, IfExprStringScalarStringGroupColumn(col 24:boolean, val Late 2000scol 25:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 24:boolean, IfExprNullNull(null, null) -> 25:string) -> 26:string) -> 27:string) -> 28:string, IfExprLongColumnLongColumn(col 29:boolean, col 30:int, col 31:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 29:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 30:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 31:int) -> 32:int, IfExprStringGroupColumnStringScalar(col 33:boolean, col 2:string, val 2018-03-08 23:04:59)(children: SelectStringColLikeStringScalar(col 2:string) -> 33:boolean) -> 34:string, IfExprNullColumn(col 35:boolean, null, col 36)(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 35:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 36:int) -> 37:int, IfExprColumnNull(col 40:boolean, col 41:int, null)(children: ColAndCol(col 38:boolean, col 39:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 38:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 39:boolean) -> 40:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 41:int) -> 42:int, IfExprLongColumnLongColumn(col 45:boolean, col 46:date, col 47:date)(children: DoubleColGreaterDoubleScalar(col 44:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 43:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 43:double) -> 44:double) -> 45:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 46:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 47:date) -> 48:date + selectExpressions: IfExprStringScalarStringGroupColumn(col 5:boolean, val 1800s or Earliercol 11:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, IfExprStringScalarStringGroupColumn(col 6:boolean, val 1900scol 10:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 6:boolean, IfExprStringScalarStringGroupColumn(col 7:boolean, val Late 2000scol 9:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 7:boolean, IfExprStringScalarStringScalar(col 8:boolean, val Early 2010s, val Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 8:boolean) -> 9:string) -> 10:string) -> 11:string) -> 12:string, IfExprStringScalarStringGroupColumn(col 13:boolean, val Oldcol 20:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 13:boolean, IfExprStringScalarStringGroupColumn(col 14:boolean, val Early 2000scol 19:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 14:boolean, IfExprStringScalarStringGroupColumn(col 15:boolean, val Late 2000scol 18:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 15:boolean, IfExprColumnNull(col 16:boolean, col 17:string, null)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 16:boolean, ConstantVectorExpression(val Early 2010s) -> 17:string) -> 18:string) -> 19:string) -> 20:string) -> 21:string, IfExprStringScalarStringGroupColumn(col 22:boolean, val Oldcol 27:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 22:boolean, IfExprStringScalarStringGroupColumn(col 23:boolean, val Early 2000scol 26:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 23:boolean, IfExprColumnNull(col 24:boolean, col 25:string, null)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 24:boolean, ConstantVectorExpression(val Late 2000s) -> 25:string) -> 26:string) -> 27:string) -> 28:string, IfExprLongColumnLongColumn(col 29:boolean, col 30:int, col 31:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 29:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 30:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 31:int) -> 32:int, IfExprStringGroupColumnStringScalar(col 33:boolean, col 2:string, val 2018-03-08 23:04:59)(children: SelectStringColLikeStringScalar(col 2:string) -> 33:boolean) -> 34:string, IfExprNullColumn(col 35:boolean, null, col 36)(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 35:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 36:int) -> 37:int, IfExprColumnNull(col 40:boolean, col 41:int, null)(children: ColAndCol(col 38:boolean, col 39:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 38:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 39:boolean) -> 40:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 41:int) -> 42:int, IfExprLongColumnLongColumn(col 45:boolean, col 46:date, col 47:date)(children: DoubleColGreaterDoubleScalar(col 44:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 43:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 43:double) -> 44:double) -> 45:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 46:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 47:date) -> 48:date Statistics: Num rows: 51 Data size: 50745 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: timestamp), _col10 (type: string), _col1 (type: timestamp) @@ -664,13 +664,13 @@ STAGE PLANS: native: true vectorizationSchemaColumns: [0:cdate:date, 1:ctimestamp1:timestamp, 2:stimestamp1:string, 3:ctimestamp2:timestamp, 4:ROW__ID:struct] Select Operator - expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN (null) ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) + expressions: ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.999999999')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.999999999')) THEN ('Old') WHEN ((ctimestamp2 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.999999999') THEN ('Late 2000s') ELSE (null) END (type: string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like '%19%')) THEN (stimestamp1) ELSE ('2018-03-08 23:04:59') END (type: string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) > 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10 Select Vectorization: className: VectorSelectOperator native: true - projectedOutputColumnNums: [1, 3, 15, 27, 37, 41, 43, 46, 51, 57, 2] - selectExpressions: IfExprColumnCondExpr(col 5:boolean, col 6:stringcol 14:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, ConstantVectorExpression(val 1800s or Earlier) -> 6:string, IfExprColumnCondExpr(col 7:boolean, col 8:stringcol 13:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 7:boolean, ConstantVectorExpression(val 1900s) -> 8:string, IfExprColumnCondExpr(col 9:boolean, col 10:stringcol 12:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 9:boolean, ConstantVectorExpression(val Late 2000s) -> 10:string, IfExprStringScalarStringScalar(col 11:boolean, val Early 2010s, val Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 11:boolean) -> 12:string) -> 13:string) -> 14:string) -> 15:string, IfExprColumnCondExpr(col 16:boolean, col 17:stringcol 26:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 16:boolean, ConstantVectorExpression(val Old) -> 17:string, IfExprColumnCondExpr(col 18:boolean, col 19:stringcol 25:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 18:boolean, ConstantVectorExpression(val Early 2000s) -> 19:string, IfExprColumnCondExpr(col 20:boolean, col 21:stringcol 24:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 20:boolean, ConstantVectorExpression(val Late 2000s) -> 21:string, IfExprColumnNull(col 22:boolean, col 23:string, null)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 22:boolean, ConstantVectorExpression(val Early 2010s) -> 23:string) -> 24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 28:boolean, col 29:stringcol 36:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 28:boolean, ConstantVectorExpression(val Old) -> 29:string, IfExprColumnCondExpr(col 30:boolean, col 31:stringcol 35:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 30:boolean, ConstantVectorExpression(val Early 2000s) -> 31:string, IfExprColumnCondExpr(col 32:boolean, col 33:stringcol 34:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 32:boolean, ConstantVectorExpression(val Late 2000s) -> 33:string, IfExprNullNull(null, null) -> 34:string) -> 35:string) -> 36:string) -> 37:string, IfExprCondExprCondExpr(col 38:boolean, col 39:intcol 40:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 38:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 39:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 40:int) -> 41:int, IfExprStringGroupColumnStringScalar(col 42:boolean, col 2:string, val 2018-03-08 23:04:59)(children: SelectStringColLikeStringScalar(col 2:string) -> 42:boolean) -> 43:string, IfExprNullCondExpr(col 44:boolean, null, col 45:int)(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 44:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 45:int) -> 46:int, IfExprCondExprNull(col 49:boolean, col 50:int, null)(children: ColAndCol(col 47:boolean, col 48:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 47:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 48:boolean) -> 49:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 50:int) -> 51:int, IfExprCondExprCondExpr(col 54:boolean, col 55:datecol 56:date)(children: DoubleColGreaterDoubleScalar(col 53:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 52:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 52:double) -> 53:double) -> 54:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 55:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 56:date) -> 57:date + projectedOutputColumnNums: [1, 3, 15, 27, 36, 40, 42, 45, 50, 56, 2] + selectExpressions: IfExprColumnCondExpr(col 5:boolean, col 6:stringcol 14:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 1800-12-31 00:00:00) -> 5:boolean, ConstantVectorExpression(val 1800s or Earlier) -> 6:string, IfExprColumnCondExpr(col 7:boolean, col 8:stringcol 13:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 1900-01-01 00:00:00) -> 7:boolean, ConstantVectorExpression(val 1900s) -> 8:string, IfExprColumnCondExpr(col 9:boolean, col 10:stringcol 12:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 9:boolean, ConstantVectorExpression(val Late 2000s) -> 10:string, IfExprStringScalarStringScalar(col 11:boolean, val Early 2010s, val Unknown)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 11:boolean) -> 12:string) -> 13:string) -> 14:string) -> 15:string, IfExprColumnCondExpr(col 16:boolean, col 17:stringcol 26:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 16:boolean, ConstantVectorExpression(val Old) -> 17:string, IfExprColumnCondExpr(col 18:boolean, col 19:stringcol 25:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 18:boolean, ConstantVectorExpression(val Early 2000s) -> 19:string, IfExprColumnCondExpr(col 20:boolean, col 21:stringcol 24:string)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 20:boolean, ConstantVectorExpression(val Late 2000s) -> 21:string, IfExprColumnNull(col 22:boolean, col 23:string, null)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2015-12-31 23:59:59.999999999) -> 22:boolean, ConstantVectorExpression(val Early 2010s) -> 23:string) -> 24:string) -> 25:string) -> 26:string) -> 27:string, IfExprColumnCondExpr(col 28:boolean, col 29:stringcol 35:string)(children: TimestampColLessEqualTimestampScalar(col 3:timestamp, val 2000-12-31 23:59:59.999999999) -> 28:boolean, ConstantVectorExpression(val Old) -> 29:string, IfExprColumnCondExpr(col 30:boolean, col 31:stringcol 34:string)(children: TimestampColLessTimestampScalar(col 3:timestamp, val 2006-01-01 00:00:00) -> 30:boolean, ConstantVectorExpression(val Early 2000s) -> 31:string, IfExprColumnNull(col 32:boolean, col 33:string, null)(children: TimestampColumnBetween(col 3:timestamp, left 2005-12-31 16:00:00.0, right 2010-12-31 15:59:59.999999999) -> 32:boolean, ConstantVectorExpression(val Late 2000s) -> 33:string) -> 34:string) -> 35:string) -> 36:string, IfExprCondExprCondExpr(col 37:boolean, col 38:intcol 39:int)(children: TimestampColLessTimestampScalar(col 1:timestamp, val 1974-10-04 17:21:03.989) -> 37:boolean, VectorUDFYearTimestamp(col 1:timestamp, field YEAR) -> 38:int, VectorUDFYearTimestamp(col 3:timestamp, field YEAR) -> 39:int) -> 40:int, IfExprStringGroupColumnStringScalar(col 41:boolean, col 2:string, val 2018-03-08 23:04:59)(children: SelectStringColLikeStringScalar(col 2:string) -> 41:boolean) -> 42:string, IfExprNullCondExpr(col 43:boolean, null, col 44:int)(children: TimestampColEqualTimestampScalar(col 1:timestamp, val 2021-09-24 03:18:32.413655165) -> 43:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 44:int) -> 45:int, IfExprCondExprNull(col 48:boolean, col 49:int, null)(children: ColAndCol(col 46:boolean, col 47:boolean)(children: TimestampColGreaterEqualTimestampScalar(col 3:timestamp, val 5344-10-04 18:40:08.165) -> 46:boolean, TimestampColLessTimestampScalar(col 3:timestamp, val 6631-11-13 16:31:29.702202248) -> 47:boolean) -> 48:boolean, VectorUDFMinuteTimestamp(col 1:timestamp, field MINUTE) -> 49:int) -> 50:int, IfExprCondExprCondExpr(col 53:boolean, col 54:datecol 55:date)(children: DoubleColGreaterDoubleScalar(col 52:double, val 100.0)(children: DoubleColModuloDoubleScalar(col 51:double, val 500.0)(children: CastTimestampToDouble(col 1:timestamp) -> 51:double) -> 52:double) -> 53:boolean, VectorUDFDateAddColScalar(col 0:date, val 1) -> 54:date, VectorUDFDateAddColScalar(col 0:date, val 365) -> 55:date) -> 56:date Statistics: Num rows: 51 Data size: 50745 Basic stats: COMPLETE Column stats: COMPLETE Reduce Output Operator key expressions: _col0 (type: timestamp), _col10 (type: string), _col1 (type: timestamp) @@ -697,7 +697,7 @@ STAGE PLANS: includeColumns: [0, 1, 2, 3] dataColumns: cdate:date, ctimestamp1:timestamp, stimestamp1:string, ctimestamp2:timestamp partitionColumnCount: 0 - scratchColumnTypeNames: [bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, string, bigint, string, bigint, string, bigint, string, string, string, string, string, bigint, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, double, double, bigint, bigint, bigint, bigint] + scratchColumnTypeNames: [bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, bigint, string, bigint, string, bigint, string, bigint, string, string, string, string, string, bigint, string, bigint, string, bigint, string, string, string, string, bigint, bigint, bigint, bigint, bigint, string, bigint, bigint, bigint, bigint, bigint, bigint, bigint, bigint, double, double, bigint, bigint, bigint, bigint] Reduce Vectorization: enabled: false enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true diff --git ql/src/test/results/clientpositive/vector_coalesce_3.q.out ql/src/test/results/clientpositive/vector_coalesce_3.q.out index 39fd5e898a..a31d4d7fcc 100644 --- ql/src/test/results/clientpositive/vector_coalesce_3.q.out +++ ql/src/test/results/clientpositive/vector_coalesce_3.q.out @@ -88,7 +88,7 @@ STAGE PLANS: alias: n Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE Select Operator - expressions: member (type: bigint), CASE WHEN (CASE WHEN (attr is not null) THEN ((attr > 1L)) ELSE (true) END) THEN (attr) ELSE (null) END (type: bigint) + expressions: member (type: bigint), CASE WHEN (((attr > 1L) or attr is null)) THEN (attr) ELSE (null) END (type: bigint) outputColumnNames: _col0, _col1 Statistics: Num rows: 3 Data size: 48 Basic stats: COMPLETE Column stats: COMPLETE HashTable Sink Operator diff --git ql/src/test/results/clientpositive/vector_decimal_math_funcs.q.out ql/src/test/results/clientpositive/vector_decimal_math_funcs.q.out index 31751503b5..4e90c65214 100644 --- ql/src/test/results/clientpositive/vector_decimal_math_funcs.q.out +++ ql/src/test/results/clientpositive/vector_decimal_math_funcs.q.out @@ -116,7 +116,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: decimal_test_n0 - filterExpr: (((cbigint % 500) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) + filterExpr: (((cbigint % 500L) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) Statistics: Num rows: 12289 Data size: 1100992 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -126,7 +126,7 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: FilterExprAndExpr(children: FilterLongColEqualLongScalar(col 5:bigint, val 0)(children: LongColModuloLongScalar(col 0:bigint, val 500) -> 5:bigint), FilterDoubleColGreaterEqualDoubleScalar(col 7:double, val -1.0)(children: FuncSinDoubleToDouble(col 6:double)(children: CastDecimalToDouble(col 2:decimal(20,10)) -> 6:double) -> 7:double)) - predicate: (((cbigint % 500) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) + predicate: (((cbigint % 500L) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) Statistics: Num rows: 2048 Data size: 183600 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: cdecimal1 (type: decimal(20,10)), round(cdecimal1, 2) (type: decimal(13,2)), round(cdecimal1) (type: decimal(11,0)), floor(cdecimal1) (type: decimal(11,0)), ceil(cdecimal1) (type: decimal(11,0)), round(exp(cdecimal1), 58) (type: double), ln(cdecimal1) (type: double), log10(cdecimal1) (type: double), log2(cdecimal1) (type: double), log2((cdecimal1 - 15601)) (type: double), log(2, cdecimal1) (type: double), power(log2(cdecimal1), 2) (type: double), power(log2(cdecimal1), 2) (type: double), sqrt(cdecimal1) (type: double), abs(cdecimal1) (type: decimal(20,10)), sin(cdecimal1) (type: double), asin(cdecimal1) (type: double), cos(cdecimal1) (type: double), acos(cdecimal1) (type: double), atan(cdecimal1) (type: double), degrees(cdecimal1) (type: double), radians(cdecimal1) (type: double), cdecimal1 (type: decimal(20,10)), (- cdecimal1) (type: decimal(20,10)), sign(cdecimal1) (type: int), cos(((- sin(log(cdecimal1))) + 3.14159D)) (type: double) @@ -363,7 +363,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: decimal_test_small - filterExpr: (((cbigint % 500) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) + filterExpr: (((cbigint % 500L) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) Statistics: Num rows: 12288 Data size: 1100992 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -373,7 +373,7 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: FilterExprAndExpr(children: FilterLongColEqualLongScalar(col 5:bigint, val 0)(children: LongColModuloLongScalar(col 0:bigint, val 500) -> 5:bigint), FilterDoubleColGreaterEqualDoubleScalar(col 8:double, val -1.0)(children: FuncSinDoubleToDouble(col 7:double)(children: CastDecimalToDouble(col 6:decimal(12,4))(children: ConvertDecimal64ToDecimal(col 2:decimal(12,4)/DECIMAL_64) -> 6:decimal(12,4)) -> 7:double) -> 8:double)) - predicate: (((cbigint % 500) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) + predicate: (((cbigint % 500L) = 0) and (sin(cdecimal1) >= -1.0D)) (type: boolean) Statistics: Num rows: 2048 Data size: 183600 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: cdecimal1 (type: decimal(12,4)), round(cdecimal1, 2) (type: decimal(11,2)), round(cdecimal1) (type: decimal(9,0)), floor(cdecimal1) (type: decimal(9,0)), ceil(cdecimal1) (type: decimal(9,0)), round(exp(cdecimal1), 58) (type: double), ln(cdecimal1) (type: double), log10(cdecimal1) (type: double), log2(cdecimal1) (type: double), log2((cdecimal1 - 15601)) (type: double), log(2, cdecimal1) (type: double), power(log2(cdecimal1), 2) (type: double), power(log2(cdecimal1), 2) (type: double), sqrt(cdecimal1) (type: double), abs(cdecimal1) (type: decimal(12,4)), sin(cdecimal1) (type: double), asin(cdecimal1) (type: double), cos(cdecimal1) (type: double), acos(cdecimal1) (type: double), atan(cdecimal1) (type: double), degrees(cdecimal1) (type: double), radians(cdecimal1) (type: double), cdecimal1 (type: decimal(12,4)), (- cdecimal1) (type: decimal(12,4)), sign(cdecimal1) (type: int), cos(((- sin(log(cdecimal1))) + 3.14159D)) (type: double) diff --git ql/src/test/results/clientpositive/vector_groupby_mapjoin.q.out ql/src/test/results/clientpositive/vector_groupby_mapjoin.q.out index c247a2ce2a..6fa0d0d3f1 100644 --- ql/src/test/results/clientpositive/vector_groupby_mapjoin.q.out +++ ql/src/test/results/clientpositive/vector_groupby_mapjoin.q.out @@ -228,8 +228,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterLongColEqualLongScalar(col 3:bigint, val 0), FilterExprAndExpr(children: SelectColumnIsNull(col 2:boolean), SelectColumnIsNotNull(col 0:string), FilterLongColGreaterEqualLongColumn(col 4:bigint, col 3:bigint))) - predicate: ((_col2 = 0L) or (_col5 is null and _col0 is not null and (_col3 >= _col2))) (type: boolean) + predicateExpression: FilterExprAndExpr(children: FilterExprOrExpr(children: SelectColumnIsNull(col 2:boolean), FilterLongColEqualLongScalar(col 3:bigint, val 0)), FilterExprOrExpr(children: SelectColumnIsNotNull(col 0:string), FilterLongColEqualLongScalar(col 3:bigint, val 0), SelectColumnIsNotNull(col 2:boolean)), FilterExprOrExpr(children: FilterLongColGreaterEqualLongColumn(col 4:bigint, col 3:bigint), FilterLongColEqualLongScalar(col 3:bigint, val 0), SelectColumnIsNotNull(col 2:boolean), SelectColumnIsNull(col 0:string))) + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col0 is null) and (_col0 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) Statistics: Num rows: 895 Data size: 175214 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: string) @@ -350,8 +350,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterLongColEqualLongScalar(col 3:bigint, val 0), FilterExprAndExpr(children: SelectColumnIsNull(col 2:boolean), SelectColumnIsNotNull(col 0:string), FilterLongColGreaterEqualLongColumn(col 4:bigint, col 3:bigint))) - predicate: ((_col2 = 0L) or (_col5 is null and _col0 is not null and (_col3 >= _col2))) (type: boolean) + predicateExpression: FilterExprAndExpr(children: FilterExprOrExpr(children: SelectColumnIsNull(col 2:boolean), FilterLongColEqualLongScalar(col 3:bigint, val 0)), FilterExprOrExpr(children: SelectColumnIsNotNull(col 0:string), FilterLongColEqualLongScalar(col 3:bigint, val 0), SelectColumnIsNotNull(col 2:boolean)), FilterExprOrExpr(children: FilterLongColGreaterEqualLongColumn(col 4:bigint, col 3:bigint), FilterLongColEqualLongScalar(col 3:bigint, val 0), SelectColumnIsNotNull(col 2:boolean), SelectColumnIsNull(col 0:string))) + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col0 is null) and (_col0 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) Statistics: Num rows: 895 Data size: 175214 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: string) @@ -410,7 +410,7 @@ STAGE PLANS: outputColumnNames: _col0, _col1, _col2, _col3, _col5 Statistics: Num rows: 895 Data size: 175214 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: ((_col2 = 0L) or (_col5 is null and _col0 is not null and (_col3 >= _col2))) (type: boolean) + predicate: (((_col3 >= _col2) or (_col2 = 0L) or _col5 is not null or _col0 is null) and (_col0 is not null or (_col2 = 0L) or _col5 is not null) and (_col5 is null or (_col2 = 0L))) (type: boolean) Statistics: Num rows: 895 Data size: 175214 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: _col0 (type: string), _col1 (type: string) diff --git ql/src/test/results/clientpositive/vectorization_5.q.out ql/src/test/results/clientpositive/vectorization_5.q.out index d4f9462ec9..1ab2919992 100644 --- ql/src/test/results/clientpositive/vectorization_5.q.out +++ ql/src/test/results/clientpositive/vectorization_5.q.out @@ -56,7 +56,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((cboolean2 is not null and (cstring1 like '%b%')) or ((UDFToDouble(ctinyint) = cdouble) and ctimestamp2 is not null and (cstring2 like 'a'))) (type: boolean) + filterExpr: (((cstring1 like '%b%') and cboolean2 is not null) or ((UDFToDouble(ctinyint) = cdouble) and (cstring2 like 'a') and ctimestamp2 is not null)) (type: boolean) Statistics: Num rows: 12288 Data size: 2454862 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -65,8 +65,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: SelectColumnIsNotNull(col 11:boolean), FilterStringColLikeStringScalar(col 6:string, pattern %b%)), FilterExprAndExpr(children: FilterDoubleColEqualDoubleColumn(col 13:double, col 5:double)(children: CastLongToDouble(col 0:tinyint) -> 13:double), SelectColumnIsNotNull(col 9:timestamp), FilterStringColLikeStringScalar(col 7:string, pattern a))) - predicate: (((UDFToDouble(ctinyint) = cdouble) and ctimestamp2 is not null and (cstring2 like 'a')) or (cboolean2 is not null and (cstring1 like '%b%'))) (type: boolean) + predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: FilterStringColLikeStringScalar(col 6:string, pattern %b%), SelectColumnIsNotNull(col 11:boolean)), FilterExprAndExpr(children: FilterDoubleColEqualDoubleColumn(col 13:double, col 5:double)(children: CastLongToDouble(col 0:tinyint) -> 13:double), FilterStringColLikeStringScalar(col 7:string, pattern a), SelectColumnIsNotNull(col 9:timestamp))) + predicate: (((UDFToDouble(ctinyint) = cdouble) and (cstring2 like 'a') and ctimestamp2 is not null) or ((cstring1 like '%b%') and cboolean2 is not null)) (type: boolean) Statistics: Num rows: 7658 Data size: 1529972 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int) diff --git ql/src/test/results/clientpositive/vectorization_8.q.out ql/src/test/results/clientpositive/vectorization_8.q.out index 6a52519eae..fb387e7dcd 100644 --- ql/src/test/results/clientpositive/vectorization_8.q.out +++ ql/src/test/results/clientpositive/vectorization_8.q.out @@ -66,7 +66,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((cstring2 is not null and (UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D)) or (cfloat < -6432.0) or (cboolean1 is not null and (cdouble = 988888.0D))) (type: boolean) + filterExpr: (((UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D) and cstring2 is not null) or (cfloat < -6432.0) or ((cdouble = 988888.0D) and cboolean1 is not null)) (type: boolean) Statistics: Num rows: 12288 Data size: 2983078 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -75,8 +75,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: SelectColumnIsNotNull(col 7:string), FilterDoubleColLessEqualDoubleScalar(col 13:double, val 10.0)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 16.0)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: SelectColumnIsNotNull(col 10:boolean), FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0))) - predicate: ((cboolean1 is not null and (cdouble = 988888.0D)) or (cfloat < -6432.0) or (cstring2 is not null and (UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D))) (type: boolean) + predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: FilterDoubleColLessEqualDoubleScalar(col 13:double, val 10.0)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 16.0)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double), SelectColumnIsNotNull(col 7:string)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0), SelectColumnIsNotNull(col 10:boolean))) + predicate: (((UDFToDouble(ctimestamp1) <= 10.0D) and (UDFToDouble(ctimestamp2) <> 16.0D) and cstring2 is not null) or ((cdouble = 988888.0D) and cboolean1 is not null) or (cfloat < -6432.0)) (type: boolean) Statistics: Num rows: 3059 Data size: 742850 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: ctimestamp1 (type: timestamp), cdouble (type: double), cboolean1 (type: boolean), cstring1 (type: string), cfloat (type: float), (- cdouble) (type: double), (-5638.15D - cdouble) (type: double), (cdouble * -257.0D) (type: double), (UDFToFloat(cint) + cfloat) (type: float), ((- cdouble) + UDFToDouble(cbigint)) (type: double), (- cdouble) (type: double), (-1.389 - cfloat) (type: float), (- cfloat) (type: float), ((-5638.15D - cdouble) + UDFToDouble((UDFToFloat(cint) + cfloat))) (type: double) @@ -279,7 +279,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((cstring2 is not null and (UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D)) or (cfloat < -6432.0) or (cboolean1 is not null and (cdouble = 988888.0D))) (type: boolean) + filterExpr: (((UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D) and cstring2 is not null) or (cfloat < -6432.0) or ((cdouble = 988888.0D) and cboolean1 is not null)) (type: boolean) Statistics: Num rows: 12288 Data size: 2983078 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -287,8 +287,8 @@ STAGE PLANS: Filter Vectorization: className: VectorFilterOperator native: true - predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: SelectColumnIsNotNull(col 7:string), FilterDoubleColLessEqualDoubleScalar(col 13:double, val 12.503)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 11.998)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: SelectColumnIsNotNull(col 10:boolean), FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0))) - predicate: ((cboolean1 is not null and (cdouble = 988888.0D)) or (cfloat < -6432.0) or (cstring2 is not null and (UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D))) (type: boolean) + predicateExpression: FilterExprOrExpr(children: FilterExprAndExpr(children: FilterDoubleColLessEqualDoubleScalar(col 13:double, val 12.503)(children: CastTimestampToDouble(col 8:timestamp) -> 13:double), FilterDoubleColNotEqualDoubleScalar(col 14:double, val 11.998)(children: CastTimestampToDouble(col 9:timestamp) -> 14:double), SelectColumnIsNotNull(col 7:string)), FilterDoubleColLessDoubleScalar(col 4:float, val -6432.0), FilterExprAndExpr(children: FilterDoubleColEqualDoubleScalar(col 5:double, val 988888.0), SelectColumnIsNotNull(col 10:boolean))) + predicate: (((UDFToDouble(ctimestamp1) <= 12.503D) and (UDFToDouble(ctimestamp2) <> 11.998D) and cstring2 is not null) or ((cdouble = 988888.0D) and cboolean1 is not null) or (cfloat < -6432.0)) (type: boolean) Statistics: Num rows: 3059 Data size: 742850 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: ctimestamp1 (type: timestamp), cdouble (type: double), cboolean1 (type: boolean), cstring1 (type: string), cfloat (type: float), (- cdouble) (type: double), (-5638.15D - cdouble) (type: double), (cdouble * -257.0D) (type: double), (UDFToFloat(cint) + cfloat) (type: float), ((- cdouble) + UDFToDouble(cbigint)) (type: double), (- cdouble) (type: double), (-1.389 - cfloat) (type: float), (- cfloat) (type: float), ((-5638.15D - cdouble) + UDFToDouble((UDFToFloat(cint) + cfloat))) (type: double) diff --git ql/src/test/results/clientpositive/vectorized_casts.q.out ql/src/test/results/clientpositive/vectorized_casts.q.out index fd6277c4bb..8f2303fbe8 100644 --- ql/src/test/results/clientpositive/vectorized_casts.q.out +++ ql/src/test/results/clientpositive/vectorized_casts.q.out @@ -166,7 +166,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((cbigint % 250) = 0) (type: boolean) + filterExpr: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 12288 Data size: 1684250 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -176,7 +176,7 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: FilterLongColEqualLongScalar(col 13:bigint, val 0)(children: LongColModuloLongScalar(col 3:bigint, val 250) -> 13:bigint) - predicate: ((cbigint % 250) = 0) (type: boolean) + predicate: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 6144 Data size: 842180 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: UDFToBoolean(ctinyint) (type: boolean), UDFToBoolean(csmallint) (type: boolean), UDFToBoolean(cint) (type: boolean), UDFToBoolean(cbigint) (type: boolean), UDFToBoolean(cfloat) (type: boolean), UDFToBoolean(cdouble) (type: boolean), cboolean1 (type: boolean), UDFToBoolean((cbigint * 0L)) (type: boolean), UDFToBoolean(ctimestamp1) (type: boolean), UDFToBoolean(cstring1) (type: boolean), UDFToInteger(ctinyint) (type: int), UDFToInteger(csmallint) (type: int), cint (type: int), UDFToInteger(cbigint) (type: int), UDFToInteger(cfloat) (type: int), UDFToInteger(cdouble) (type: int), UDFToInteger(cboolean1) (type: int), UDFToInteger(ctimestamp1) (type: int), UDFToInteger(cstring1) (type: int), UDFToInteger(substr(cstring1, 1, 1)) (type: int), UDFToByte(cfloat) (type: tinyint), UDFToShort(cfloat) (type: smallint), UDFToLong(cfloat) (type: bigint), UDFToDouble(ctinyint) (type: double), UDFToDouble(csmallint) (type: double), UDFToDouble(cint) (type: double), UDFToDouble(cbigint) (type: double), UDFToDouble(cfloat) (type: double), cdouble (type: double), UDFToDouble(cboolean1) (type: double), UDFToDouble(ctimestamp1) (type: double), UDFToDouble(cstring1) (type: double), UDFToDouble(substr(cstring1, 1, 1)) (type: double), UDFToFloat(cint) (type: float), UDFToFloat(cdouble) (type: float), CAST( ctinyint AS TIMESTAMP) (type: timestamp), CAST( csmallint AS TIMESTAMP) (type: timestamp), CAST( cint AS TIMESTAMP) (type: timestamp), CAST( cbigint AS TIMESTAMP) (type: timestamp), CAST( cfloat AS TIMESTAMP) (type: timestamp), CAST( cdouble AS TIMESTAMP) (type: timestamp), CAST( cboolean1 AS TIMESTAMP) (type: timestamp), CAST( (cbigint * 0L) AS TIMESTAMP) (type: timestamp), CAST( CAST( ctimestamp1 AS DATE) AS TIMESTAMP) (type: timestamp), ctimestamp1 (type: timestamp), CAST( cstring1 AS TIMESTAMP) (type: timestamp), CAST( substr(cstring1, 1, 1) AS TIMESTAMP) (type: timestamp), CAST( ctinyint AS STRING) (type: string), CAST( csmallint AS STRING) (type: string), CAST( cint AS STRING) (type: string), CAST( cbigint AS STRING) (type: string), CAST( cfloat AS STRING) (type: string), CAST( cdouble AS STRING) (type: string), CAST( cboolean1 AS STRING) (type: string), CAST( (cbigint * 0L) AS STRING) (type: string), CAST( ctimestamp1 AS STRING) (type: string), cstring1 (type: string), CAST( CAST( cstring1 AS CHAR(10)) AS STRING) (type: string), CAST( CAST( cstring1 AS varchar(10)) AS STRING) (type: string), UDFToFloat(UDFToInteger(cfloat)) (type: float), UDFToDouble((cint * 2)) (type: double), CAST( sin(cfloat) AS STRING) (type: string), (UDFToDouble(UDFToFloat(cint)) + UDFToDouble(cboolean1)) (type: double) diff --git ql/src/test/results/clientpositive/vectorized_math_funcs.q.out ql/src/test/results/clientpositive/vectorized_math_funcs.q.out index 0b0aba6829..27ac0e15f6 100644 --- ql/src/test/results/clientpositive/vectorized_math_funcs.q.out +++ ql/src/test/results/clientpositive/vectorized_math_funcs.q.out @@ -120,7 +120,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: (((cbigint % 500) = 0) and (sin(cfloat) >= -1.0D)) (type: boolean) + filterExpr: (((cbigint % 500L) = 0) and (sin(cfloat) >= -1.0D)) (type: boolean) Statistics: Num rows: 12288 Data size: 293580 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -129,7 +129,7 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: FilterExprAndExpr(children: FilterLongColEqualLongScalar(col 13:bigint, val 0)(children: LongColModuloLongScalar(col 3:bigint, val 500) -> 13:bigint), FilterDoubleColGreaterEqualDoubleScalar(col 14:double, val -1.0)(children: FuncSinDoubleToDouble(col 4:float) -> 14:double)) - predicate: (((cbigint % 500) = 0) and (sin(cfloat) >= -1.0D)) (type: boolean) + predicate: (((cbigint % 500L) = 0) and (sin(cfloat) >= -1.0D)) (type: boolean) Statistics: Num rows: 2048 Data size: 48960 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: cdouble (type: double), round(cdouble, 2) (type: double), floor(cdouble) (type: bigint), ceil(cdouble) (type: bigint), rand() (type: double), rand(98007) (type: double), exp(ln(cdouble)) (type: double), ln(cdouble) (type: double), ln(cfloat) (type: double), log10(cdouble) (type: double), log2(cdouble) (type: double), log2((cdouble - 15601.0D)) (type: double), log2(cfloat) (type: double), log2(cbigint) (type: double), log2(cint) (type: double), log2(csmallint) (type: double), log2(ctinyint) (type: double), log(2, cdouble) (type: double), power(log2(cdouble), 2) (type: double), power(log2(cdouble), 2) (type: double), sqrt(cdouble) (type: double), sqrt(cbigint) (type: double), bin(cbigint) (type: string), hex(cdouble) (type: string), conv(cbigint, 10, 16) (type: string), abs(cdouble) (type: double), abs(ctinyint) (type: int), (cint pmod 3) (type: int), sin(cdouble) (type: double), asin(cdouble) (type: double), cos(cdouble) (type: double), acos(cdouble) (type: double), atan(cdouble) (type: double), degrees(cdouble) (type: double), radians(cdouble) (type: double), cdouble (type: double), cbigint (type: bigint), (- cdouble) (type: double), sign(cdouble) (type: double), sign(cbigint) (type: double), cos(((- sin(log(cdouble))) + 3.14159D)) (type: double) diff --git ql/src/test/results/clientpositive/vectorized_string_funcs.q.out ql/src/test/results/clientpositive/vectorized_string_funcs.q.out index 64064c0e85..f56a1e2338 100644 --- ql/src/test/results/clientpositive/vectorized_string_funcs.q.out +++ ql/src/test/results/clientpositive/vectorized_string_funcs.q.out @@ -60,10 +60,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: (((cbigint % 237) = 0) and (length(substr(cstring1, 1, 2)) <= 2) and (cstring1 like '%')) (type: boolean) + filterExpr: (((cbigint % 237L) = 0) and (length(substr(cstring1, 1, 2)) <= 2) and (cstring1 like '%')) (type: boolean) Statistics: Num rows: 12288 Data size: 1816546 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (((cbigint % 237) = 0) and (cstring1 like '%') and (length(substr(cstring1, 1, 2)) <= 2)) (type: boolean) + predicate: (((cbigint % 237L) = 0) and (cstring1 like '%') and (length(substr(cstring1, 1, 2)) <= 2)) (type: boolean) Statistics: Num rows: 1024 Data size: 151470 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: substr(cstring1, 1, 2) (type: string), substr(cstring1, 2) (type: string), lower(cstring1) (type: string), upper(cstring1) (type: string), upper(cstring1) (type: string), length(cstring1) (type: int), trim(cstring1) (type: string), ltrim(cstring1) (type: string), rtrim(cstring1) (type: string), concat(cstring1, cstring2) (type: string), concat('>', cstring1) (type: string), concat(cstring1, '<') (type: string), concat(substr(cstring1, 1, 2), substr(cstring2, 1, 2)) (type: string) diff --git ql/src/test/results/clientpositive/vectorized_timestamp_ints_casts.q.out ql/src/test/results/clientpositive/vectorized_timestamp_ints_casts.q.out index bf66c03a5e..42a9ccf38d 100644 --- ql/src/test/results/clientpositive/vectorized_timestamp_ints_casts.q.out +++ ql/src/test/results/clientpositive/vectorized_timestamp_ints_casts.q.out @@ -52,7 +52,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((cbigint % 250) = 0) (type: boolean) + filterExpr: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 12288 Data size: 1684250 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -61,7 +61,7 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: FilterLongColEqualLongScalar(col 13:bigint, val 0)(children: LongColModuloLongScalar(col 3:bigint, val 250) -> 13:bigint) - predicate: ((cbigint % 250) = 0) (type: boolean) + predicate: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 6144 Data size: 842180 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: CAST( ctinyint AS TIMESTAMP) (type: timestamp), CAST( csmallint AS TIMESTAMP) (type: timestamp), CAST( cint AS TIMESTAMP) (type: timestamp), CAST( cbigint AS TIMESTAMP) (type: timestamp), CAST( cfloat AS TIMESTAMP) (type: timestamp), CAST( cdouble AS TIMESTAMP) (type: timestamp), CAST( cboolean1 AS TIMESTAMP) (type: timestamp), CAST( (cbigint * 0L) AS TIMESTAMP) (type: timestamp), ctimestamp1 (type: timestamp), CAST( cstring1 AS TIMESTAMP) (type: timestamp), CAST( substr(cstring1, 1, 1) AS TIMESTAMP) (type: timestamp) @@ -217,7 +217,7 @@ STAGE PLANS: Map Operator Tree: TableScan alias: alltypesorc - filterExpr: ((cbigint % 250) = 0) (type: boolean) + filterExpr: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 12288 Data size: 1684250 Basic stats: COMPLETE Column stats: COMPLETE TableScan Vectorization: native: true @@ -226,7 +226,7 @@ STAGE PLANS: className: VectorFilterOperator native: true predicateExpression: FilterLongColEqualLongScalar(col 13:bigint, val 0)(children: LongColModuloLongScalar(col 3:bigint, val 250) -> 13:bigint) - predicate: ((cbigint % 250) = 0) (type: boolean) + predicate: ((cbigint % 250L) = 0) (type: boolean) Statistics: Num rows: 6144 Data size: 842180 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: CAST( ctinyint AS TIMESTAMP) (type: timestamp), CAST( csmallint AS TIMESTAMP) (type: timestamp), CAST( cint AS TIMESTAMP) (type: timestamp), CAST( cbigint AS TIMESTAMP) (type: timestamp), CAST( cfloat AS TIMESTAMP) (type: timestamp), CAST( cdouble AS TIMESTAMP) (type: timestamp), CAST( cboolean1 AS TIMESTAMP) (type: timestamp), CAST( (cbigint * 0L) AS TIMESTAMP) (type: timestamp), ctimestamp1 (type: timestamp), CAST( cstring1 AS TIMESTAMP) (type: timestamp), CAST( substr(cstring1, 1, 1) AS TIMESTAMP) (type: timestamp)