Repository: hive
Updated Branches:
  refs/heads/master f8b4c8698 -> db7ff5f3a


HIVE-20898: For time related functions arguments may not be casted to a non 
nullable type (Zoltan Haindrich reviewed by Jesus Camacho Rodriguez)

Signed-off-by: Zoltan Haindrich <k...@rxd.hu>


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/db7ff5f3
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/db7ff5f3
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/db7ff5f3

Branch: refs/heads/master
Commit: db7ff5f3adf107db66694cd36120bb31aa413550
Parents: f8b4c86
Author: Zoltan Haindrich <k...@rxd.hu>
Authored: Sun Nov 11 22:06:49 2018 +0100
Committer: Zoltan Haindrich <k...@rxd.hu>
Committed: Sun Nov 11 22:06:49 2018 +0100

----------------------------------------------------------------------
 .../calcite/translator/RexNodeConverter.java    | 19 +++----
 ql/src/test/queries/clientpositive/f_is_null.q  | 10 ++++
 .../test/results/clientpositive/f_is_null.q.out | 53 ++++++++++++++++++++
 .../llap/dynamic_partition_pruning.q.out        | 15 +++---
 .../spark/spark_dynamic_partition_pruning.q.out | 28 ++++++-----
 ...k_vectorized_dynamic_partition_pruning.q.out | 40 ++++++++-------
 6 files changed, 120 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/db7ff5f3/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java
----------------------------------------------------------------------
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java
 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java
index 78b1281..f6a6ff2 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java
@@ -509,17 +509,21 @@ public class RexNodeConverter {
     } else {
       // We need to add a cast to DATETIME Family
       if (isTimestampLevel) {
-        newChildRexNodeLst.add(
-            
cluster.getRexBuilder().makeCast(cluster.getTypeFactory().createSqlType(SqlTypeName.TIMESTAMP),
 child));
+        newChildRexNodeLst.add(makeCast(SqlTypeName.TIMESTAMP, child));
       } else {
-        newChildRexNodeLst.add(
-            
cluster.getRexBuilder().makeCast(cluster.getTypeFactory().createSqlType(SqlTypeName.DATE),
 child));
+        newChildRexNodeLst.add(makeCast(SqlTypeName.DATE, child));
       }
     }
 
     return newChildRexNodeLst;
   }
 
+  private RexNode makeCast(SqlTypeName typeName, final RexNode child) {
+    RelDataType sqlType = cluster.getTypeFactory().createSqlType(typeName);
+    RelDataType nullableType = 
cluster.getTypeFactory().createTypeWithNullability(sqlType, true);
+    return cluster.getRexBuilder().makeCast(nullableType, child);
+  }
+
   private List<RexNode> rewriteFloorDateChildren(SqlOperator op, List<RexNode> 
childRexNodeLst)
       throws SemanticException {
     List<RexNode> newChildRexNodeLst = new ArrayList<RexNode>();
@@ -549,13 +553,10 @@ public class RexNodeConverter {
     List<RexNode> newChildRexNodeLst = new ArrayList<RexNode>();
     assert childRexNodeLst.size() == 1;
     RexNode child = childRexNodeLst.get(0);
-    if (SqlTypeUtil.isDatetime(child.getType()) || SqlTypeUtil.isInterval(
-            child.getType())) {
+    if (SqlTypeUtil.isDatetime(child.getType()) || 
SqlTypeUtil.isInterval(child.getType())) {
       newChildRexNodeLst.add(child);
     } else {
-      newChildRexNodeLst.add(
-              
cluster.getRexBuilder().makeCast(cluster.getTypeFactory().createSqlType(SqlTypeName.TIMESTAMP),
-                      child));
+      newChildRexNodeLst.add(makeCast(SqlTypeName.TIMESTAMP, child));
     }
     return newChildRexNodeLst;
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/db7ff5f3/ql/src/test/queries/clientpositive/f_is_null.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/f_is_null.q 
b/ql/src/test/queries/clientpositive/f_is_null.q
new file mode 100644
index 0000000..192dadc
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/f_is_null.q
@@ -0,0 +1,10 @@
+create table t (a string); insert into t values (null),('1988-11-11');
+
+set hive.cbo.enable=true;
+select 'expected 1 (to_date)',count(1) from t where to_date(a) is null;
+select 'expected 1 (second)', count(1) from t where second(a) is null;
+
+set hive.cbo.enable=false;
+select 'expected 1 (to_date)',count(1) from t where to_date(a) is null;
+select 'expected 1 (second)', count(1) from t where second(a) is null;
+

http://git-wip-us.apache.org/repos/asf/hive/blob/db7ff5f3/ql/src/test/results/clientpositive/f_is_null.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/f_is_null.q.out 
b/ql/src/test/results/clientpositive/f_is_null.q.out
new file mode 100644
index 0000000..e686218
--- /dev/null
+++ b/ql/src/test/results/clientpositive/f_is_null.q.out
@@ -0,0 +1,53 @@
+PREHOOK: query: create table t (a string)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@t
+POSTHOOK: query: create table t (a string)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@t
+PREHOOK: query: insert into t values (null),('1988-11-11')
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@t
+POSTHOOK: query: insert into t values (null),('1988-11-11')
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@t
+POSTHOOK: Lineage: t.a SCRIPT []
+PREHOOK: query: select 'expected 1 (to_date)',count(1) from t where to_date(a) 
is null
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t
+#### A masked pattern was here ####
+POSTHOOK: query: select 'expected 1 (to_date)',count(1) from t where 
to_date(a) is null
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t
+#### A masked pattern was here ####
+expected 1 (to_date)   1
+PREHOOK: query: select 'expected 1 (second)', count(1) from t where second(a) 
is null
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t
+#### A masked pattern was here ####
+POSTHOOK: query: select 'expected 1 (second)', count(1) from t where second(a) 
is null
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t
+#### A masked pattern was here ####
+expected 1 (second)    1
+PREHOOK: query: select 'expected 1 (to_date)',count(1) from t where to_date(a) 
is null
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t
+#### A masked pattern was here ####
+POSTHOOK: query: select 'expected 1 (to_date)',count(1) from t where 
to_date(a) is null
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t
+#### A masked pattern was here ####
+expected 1 (to_date)   1
+PREHOOK: query: select 'expected 1 (second)', count(1) from t where second(a) 
is null
+PREHOOK: type: QUERY
+PREHOOK: Input: default@t
+#### A masked pattern was here ####
+POSTHOOK: query: select 'expected 1 (second)', count(1) from t where second(a) 
is null
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@t
+#### A masked pattern was here ####
+expected 1 (second)    1

http://git-wip-us.apache.org/repos/asf/hive/blob/db7ff5f3/ql/src/test/results/clientpositive/llap/dynamic_partition_pruning.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/llap/dynamic_partition_pruning.q.out 
b/ql/src/test/results/clientpositive/llap/dynamic_partition_pruning.q.out
index 80e5ded..accb3a7 100644
--- a/ql/src/test/results/clientpositive/llap/dynamic_partition_pruning.q.out
+++ b/ql/src/test/results/clientpositive/llap/dynamic_partition_pruning.q.out
@@ -532,6 +532,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart
+                  filterExpr: ds is not null (type: boolean)
                   Statistics: Num rows: 2000 Data size: 389248 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Select Operator
                     expressions: ds (type: string)
@@ -548,10 +549,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart_date_n2
-                  filterExpr: (date = '2008-04-08') (type: boolean)
+                  filterExpr: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                   Statistics: Num rows: 2 Data size: 736 Basic stats: COMPLETE 
Column stats: NONE
                   Filter Operator
-                    predicate: (date = '2008-04-08') (type: boolean)
+                    predicate: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                     Statistics: Num rows: 2 Data size: 736 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)
@@ -674,6 +675,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart
+                  filterExpr: ds is not null (type: boolean)
                   Statistics: Num rows: 2000 Data size: 389248 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Select Operator
                     expressions: ds (type: string)
@@ -690,10 +692,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart_date_n2
-                  filterExpr: (date = '2008-04-08') (type: boolean)
+                  filterExpr: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                   Statistics: Num rows: 2 Data size: 736 Basic stats: COMPLETE 
Column stats: NONE
                   Filter Operator
-                    predicate: (date = '2008-04-08') (type: boolean)
+                    predicate: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                     Statistics: Num rows: 2 Data size: 736 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)
@@ -4499,6 +4501,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart
+                  filterExpr: ds is not null (type: boolean)
                   Statistics: Num rows: 2000 Data size: 389248 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Select Operator
                     expressions: ds (type: string)
@@ -4528,10 +4531,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart_date_n2
-                  filterExpr: (date = '2008-04-08') (type: boolean)
+                  filterExpr: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                   Statistics: Num rows: 2 Data size: 736 Basic stats: COMPLETE 
Column stats: NONE
                   Filter Operator
-                    predicate: (date = '2008-04-08') (type: boolean)
+                    predicate: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                     Statistics: Num rows: 2 Data size: 736 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/db7ff5f3/ql/src/test/results/clientpositive/spark/spark_dynamic_partition_pruning.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/spark/spark_dynamic_partition_pruning.q.out
 
b/ql/src/test/results/clientpositive/spark/spark_dynamic_partition_pruning.q.out
index fe75188..a4a5429 100644
--- 
a/ql/src/test/results/clientpositive/spark/spark_dynamic_partition_pruning.q.out
+++ 
b/ql/src/test/results/clientpositive/spark/spark_dynamic_partition_pruning.q.out
@@ -519,10 +519,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart_date_n4
-                  filterExpr: (date = '2008-04-08') (type: boolean)
+                  filterExpr: ((date = '2008-04-08') and ds 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') (type: boolean)
+                    predicate: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                     Statistics: Num rows: 1 Data size: 21 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)
@@ -552,6 +552,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart
+                  filterExpr: ds is not null (type: boolean)
                   Statistics: Num rows: 2000 Data size: 21248 Basic stats: 
COMPLETE Column stats: NONE
                   Select Operator
                     expressions: ds (type: string)
@@ -566,10 +567,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart_date_n4
-                  filterExpr: (date = '2008-04-08') (type: boolean)
+                  filterExpr: ((date = '2008-04-08') and ds 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') (type: boolean)
+                    predicate: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                     Statistics: Num rows: 1 Data size: 21 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)
@@ -672,6 +673,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart
+                  filterExpr: ds is not null (type: boolean)
                   Statistics: Num rows: 2000 Data size: 21248 Basic stats: 
COMPLETE Column stats: NONE
                   Select Operator
                     expressions: ds (type: string)
@@ -686,10 +688,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart_date_n4
-                  filterExpr: (date = '2008-04-08') (type: boolean)
+                  filterExpr: ((date = '2008-04-08') and ds 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') (type: boolean)
+                    predicate: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                     Statistics: Num rows: 1 Data size: 21 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)
@@ -945,10 +947,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart_date_n4
-                  filterExpr: (date = '2008-04-08') (type: boolean)
+                  filterExpr: ((date = '2008-04-08') and ds 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') (type: boolean)
+                    predicate: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                     Statistics: Num rows: 1 Data size: 21 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)
@@ -978,6 +980,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart
+                  filterExpr: ds is not null (type: boolean)
                   Statistics: Num rows: 2000 Data size: 21248 Basic stats: 
COMPLETE Column stats: NONE
                   Select Operator
                     expressions: ds (type: string)
@@ -992,10 +995,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart_date_n4
-                  filterExpr: (date = '2008-04-08') (type: boolean)
+                  filterExpr: ((date = '2008-04-08') and ds 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') (type: boolean)
+                    predicate: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                     Statistics: Num rows: 1 Data size: 21 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)
@@ -4933,10 +4936,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart_date_n4
-                  filterExpr: (date = '2008-04-08') (type: boolean)
+                  filterExpr: ((date = '2008-04-08') and ds 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') (type: boolean)
+                    predicate: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                     Statistics: Num rows: 1 Data size: 21 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)
@@ -4971,6 +4974,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart
+                  filterExpr: ds is not null (type: boolean)
                   Statistics: Num rows: 2000 Data size: 21248 Basic stats: 
COMPLETE Column stats: NONE
                   Select Operator
                     expressions: ds (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/db7ff5f3/ql/src/test/results/clientpositive/spark/spark_vectorized_dynamic_partition_pruning.q.out
----------------------------------------------------------------------
diff --git 
a/ql/src/test/results/clientpositive/spark/spark_vectorized_dynamic_partition_pruning.q.out
 
b/ql/src/test/results/clientpositive/spark/spark_vectorized_dynamic_partition_pruning.q.out
index 2061c18..9af51f8 100644
--- 
a/ql/src/test/results/clientpositive/spark/spark_vectorized_dynamic_partition_pruning.q.out
+++ 
b/ql/src/test/results/clientpositive/spark/spark_vectorized_dynamic_partition_pruning.q.out
@@ -817,7 +817,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart_date_n0
-                  filterExpr: (date = '2008-04-08') (type: boolean)
+                  filterExpr: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                   Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE 
Column stats: NONE
                   TableScan Vectorization:
                       native: true
@@ -826,8 +826,8 @@ STAGE PLANS:
                     Filter Vectorization:
                         className: VectorFilterOperator
                         native: true
-                        predicateExpression: 
FilterStringGroupColEqualStringScalar(col 1:string, val 2008-04-08)
-                    predicate: (date = '2008-04-08') (type: boolean)
+                        predicateExpression: FilterExprAndExpr(children: 
FilterStringGroupColEqualStringScalar(col 1:string, val 2008-04-08), 
SelectColumnIsNotNull(col 0:string))
+                    predicate: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                     Statistics: Num rows: 1 Data size: 188 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)
@@ -889,6 +889,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart
+                  filterExpr: ds is not null (type: boolean)
                   Statistics: Num rows: 2000 Data size: 21248 Basic stats: 
COMPLETE Column stats: NONE
                   TableScan Vectorization:
                       native: true
@@ -933,7 +934,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart_date_n0
-                  filterExpr: (date = '2008-04-08') (type: boolean)
+                  filterExpr: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                   Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE 
Column stats: NONE
                   TableScan Vectorization:
                       native: true
@@ -942,8 +943,8 @@ STAGE PLANS:
                     Filter Vectorization:
                         className: VectorFilterOperator
                         native: true
-                        predicateExpression: 
FilterStringGroupColEqualStringScalar(col 1:string, val 2008-04-08)
-                    predicate: (date = '2008-04-08') (type: boolean)
+                        predicateExpression: FilterExprAndExpr(children: 
FilterStringGroupColEqualStringScalar(col 1:string, val 2008-04-08), 
SelectColumnIsNotNull(col 0:string))
+                    predicate: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                     Statistics: Num rows: 1 Data size: 188 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)
@@ -1105,6 +1106,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart
+                  filterExpr: ds is not null (type: boolean)
                   Statistics: Num rows: 2000 Data size: 21248 Basic stats: 
COMPLETE Column stats: NONE
                   TableScan Vectorization:
                       native: true
@@ -1149,7 +1151,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart_date_n0
-                  filterExpr: (date = '2008-04-08') (type: boolean)
+                  filterExpr: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                   Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE 
Column stats: NONE
                   TableScan Vectorization:
                       native: true
@@ -1158,8 +1160,8 @@ STAGE PLANS:
                     Filter Vectorization:
                         className: VectorFilterOperator
                         native: true
-                        predicateExpression: 
FilterStringGroupColEqualStringScalar(col 1:string, val 2008-04-08)
-                    predicate: (date = '2008-04-08') (type: boolean)
+                        predicateExpression: FilterExprAndExpr(children: 
FilterStringGroupColEqualStringScalar(col 1:string, val 2008-04-08), 
SelectColumnIsNotNull(col 0:string))
+                    predicate: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                     Statistics: Num rows: 1 Data size: 188 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)
@@ -1613,7 +1615,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart_date_n0
-                  filterExpr: (date = '2008-04-08') (type: boolean)
+                  filterExpr: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                   Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE 
Column stats: NONE
                   TableScan Vectorization:
                       native: true
@@ -1622,8 +1624,8 @@ STAGE PLANS:
                     Filter Vectorization:
                         className: VectorFilterOperator
                         native: true
-                        predicateExpression: 
FilterStringGroupColEqualStringScalar(col 1:string, val 2008-04-08)
-                    predicate: (date = '2008-04-08') (type: boolean)
+                        predicateExpression: FilterExprAndExpr(children: 
FilterStringGroupColEqualStringScalar(col 1:string, val 2008-04-08), 
SelectColumnIsNotNull(col 0:string))
+                    predicate: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                     Statistics: Num rows: 1 Data size: 188 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)
@@ -1685,6 +1687,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart
+                  filterExpr: ds is not null (type: boolean)
                   Statistics: Num rows: 2000 Data size: 21248 Basic stats: 
COMPLETE Column stats: NONE
                   TableScan Vectorization:
                       native: true
@@ -1729,7 +1732,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart_date_n0
-                  filterExpr: (date = '2008-04-08') (type: boolean)
+                  filterExpr: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                   Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE 
Column stats: NONE
                   TableScan Vectorization:
                       native: true
@@ -1738,8 +1741,8 @@ STAGE PLANS:
                     Filter Vectorization:
                         className: VectorFilterOperator
                         native: true
-                        predicateExpression: 
FilterStringGroupColEqualStringScalar(col 1:string, val 2008-04-08)
-                    predicate: (date = '2008-04-08') (type: boolean)
+                        predicateExpression: FilterExprAndExpr(children: 
FilterStringGroupColEqualStringScalar(col 1:string, val 2008-04-08), 
SelectColumnIsNotNull(col 0:string))
+                    predicate: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                     Statistics: Num rows: 1 Data size: 188 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)
@@ -9449,7 +9452,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart_date_n0
-                  filterExpr: (date = '2008-04-08') (type: boolean)
+                  filterExpr: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                   Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE 
Column stats: NONE
                   TableScan Vectorization:
                       native: true
@@ -9458,8 +9461,8 @@ STAGE PLANS:
                     Filter Vectorization:
                         className: VectorFilterOperator
                         native: true
-                        predicateExpression: 
FilterStringGroupColEqualStringScalar(col 1:string, val 2008-04-08)
-                    predicate: (date = '2008-04-08') (type: boolean)
+                        predicateExpression: FilterExprAndExpr(children: 
FilterStringGroupColEqualStringScalar(col 1:string, val 2008-04-08), 
SelectColumnIsNotNull(col 0:string))
+                    predicate: ((date = '2008-04-08') and ds is not null) 
(type: boolean)
                     Statistics: Num rows: 1 Data size: 188 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ds (type: string)
@@ -9529,6 +9532,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: srcpart
+                  filterExpr: ds is not null (type: boolean)
                   Statistics: Num rows: 2000 Data size: 21248 Basic stats: 
COMPLETE Column stats: NONE
                   TableScan Vectorization:
                       native: true

Reply via email to