This is an automated email from the ASF dual-hosted git repository.

zabetak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 925df927248 HIVE-28910: Remove redundant IS NOT NULL predicates when 
expanding SEARCH (#5795)
925df927248 is described below

commit 925df927248c1be11b84df3e8a0c3e43955e133e
Author: Stamatis Zampetakis <zabe...@gmail.com>
AuthorDate: Fri Jun 27 09:09:59 2025 +0200

    HIVE-28910: Remove redundant IS NOT NULL predicates when expanding SEARCH 
(#5795)
---
 .../positive/llap/iceberg_bucket_map_join_7.q.out  |   8 +-
 .../positive/llap/llap_iceberg_read_orc.q.out      |   4 +-
 .../ql/optimizer/calcite/SearchTransformer.java    |  28 +++--
 .../calcite/rules/HiveInBetweenExpandRule.java     |   3 +-
 .../optimizer/calcite/rules/HiveSearchRules.java   |   9 +-
 .../calcite/stats/FilterSelectivityEstimator.java  |   3 +-
 .../calcite/translator/ExprNodeConverter.java      |   3 +-
 .../calcite/TestSearchTransformerShuttle.java      | 113 +++++++++++++++++++++
 .../llap/bucketsortoptimize_insert_7.q.out         |  16 +--
 .../llap/cbo_join_transitive_pred_loop_1.q.out     |   2 +-
 .../clientpositive/llap/estimate_pkfk_push.q.out   |   4 +-
 .../clientpositive/llap/explainuser_4.q.out        |  56 +++++-----
 .../llap/materialized_view_rewrite_by_text_9.q.out |   2 +-
 .../llap/parquet_predicate_pushdown.q.out          |   6 +-
 ql/src/test/results/clientpositive/llap/pcs.q.out  |   6 +-
 .../results/clientpositive/llap/pointlookup5.q.out |   8 +-
 .../results/clientpositive/llap/pointlookup6.q.out |   4 +-
 .../results/clientpositive/llap/ppd_gby_join.q.out |  16 +--
 .../results/clientpositive/llap/ppd_join.q.out     |  16 +--
 .../results/clientpositive/llap/ppd_join2.q.out    |  16 +--
 .../results/clientpositive/llap/ppd_join3.q.out    |  20 ++--
 .../results/clientpositive/llap/sharedwork.q.out   |   6 +-
 .../llap/tez_dynpart_hashjoin_1.q.out              |  47 ++++-----
 .../llap/tez_vector_dynpart_hashjoin_1.q.out       |  42 ++++----
 .../perf/tpcds30tb/tez/cbo_query34.q.out           |   2 +-
 .../perf/tpcds30tb/tez/cbo_query48.q.out           |   2 +-
 .../perf/tpcds30tb/tez/cbo_query85.q.out           |   4 +-
 .../perf/tpcds30tb/tez/query34.q.out               |   4 +-
 .../perf/tpcds30tb/tez/query48.q.out               |  20 ++--
 .../perf/tpcds30tb/tez/query85.q.out               |   4 +-
 .../clientpositive/tez/explainanalyze_4.q.out      |  54 +++++-----
 31 files changed, 330 insertions(+), 198 deletions(-)

diff --git 
a/iceberg/iceberg-handler/src/test/results/positive/llap/iceberg_bucket_map_join_7.q.out
 
b/iceberg/iceberg-handler/src/test/results/positive/llap/iceberg_bucket_map_join_7.q.out
index 94961e581c0..e32e34094e8 100644
--- 
a/iceberg/iceberg-handler/src/test/results/positive/llap/iceberg_bucket_map_join_7.q.out
+++ 
b/iceberg/iceberg-handler/src/test/results/positive/llap/iceberg_bucket_map_join_7.q.out
@@ -164,13 +164,13 @@ Stage-0
                     Select Operator [SEL_52] (rows=387 width=178)
                       Output:["_col0","_col1"]
                       Filter Operator [FIL_51] (rows=387 width=178)
-                        predicate:(((key < '0') or ((key > '0') and (key < 
'100')) or (key > '100')) and key is not null and value is not null)
+                        predicate:(((key < '0') or ((key > '0') and (key < 
'100')) or (key > '100')) and value is not null)
                         TableScan [TS_3] (rows=500 width=178)
                           
default@src,b,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
                 <-Select Operator [SEL_55] (rows=387 width=269)
                     Output:["_col0","_col1","_col2"]
                     Filter Operator [FIL_54] (rows=387 width=269)
-                      predicate:(((key1 < '0') or ((key1 > '0') and (key1 < 
'100')) or (key1 > '100')) and key1 is not null and key2 is not null)
+                      predicate:(((key1 < '0') or ((key1 > '0') and (key1 < 
'100')) or (key1 > '100')) and key2 is not null)
                       TableScan [TS_0] (rows=500 width=269)
                         
default@srcbucket_big,a,Tbl:COMPLETE,Col:COMPLETE,Grouping Num 
Buckets:8,Grouping Partition 
Columns:["key1","key2"],Output:["key1","key2","value"]
 
@@ -360,13 +360,13 @@ Stage-0
                     Select Operator [SEL_32] (rows=387 width=178)
                       Output:["_col0","_col1"]
                       Filter Operator [FIL_31] (rows=387 width=178)
-                        predicate:(((key < '0') or ((key > '0') and (key < 
'100')) or (key > '100')) and key is not null)
+                        predicate:((key < '0') or (key > '100') or ((key > 
'0') and (key < '100')))
                         TableScan [TS_3] (rows=500 width=178)
                           
default@src,b,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"]
                 <-Select Operator [SEL_35] (rows=387 width=269)
                     Output:["_col0","_col1","_col2"]
                     Filter Operator [FIL_34] (rows=387 width=269)
-                      predicate:(((key1 < '0') or ((key1 > '0') and (key1 < 
'100')) or (key1 > '100')) and key1 is not null)
+                      predicate:((key1 < '0') or (key1 > '100') or ((key1 > 
'0') and (key1 < '100')))
                       TableScan [TS_0] (rows=500 width=269)
                         
default@srcbucket_big,a,Tbl:COMPLETE,Col:COMPLETE,Grouping Num 
Buckets:4,Grouping Partition Columns:["key1"],Output:["key1","key2","value"]
 
diff --git 
a/iceberg/iceberg-handler/src/test/results/positive/llap/llap_iceberg_read_orc.q.out
 
b/iceberg/iceberg-handler/src/test/results/positive/llap/llap_iceberg_read_orc.q.out
index 4a6770803dc..cefa4effc89 100644
--- 
a/iceberg/iceberg-handler/src/test/results/positive/llap/llap_iceberg_read_orc.q.out
+++ 
b/iceberg/iceberg-handler/src/test/results/positive/llap/llap_iceberg_read_orc.q.out
@@ -359,11 +359,11 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: o
-                  filterExpr: ((((quantity > 0) and (quantity < 39)) or 
((quantity > 39) and (quantity < 69)) or (quantity > 70)) and quantity is not 
null and itemid is not null) (type: boolean)
+                  filterExpr: ((((quantity > 0) and (quantity < 39)) or 
((quantity > 39) and (quantity < 69)) or (quantity > 70)) and itemid is not 
null) (type: boolean)
                   probeDecodeDetails: cacheKey:HASH_MAP_MAPJOIN_29_container, 
bigKeyColName:itemid, smallTablePos:1, keyRatio:0.9523809523809523
                   Statistics: Num rows: 21 Data size: 168 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((((quantity > 0) and (quantity < 39)) or 
((quantity > 39) and (quantity < 69)) or (quantity > 70)) and quantity is not 
null and itemid is not null) (type: boolean)
+                    predicate: ((((quantity > 0) and (quantity < 39)) or 
((quantity > 39) and (quantity < 69)) or (quantity > 70)) and itemid is not 
null) (type: boolean)
                     Statistics: Num rows: 21 Data size: 168 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: quantity (type: int), itemid (type: int)
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/SearchTransformer.java
 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/SearchTransformer.java
index dc88dade4b2..5357521270f 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/SearchTransformer.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/SearchTransformer.java
@@ -58,14 +58,16 @@ public class SearchTransformer<C extends Comparable<C>> {
   private final RexBuilder rexBuilder;
   private final RexNode ref;
   private final Sarg<C> sarg;
+  private final RexUnknownAs unknownContext;
   protected final RelDataType type;
 
-  public SearchTransformer(RexBuilder rexBuilder, RexCall search) {
+  public SearchTransformer(RexBuilder rexBuilder, RexCall search, final 
RexUnknownAs unknownContext) {
     this.rexBuilder = rexBuilder;
     ref = search.getOperands().get(0);
     RexLiteral literal = (RexLiteral) search.operands.get(1);
     sarg = Objects.requireNonNull(literal.getValueAs(Sarg.class), "Sarg");
     type = literal.getType();
+    this.unknownContext = unknownContext;
   }
 
   public RexNode transform() {
@@ -76,7 +78,7 @@ public RexNode transform() {
     RangeSets.forEach(sarg.rangeSet, consumer);
 
     List<RexNode> orList = new ArrayList<>();
-    if (sarg.nullAs == RexUnknownAs.TRUE) {
+    if (sarg.nullAs == RexUnknownAs.TRUE && unknownContext != 
RexUnknownAs.TRUE) {
       orList.add(rexBuilder.makeCall(SqlStdOperatorTable.IS_NULL, ref));
     }
     switch (consumer.inLiterals.size()) {
@@ -94,7 +96,7 @@ public RexNode transform() {
     orList.addAll(consumer.nodes);
     RexNode x = RexUtil.composeDisjunction(rexBuilder, orList);
 
-    if (sarg.nullAs == RexUnknownAs.FALSE) {
+    if (sarg.nullAs == RexUnknownAs.FALSE && unknownContext != 
RexUnknownAs.FALSE) {
       RexNode notNull = rexBuilder.makeCall(SqlStdOperatorTable.IS_NOT_NULL, 
ref);
       x = RexUtil.composeConjunction(rexBuilder, Arrays.asList(notNull, x));
     }
@@ -104,9 +106,11 @@ public RexNode transform() {
 
   public static class Shuttle extends RexShuttle {
     private final RexBuilder rexBuilder;
+    private RexUnknownAs unknownContext;
 
-    public Shuttle(final RexBuilder rexBuilder) {
+    public Shuttle(RexBuilder rexBuilder, RexUnknownAs unknownContext) {
       this.rexBuilder = rexBuilder;
+      this.unknownContext = unknownContext;
     }
 
     @Override public RexNode visitCall(RexCall call) {
@@ -129,9 +133,21 @@ public Shuttle(final RexBuilder rexBuilder) {
           return call;
         }
       case SEARCH:
-        return new SearchTransformer<>(rexBuilder, call).transform();
+        return new SearchTransformer<>(rexBuilder, call, 
this.unknownContext).transform();
       default:
-        return super.visitCall(call);
+        // Some calls (e.g., IS [NOT] NULL, COALESCE) are sensitive to changes 
in the 3-valued
+        // logic (notably nulls). In such cases, the nullability of the 
operands is important,
+        // and it is unsafe to make simplifications based on the general 
unknown context.
+        // Instead of adding extra handlers for each special case we pick a 
more conservative
+        // approach and use the RexUnknownAs.UNKNOWN context for anything that 
is not a simple
+        // conjunction, disjunction, and SEARCH.
+        // Switch the unknown context, to preserve unknown/null semantics 
below this call.
+        RexUnknownAs previousContext = this.unknownContext;
+        this.unknownContext = RexUnknownAs.UNKNOWN;
+        RexNode newCall = super.visitCall(call);
+        // Restore the original context once we finish with the call operands.
+        this.unknownContext = previousContext;
+        return newCall;
       }
     }
   }
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveInBetweenExpandRule.java
 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveInBetweenExpandRule.java
index a00f0566d28..905363990d2 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveInBetweenExpandRule.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveInBetweenExpandRule.java
@@ -29,6 +29,7 @@
 import org.apache.calcite.rex.RexCall;
 import org.apache.calcite.rex.RexNode;
 import org.apache.calcite.rex.RexShuttle;
+import org.apache.calcite.rex.RexUnknownAs;
 import org.apache.calcite.rex.RexUtil;
 import org.apache.calcite.sql.fun.SqlStdOperatorTable;
 import org.apache.hadoop.hive.ql.optimizer.calcite.HiveRelFactories;
@@ -152,7 +153,7 @@ private RexInBetweenExpander(RexBuilder rexBuilder) {
     public RexNode visitCall(final RexCall call) {
       switch (call.getKind()) {
       case SEARCH: {
-        return new SearchTransformer<>(rexBuilder, 
call).transform().accept(this);
+        return new SearchTransformer<>(rexBuilder, call, 
RexUnknownAs.UNKNOWN).transform().accept(this);
       }
       case AND: {
         boolean[] update = {false};
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveSearchRules.java
 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveSearchRules.java
index 86f2a20d553..9a87aef30ee 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveSearchRules.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveSearchRules.java
@@ -23,6 +23,9 @@
 import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveJoin;
 import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveProject;
 
+import static org.apache.calcite.rex.RexUnknownAs.FALSE;
+import static org.apache.calcite.rex.RexUnknownAs.UNKNOWN;
+
 /**
  * A holder class for rules related to the SEARCH operator.
  */
@@ -32,17 +35,17 @@ private HiveSearchRules() {
   }
 
   public static final RelOptRule PROJECT_SEARCH_EXPAND =
-      new 
HiveRexShuttleTransformRule.Config().withRexShuttle(SearchTransformer.Shuttle::new)
+      new HiveRexShuttleTransformRule.Config().withRexShuttle(x -> new 
SearchTransformer.Shuttle(x, UNKNOWN))
           .withDescription("HiveProjectSearchExpandRule")
           .withOperandSupplier(o -> o.operand(HiveProject.class).anyInputs())
           .toRule();
   public static final RelOptRule FILTER_SEARCH_EXPAND =
-      new 
HiveRexShuttleTransformRule.Config().withRexShuttle(SearchTransformer.Shuttle::new)
+      new HiveRexShuttleTransformRule.Config().withRexShuttle(x -> new 
SearchTransformer.Shuttle(x, FALSE))
           .withDescription("HiveFilterSearchExpandRule")
           .withOperandSupplier(o -> o.operand(HiveFilter.class).anyInputs())
           .toRule();
   public static final RelOptRule JOIN_SEARCH_EXPAND =
-      new 
HiveRexShuttleTransformRule.Config().withRexShuttle(SearchTransformer.Shuttle::new)
+      new HiveRexShuttleTransformRule.Config().withRexShuttle(x -> new 
SearchTransformer.Shuttle(x, FALSE))
           .withDescription("HiveJoinSearchExpandRule")
           .withOperandSupplier(o -> o.operand(HiveJoin.class).anyInputs())
           .toRule();
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/stats/FilterSelectivityEstimator.java
 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/stats/FilterSelectivityEstimator.java
index e51b042853a..b18c525c884 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/stats/FilterSelectivityEstimator.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/stats/FilterSelectivityEstimator.java
@@ -35,6 +35,7 @@
 import org.apache.calcite.rex.RexInputRef;
 import org.apache.calcite.rex.RexLiteral;
 import org.apache.calcite.rex.RexNode;
+import org.apache.calcite.rex.RexUnknownAs;
 import org.apache.calcite.rex.RexUtil;
 import org.apache.calcite.rex.RexVisitorImpl;
 import org.apache.calcite.sql.SqlKind;
@@ -107,7 +108,7 @@ public Double visitCall(RexCall call) {
       break;
     }
     case SEARCH:
-      return new SearchTransformer<>(rexBuilder, 
call).transform().accept(this);
+      return new SearchTransformer<>(rexBuilder, call, 
RexUnknownAs.FALSE).transform().accept(this);
     case OR: {
       selectivity = computeDisjunctionSelectivity(call);
       break;
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ExprNodeConverter.java
 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ExprNodeConverter.java
index e07092b9867..b582c62997e 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ExprNodeConverter.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ExprNodeConverter.java
@@ -37,6 +37,7 @@
 import org.apache.calcite.rex.RexLiteral;
 import org.apache.calcite.rex.RexNode;
 import org.apache.calcite.rex.RexOver;
+import org.apache.calcite.rex.RexUnknownAs;
 import org.apache.calcite.rex.RexUtil;
 import org.apache.calcite.rex.RexVisitorImpl;
 import org.apache.calcite.rex.RexWindow;
@@ -200,7 +201,7 @@ public ExprNodeDesc visitCall(RexCall call) {
         args.add(operand.accept(this));
       }
     } else if (call.getKind() == SqlKind.SEARCH) {
-      return new SearchTransformer<>(rexBuilder, 
call).transform().accept(this);
+      return new SearchTransformer<>(rexBuilder, call, 
RexUnknownAs.UNKNOWN).transform().accept(this);
     } else {
       for (RexNode operand : call.operands) {
         args.add(operand.accept(this));
diff --git 
a/ql/src/test/org/apache/hadoop/hive/ql/optimizer/calcite/TestSearchTransformerShuttle.java
 
b/ql/src/test/org/apache/hadoop/hive/ql/optimizer/calcite/TestSearchTransformerShuttle.java
new file mode 100644
index 00000000000..599ee2d6c16
--- /dev/null
+++ 
b/ql/src/test/org/apache/hadoop/hive/ql/optimizer/calcite/TestSearchTransformerShuttle.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.ql.optimizer.calcite;
+
+import com.google.common.collect.ImmutableRangeSet;
+import com.google.common.collect.Range;
+import com.google.common.collect.RangeSet;
+
+import org.apache.calcite.jdbc.JavaTypeFactoryImpl;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rex.RexBuilder;
+import org.apache.calcite.rex.RexLiteral;
+import org.apache.calcite.rex.RexNode;
+import org.apache.calcite.rex.RexUnknownAs;
+import org.apache.calcite.sql.type.SqlTypeName;
+import org.apache.calcite.util.Sarg;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import static org.apache.calcite.rex.RexUnknownAs.FALSE;
+import static org.apache.calcite.rex.RexUnknownAs.TRUE;
+import static org.apache.calcite.rex.RexUnknownAs.UNKNOWN;
+import static org.apache.calcite.rex.RexUnknownAs.values;
+import static org.apache.calcite.sql.fun.SqlStdOperatorTable.COALESCE;
+import static org.apache.calcite.sql.fun.SqlStdOperatorTable.SEARCH;
+import static org.junit.Assert.assertEquals;
+
+@RunWith(Parameterized.class)
+public class TestSearchTransformerShuttle {
+
+  private final RexNode node;
+  private final RexUnknownAs shuttleContext;
+  private final String expected;
+
+  public TestSearchTransformerShuttle(RexNode node, RexUnknownAs 
shuttleContext, String expected) {
+    this.node = node;
+    this.shuttleContext = shuttleContext;
+    this.expected = expected;
+  }
+
+  @Test
+  public void testAccept() {
+    RexBuilder rexBuilder = new RexBuilder(new JavaTypeFactoryImpl(new 
HiveTypeSystemImpl()));
+    SearchTransformer.Shuttle shuttle = new 
SearchTransformer.Shuttle(rexBuilder, shuttleContext);
+    assertEquals(expected, node.accept(shuttle).toString());
+  }
+
+  @Parameterized.Parameters(name = "expression={0}, shuttleCtx={1}")
+  public static Collection<Object[]> generateExpressions() {
+    RexBuilder rexBuilder = new RexBuilder(new JavaTypeFactoryImpl(new 
HiveTypeSystemImpl()));
+    List<Object[]> expressions = new ArrayList<>();
+    RexLiteral rexTrue = rexBuilder.makeLiteral(true);
+    RexLiteral rexFalse = rexBuilder.makeLiteral(false);
+
+    final RexNode searchUnknown = createSearchNode(rexBuilder, 10, 20, 
UNKNOWN);
+    final RexNode searchFalse = createSearchNode(rexBuilder, 10, 20, FALSE);
+    final RexNode searchTrue = createSearchNode(rexBuilder, 10, 20, TRUE);
+    for (RexUnknownAs nullAs : values()) {
+      // COALESCE is a special function so it's unsafe to drop IS [NOT] NULL, 
no matter the context
+      expressions.add(new Object[] { rexBuilder.makeCall(COALESCE, 
searchFalse, rexTrue), nullAs,
+          "COALESCE(AND(IS NOT NULL($0), BETWEEN(false, $0, 10, 20)), true)" 
});
+      expressions.add(new Object[] { rexBuilder.makeCall(COALESCE, searchTrue, 
rexFalse), nullAs,
+          "COALESCE(OR(IS NULL($0), BETWEEN(false, $0, 10, 20)), false)" });
+      expressions.add(new Object[] { rexBuilder.makeCall(COALESCE, 
searchUnknown, rexFalse), nullAs,
+          "COALESCE(BETWEEN(false, $0, 10, 20), false)" });
+      // Search with null as unknown does not generate extra IS [NOT] NULL 
predicates
+      expressions.add(new Object[] { searchUnknown, nullAs, "BETWEEN(false, 
$0, 10, 20)" });
+    }
+
+    // In FALSE/FALSE and TRUE/TRUE cases, the IS [NOT] NULL predicates are 
dropped
+    expressions.add(new Object[] { searchFalse, FALSE, "BETWEEN(false, $0, 10, 
20)" });
+    expressions.add(new Object[] { searchTrue, TRUE, "BETWEEN(false, $0, 10, 
20)" });
+
+    expressions.add(new Object[] { searchTrue, FALSE, "OR(IS NULL($0), 
BETWEEN(false, $0, 10, 20))" });
+    expressions.add(new Object[] { searchTrue, UNKNOWN, "OR(IS NULL($0), 
BETWEEN(false, $0, 10, 20))" });
+
+    expressions.add(new Object[] { searchFalse, TRUE, "AND(IS NOT NULL($0), 
BETWEEN(false, $0, 10, 20))" });
+    expressions.add(new Object[] { searchFalse, UNKNOWN, "AND(IS NOT NULL($0), 
BETWEEN(false, $0, 10, 20))" });
+    return expressions;
+  }
+
+  private static RexNode createSearchNode(RexBuilder builder, int lower, int 
upper, RexUnknownAs nullAs) {
+    final RelDataType intType = builder.getTypeFactory()
+        
.createTypeWithNullability(builder.getTypeFactory().createSqlType(SqlTypeName.INTEGER),
 true);
+    RangeSet<BigDecimal> rangeSet =
+        ImmutableRangeSet.of(Range.closed(BigDecimal.valueOf(lower), 
BigDecimal.valueOf(upper)));
+    Sarg sarg = Sarg.of(nullAs, rangeSet);
+    return builder.makeCall(SEARCH, builder.makeInputRef(intType, 0), 
builder.makeSearchArgumentLiteral(sarg, intType));
+  }
+
+}
+
diff --git 
a/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_7.q.out 
b/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_7.q.out
index 431dd51ee20..85de051bacc 100644
--- a/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_7.q.out
+++ b/ql/src/test/results/clientpositive/llap/bucketsortoptimize_insert_7.q.out
@@ -95,10 +95,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: b
-                  filterExpr: ((key) IN (0, 5) and key is not null) (type: 
boolean)
+                  filterExpr: (key) IN (0, 5) (type: boolean)
                   Statistics: Num rows: 84 Data size: 7896 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((key) IN (0, 5) and key is not null) (type: 
boolean)
+                    predicate: (key) IN (0, 5) (type: boolean)
                     Statistics: Num rows: 3 Data size: 282 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: int), value (type: string)
@@ -108,10 +108,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: a
-                  filterExpr: ((key) IN (0, 5) and key is not null) (type: 
boolean)
+                  filterExpr: (key) IN (0, 5) (type: boolean)
                   Statistics: Num rows: 10 Data size: 930 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((key) IN (0, 5) and key is not null) (type: 
boolean)
+                    predicate: (key) IN (0, 5) (type: boolean)
                     Statistics: Num rows: 3 Data size: 279 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: int), value (type: string)
@@ -323,10 +323,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: test_table2_n19
-                  filterExpr: ((key) IN (0, 5) and key is not null) (type: 
boolean)
+                  filterExpr: (key) IN (0, 5) (type: boolean)
                   Statistics: Num rows: 84 Data size: 7896 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((key) IN (0, 5) and key is not null) (type: 
boolean)
+                    predicate: (key) IN (0, 5) (type: boolean)
                     Statistics: Num rows: 3 Data size: 282 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: int), value (type: string)
@@ -336,10 +336,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: test_table1_n20
-                  filterExpr: ((key) IN (0, 5) and key is not null) (type: 
boolean)
+                  filterExpr: (key) IN (0, 5) (type: boolean)
                   Statistics: Num rows: 10 Data size: 930 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((key) IN (0, 5) and key is not null) (type: 
boolean)
+                    predicate: (key) IN (0, 5) (type: boolean)
                     Statistics: Num rows: 3 Data size: 279 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: int), value (type: string)
diff --git 
a/ql/src/test/results/clientpositive/llap/cbo_join_transitive_pred_loop_1.q.out 
b/ql/src/test/results/clientpositive/llap/cbo_join_transitive_pred_loop_1.q.out
index 28b92d0abd4..d0c75a7707a 100644
--- 
a/ql/src/test/results/clientpositive/llap/cbo_join_transitive_pred_loop_1.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/cbo_join_transitive_pred_loop_1.q.out
@@ -67,6 +67,6 @@ HiveProject(month=[$0], con_usd=[$2])
           HiveFilter(condition=[=($0, 202110)])
             HiveTableScan(table=[[default, test2]], table:alias=[test2])
     HiveProject(mth=[$0], con_usd=[$1])
-      HiveFilter(condition=[AND(IS NOT NULL($0), IN($0, 202110, 202503))])
+      HiveFilter(condition=[IN($0, 202110, 202503)])
         HiveTableScan(table=[[default, test3]], table:alias=[d])
 
diff --git a/ql/src/test/results/clientpositive/llap/estimate_pkfk_push.q.out 
b/ql/src/test/results/clientpositive/llap/estimate_pkfk_push.q.out
index 596f9a31cee..b1a7a4bccae 100644
--- a/ql/src/test/results/clientpositive/llap/estimate_pkfk_push.q.out
+++ b/ql/src/test/results/clientpositive/llap/estimate_pkfk_push.q.out
@@ -215,7 +215,7 @@ Stage-0
                 Select Operator [SEL_48] (rows=20/20 width=8)
                   Output:["_col0","_col1"]
                   Filter Operator [FIL_47] (rows=20/20 width=8)
-                    predicate:((ship_type_id) IN (1, 2) and ship_type_id is 
not null and id is not null)
+                    predicate:((ship_type_id) IN (1, 2) and id is not null)
                     TableScan [TS_0] (rows=100/100 width=8)
                       
default@ships,s,Tbl:COMPLETE,Col:COMPLETE,Output:["id","ship_type_id"]
             <-Map 4 [SIMPLE_EDGE] vectorized, llap
@@ -224,7 +224,7 @@ Stage-0
                 Select Operator [SEL_51] (rows=2/2 width=4)
                   Output:["_col0"]
                   Filter Operator [FIL_50] (rows=2/2 width=4)
-                    predicate:((id) IN (1, 2) and id is not null)
+                    predicate:(id) IN (1, 2)
                     TableScan [TS_3] (rows=10/10 width=4)
                       
default@ship_types,st,Tbl:COMPLETE,Col:COMPLETE,Output:["id"]
 
diff --git a/ql/src/test/results/clientpositive/llap/explainuser_4.q.out 
b/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
index 1e2424db1b0..df20fd6f29f 100644
--- a/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
+++ b/ql/src/test/results/clientpositive/llap/explainuser_4.q.out
@@ -30,28 +30,28 @@ Stage-0
     Stage-1
       Reducer 3 vectorized, llap
       File Output Operator [FS_35]
-        Select Operator [SEL_34] (rows=3453 width=528)
+        Select Operator [SEL_34] (rows=4626 width=528)
           
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"]
         <-Reducer 2 [SIMPLE_EDGE] llap
           SHUFFLE [RS_10]
-            Merge Join Operator [MERGEJOIN_27] (rows=3453 width=528)
+            Merge Join Operator [MERGEJOIN_27] (rows=4626 width=528)
               
Conds:RS_30._col2=RS_33._col2(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"]
             <-Map 1 [SIMPLE_EDGE] vectorized, llap
               SHUFFLE [RS_30]
                 PartitionCols:_col2
-                Select Operator [SEL_29] (rows=2298 width=231)
+                Select Operator [SEL_29] (rows=3078 width=231)
                   
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
-                  Filter Operator [FIL_28] (rows=2298 width=231)
-                    predicate:(cint BETWEEN 1000000 AND 3000000 and cint is 
not null)
+                  Filter Operator [FIL_28] (rows=3078 width=231)
+                    predicate:cint BETWEEN 1000000 AND 3000000
                     TableScan [TS_0] (rows=12288 width=231)
                       
default@alltypesorc,a,Tbl:COMPLETE,Col:COMPLETE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
             <-Map 4 [SIMPLE_EDGE] vectorized, llap
               SHUFFLE [RS_33]
                 PartitionCols:_col2
-                Select Operator [SEL_32] (rows=1716 width=231)
+                Select Operator [SEL_32] (rows=2298 width=231)
                   
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
-                  Filter Operator [FIL_31] (rows=1716 width=231)
-                    predicate:(cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null)
+                  Filter Operator [FIL_31] (rows=2298 width=231)
+                    predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null)
                     TableScan [TS_3] (rows=12288 width=231)
                       
default@alltypesorc,b,Tbl:COMPLETE,Col:COMPLETE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
 
@@ -119,24 +119,24 @@ Stage-0
           PARTITION_ONLY_SHUFFLE [RS_11]
             Group By Operator [GBY_10] (rows=1 width=8)
               Output:["_col0"],aggregations:["count()"]
-              Merge Join Operator [MERGEJOIN_29] (rows=3453 width=8)
+              Merge Join Operator [MERGEJOIN_29] (rows=4626 width=8)
                 Conds:RS_32._col0=RS_35._col0(Inner)
               <-Map 1 [SIMPLE_EDGE] vectorized, llap
                 SHUFFLE [RS_32]
                   PartitionCols:_col0
-                  Select Operator [SEL_31] (rows=2298 width=2)
+                  Select Operator [SEL_31] (rows=3078 width=2)
                     Output:["_col0"]
-                    Filter Operator [FIL_30] (rows=2298 width=2)
-                      predicate:(cint BETWEEN 1000000 AND 3000000 and cint is 
not null)
+                    Filter Operator [FIL_30] (rows=3078 width=2)
+                      predicate:cint BETWEEN 1000000 AND 3000000
                       TableScan [TS_0] (rows=12288 width=2)
                         
default@alltypesorc,a,Tbl:COMPLETE,Col:COMPLETE,Output:["cint"]
               <-Map 4 [SIMPLE_EDGE] vectorized, llap
                 SHUFFLE [RS_35]
                   PartitionCols:_col0
-                  Select Operator [SEL_34] (rows=1716 width=2)
+                  Select Operator [SEL_34] (rows=2298 width=2)
                     Output:["_col0"]
-                    Filter Operator [FIL_33] (rows=1716 width=8)
-                      predicate:(cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null)
+                    Filter Operator [FIL_33] (rows=2298 width=8)
+                      predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null)
                       TableScan [TS_3] (rows=12288 width=8)
                         
default@alltypesorc,b,Tbl:COMPLETE,Col:COMPLETE,Output:["cint","cbigint"]
 
@@ -192,35 +192,35 @@ Stage-0
     Stage-1
       Reducer 4 vectorized, llap
       File Output Operator [FS_41]
-        Select Operator [SEL_40] (rows=2298 width=11)
+        Select Operator [SEL_40] (rows=3078 width=11)
           Output:["_col0","_col1"]
         <-Reducer 3 [SIMPLE_EDGE] vectorized, llap
           SHUFFLE [RS_39]
-            Group By Operator [GBY_38] (rows=2298 width=11)
+            Group By Operator [GBY_38] (rows=3078 width=11)
               
Output:["_col0","_col1"],aggregations:["count(VALUE._col0)"],keys:KEY._col0
             <-Reducer 2 [SIMPLE_EDGE] llap
               SHUFFLE [RS_11]
                 PartitionCols:_col0
-                Group By Operator [GBY_10] (rows=2298 width=11)
+                Group By Operator [GBY_10] (rows=3078 width=11)
                   Output:["_col0","_col1"],aggregations:["count()"],keys:_col0
-                  Merge Join Operator [MERGEJOIN_31] (rows=3453 width=3)
+                  Merge Join Operator [MERGEJOIN_31] (rows=4626 width=3)
                     Conds:RS_34._col1=RS_37._col0(Inner),Output:["_col0"]
                   <-Map 1 [SIMPLE_EDGE] vectorized, llap
                     SHUFFLE [RS_34]
                       PartitionCols:_col1
-                      Select Operator [SEL_33] (rows=2298 width=5)
+                      Select Operator [SEL_33] (rows=3078 width=5)
                         Output:["_col0","_col1"]
-                        Filter Operator [FIL_32] (rows=2298 width=5)
-                          predicate:(cint BETWEEN 1000000 AND 3000000 and cint 
is not null)
+                        Filter Operator [FIL_32] (rows=3078 width=5)
+                          predicate:cint BETWEEN 1000000 AND 3000000
                           TableScan [TS_0] (rows=12288 width=5)
                             
default@alltypesorc,a,Tbl:COMPLETE,Col:COMPLETE,Output:["csmallint","cint"]
                   <-Map 5 [SIMPLE_EDGE] vectorized, llap
                     SHUFFLE [RS_37]
                       PartitionCols:_col0
-                      Select Operator [SEL_36] (rows=1716 width=2)
+                      Select Operator [SEL_36] (rows=2298 width=2)
                         Output:["_col0"]
-                        Filter Operator [FIL_35] (rows=1716 width=8)
-                          predicate:(cint BETWEEN 1000000 AND 3000000 and cint 
is not null and cbigint is not null)
+                        Filter Operator [FIL_35] (rows=2298 width=8)
+                          predicate:(cint BETWEEN 1000000 AND 3000000 and 
cbigint is not null)
                           TableScan [TS_3] (rows=12288 width=8)
                             
default@alltypesorc,b,Tbl:COMPLETE,Col:COMPLETE,Output:["cint","cbigint"]
 
@@ -294,7 +294,7 @@ Stage-0
                 Select Operator [SEL_34] (rows=1365 width=240)
                   
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
                   Filter Operator [FIL_32] (rows=1365 width=240)
-                    predicate:(cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null)
+                    predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null)
                     TableScan [TS_0] (rows=12288 width=240)
                       
default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
             <-Reducer 2 [CUSTOM_SIMPLE_EDGE] vectorized, llap
@@ -376,7 +376,7 @@ Stage-0
                   Select Operator [SEL_36] (rows=1365 width=240)
                     Output:["_col0"]
                     Filter Operator [FIL_34] (rows=1365 width=240)
-                      predicate:(cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null)
+                      predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null)
                       TableScan [TS_0] (rows=12288 width=240)
                         
default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["cint","cbigint"]
               <-Reducer 2 [CUSTOM_SIMPLE_EDGE] vectorized, llap
@@ -457,7 +457,7 @@ Stage-0
                       Select Operator [SEL_38] (rows=1365 width=240)
                         Output:["_col0"]
                         Filter Operator [FIL_36] (rows=1365 width=240)
-                          predicate:(cint BETWEEN 1000000 AND 3000000 and cint 
is not null and cbigint is not null)
+                          predicate:(cint BETWEEN 1000000 AND 3000000 and 
cbigint is not null)
                           TableScan [TS_0] (rows=12288 width=240)
                             
default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["csmallint","cint","cbigint"]
                   <-Reducer 2 [CUSTOM_SIMPLE_EDGE] vectorized, llap
diff --git 
a/ql/src/test/results/clientpositive/llap/materialized_view_rewrite_by_text_9.q.out
 
b/ql/src/test/results/clientpositive/llap/materialized_view_rewrite_by_text_9.q.out
index 4a455a7bee2..52ce097a039 100644
--- 
a/ql/src/test/results/clientpositive/llap/materialized_view_rewrite_by_text_9.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/materialized_view_rewrite_by_text_9.q.out
@@ -79,7 +79,7 @@ POSTHOOK: Input: default@t2
 CBO PLAN:
 HiveSemiJoin(condition=[=($0, $1)], joinType=[semi])
   HiveProject(col0=[$0])
-    HiveFilter(condition=[AND(IS NOT NULL($0), IN($0, 1, 2))])
+    HiveFilter(condition=[IN($0, 1, 2)])
       HiveTableScan(table=[[default, t2]], table:alias=[t2])
   HiveProject($f0=[$0])
     HiveUnion(all=[true])
diff --git 
a/ql/src/test/results/clientpositive/llap/parquet_predicate_pushdown.q.out 
b/ql/src/test/results/clientpositive/llap/parquet_predicate_pushdown.q.out
index 4600021ce40..d7a825b592a 100644
--- a/ql/src/test/results/clientpositive/llap/parquet_predicate_pushdown.q.out
+++ b/ql/src/test/results/clientpositive/llap/parquet_predicate_pushdown.q.out
@@ -344,7 +344,7 @@ STAGE PLANS:
         TableScan
           alias: tbl_pred
           Filter Operator
-            predicate: ((t > -2Y) and (t < 0Y) and t is not null) (type: 
boolean)
+            predicate: ((t > -2Y) and (t < 0Y)) (type: boolean)
             Limit
               Number of rows: 10
               Select Operator
@@ -378,9 +378,9 @@ STAGE PLANS:
       Processor Tree:
         TableScan
           alias: tbl_pred
-          filterExpr: ((t > -2Y) and (t < 0Y) and t is not null) (type: 
boolean)
+          filterExpr: ((t > -2Y) and (t < 0Y)) (type: boolean)
           Filter Operator
-            predicate: ((t > -2Y) and (t < 0Y) and t is not null) (type: 
boolean)
+            predicate: ((t > -2Y) and (t < 0Y)) (type: boolean)
             Limit
               Number of rows: 10
               Select Operator
diff --git a/ql/src/test/results/clientpositive/llap/pcs.q.out 
b/ql/src/test/results/clientpositive/llap/pcs.q.out
index 542efa297de..37f4d037ae8 100644
--- a/ql/src/test/results/clientpositive/llap/pcs.q.out
+++ b/ql/src/test/results/clientpositive/llap/pcs.q.out
@@ -523,10 +523,10 @@ POSTHOOK: Input: default@pcs_t1@ds=2000-04-09
 OPTIMIZED SQL: SELECT `t0`.`ds`, `t2`.`key`
 FROM (SELECT `key`, `ds`
 FROM `default`.`pcs_t1`
-WHERE `key` IN (1, 2) AND `ds` IS NOT NULL AND `ds` IN ('2000-04-08', 
'2000-04-09')) AS `t0`
+WHERE `key` IN (1, 2) AND `ds` IN ('2000-04-08', '2000-04-09')) AS `t0`
 INNER JOIN (SELECT `key`, `ds`
 FROM `default`.`pcs_t1`
-WHERE `ds` IS NOT NULL AND `ds` IN ('2000-04-08', '2000-04-09')) AS `t2` ON 
(`t0`.`key`, `t0`.`ds`, `t2`.`ds`) IN ((1, '2000-04-08', '2000-04-09'), (2, 
'2000-04-09', '2000-04-08')) AND `t0`.`ds` = `t2`.`ds`
+WHERE `ds` IN ('2000-04-08', '2000-04-09')) AS `t2` ON (`t0`.`key`, `t0`.`ds`, 
`t2`.`ds`) IN ((1, '2000-04-08', '2000-04-09'), (2, '2000-04-09', 
'2000-04-08')) AND `t0`.`ds` = `t2`.`ds`
 STAGE DEPENDENCIES:
   Stage-1 is a root stage
   Stage-0 depends on stages: Stage-1
@@ -665,7 +665,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: b
-                  filterExpr: (ds is not null and (ds) IN ('2000-04-08', 
'2000-04-09')) (type: boolean)
+                  filterExpr: (ds) IN ('2000-04-08', '2000-04-09') (type: 
boolean)
                   Statistics: Num rows: 40 Data size: 7520 Basic stats: 
COMPLETE Column stats: COMPLETE
                   GatherStats: false
                   Select Operator
diff --git a/ql/src/test/results/clientpositive/llap/pointlookup5.q.out 
b/ql/src/test/results/clientpositive/llap/pointlookup5.q.out
index b923f566dd3..bbe6d5d0ffd 100644
--- a/ql/src/test/results/clientpositive/llap/pointlookup5.q.out
+++ b/ql/src/test/results/clientpositive/llap/pointlookup5.q.out
@@ -80,10 +80,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: t
-                  filterExpr: ((a) IN (1, 2, 3) and a is not null) (type: 
boolean)
+                  filterExpr: (a) IN (1, 2, 3) (type: boolean)
                   Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE 
Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((a) IN (1, 2, 3) and a is not null) (type: 
boolean)
+                    predicate: (a) IN (1, 2, 3) (type: boolean)
                     Statistics: Num rows: 3 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: a (type: int), (a * a) (type: int), (a) IN 
(1, 2) (type: boolean), (a) IN (2, 3) (type: boolean)
@@ -102,10 +102,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: t2
-                  filterExpr: ((b) IN (1, 2, 3) and b is not null) (type: 
boolean)
+                  filterExpr: (b) IN (1, 2, 3) (type: boolean)
                   Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE 
Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((b) IN (1, 2, 3) and b is not null) (type: 
boolean)
+                    predicate: (b) IN (1, 2, 3) (type: boolean)
                     Statistics: Num rows: 3 Data size: 12 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: b (type: int), (b + 3) (type: int), (b) IN 
(1, 2) (type: boolean), (b) IN (2, 3) (type: boolean)
diff --git a/ql/src/test/results/clientpositive/llap/pointlookup6.q.out 
b/ql/src/test/results/clientpositive/llap/pointlookup6.q.out
index d1cff14da0b..793422da5bb 100644
--- a/ql/src/test/results/clientpositive/llap/pointlookup6.q.out
+++ b/ql/src/test/results/clientpositive/llap/pointlookup6.q.out
@@ -58,10 +58,10 @@ CBO PLAN:
 HiveProject(string_col=[$0])
   HiveJoin(condition=[=($1, $0)], joinType=[inner], algorithm=[none], 
cost=[not available])
     HiveProject(string_col=[$0])
-      HiveFilter(condition=[AND(IS NOT NULL($0), IN($0, 
_UTF-16LE'AAA111':VARCHAR(30) CHARACTER SET "UTF-16LE", 
_UTF-16LE'BBB222':VARCHAR(30) CHARACTER SET "UTF-16LE"))])
+      HiveFilter(condition=[IN($0, _UTF-16LE'AAA111':VARCHAR(30) CHARACTER SET 
"UTF-16LE", _UTF-16LE'BBB222':VARCHAR(30) CHARACTER SET "UTF-16LE")])
         HiveTableScan(table=[[default, l_table]], table:alias=[l_table])
     HiveProject(string_col=[$0])
-      HiveFilter(condition=[AND(IS NOT NULL($0), IN($0, 
_UTF-16LE'AAA111':VARCHAR(30) CHARACTER SET "UTF-16LE", 
_UTF-16LE'BBB222':VARCHAR(30) CHARACTER SET "UTF-16LE"))])
+      HiveFilter(condition=[IN($0, _UTF-16LE'AAA111':VARCHAR(30) CHARACTER SET 
"UTF-16LE", _UTF-16LE'BBB222':VARCHAR(30) CHARACTER SET "UTF-16LE")])
         HiveTableScan(table=[[default, r_table]], table:alias=[r_table])
 
 PREHOOK: query: SELECT l_table.string_col from l_table, r_table
diff --git a/ql/src/test/results/clientpositive/llap/ppd_gby_join.q.out 
b/ql/src/test/results/clientpositive/llap/ppd_gby_join.q.out
index b475288cc4d..60f4519d893 100644
--- a/ql/src/test/results/clientpositive/llap/ppd_gby_join.q.out
+++ b/ql/src/test/results/clientpositive/llap/ppd_gby_join.q.out
@@ -39,10 +39,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400'))) and key is not 
null) (type: boolean)
+                  filterExpr: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400')))) (type: boolean)
                   Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400'))) and key is not 
null) (type: boolean)
+                    predicate: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400')))) (type: boolean)
                     Statistics: Num rows: 72 Data size: 12816 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
@@ -60,10 +60,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: ((((key > '20') and (key < '4')) or ((key > '4') 
and (key < '400'))) and key is not null) (type: boolean)
+                  filterExpr: (((key > '20') and (key < '4')) or ((key > '4') 
and (key < '400'))) (type: boolean)
                   Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((((key > '20') and (key < '4')) or ((key > 
'4') and (key < '400'))) and key is not null) (type: boolean)
+                    predicate: (((key > '20') and (key < '4')) or ((key > '4') 
and (key < '400'))) (type: boolean)
                     Statistics: Num rows: 110 Data size: 9570 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
@@ -322,10 +322,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400'))) and key is not 
null) (type: boolean)
+                  filterExpr: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400')))) (type: boolean)
                   Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400'))) and key is not 
null) (type: boolean)
+                    predicate: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400')))) (type: boolean)
                     Statistics: Num rows: 72 Data size: 12816 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
@@ -343,10 +343,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: ((((key > '20') and (key < '4')) or ((key > '4') 
and (key < '400'))) and key is not null) (type: boolean)
+                  filterExpr: (((key > '20') and (key < '4')) or ((key > '4') 
and (key < '400'))) (type: boolean)
                   Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((((key > '20') and (key < '4')) or ((key > 
'4') and (key < '400'))) and key is not null) (type: boolean)
+                    predicate: (((key > '20') and (key < '4')) or ((key > '4') 
and (key < '400'))) (type: boolean)
                     Statistics: Num rows: 110 Data size: 9570 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
diff --git a/ql/src/test/results/clientpositive/llap/ppd_join.q.out 
b/ql/src/test/results/clientpositive/llap/ppd_join.q.out
index f4554601d16..ffa27091017 100644
--- a/ql/src/test/results/clientpositive/llap/ppd_join.q.out
+++ b/ql/src/test/results/clientpositive/llap/ppd_join.q.out
@@ -36,10 +36,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400'))) and key is not 
null) (type: boolean)
+                  filterExpr: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400')))) (type: boolean)
                   Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400'))) and key is not 
null) (type: boolean)
+                    predicate: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400')))) (type: boolean)
                     Statistics: Num rows: 72 Data size: 12816 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
@@ -57,10 +57,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: ((((key > '20') and (key < '4')) or ((key > '4') 
and (key < '400'))) and key is not null) (type: boolean)
+                  filterExpr: (((key > '20') and (key < '4')) or ((key > '4') 
and (key < '400'))) (type: boolean)
                   Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((((key > '20') and (key < '4')) or ((key > 
'4') and (key < '400'))) and key is not null) (type: boolean)
+                    predicate: (((key > '20') and (key < '4')) or ((key > '4') 
and (key < '400'))) (type: boolean)
                     Statistics: Num rows: 110 Data size: 19580 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string), value (type: string)
@@ -581,10 +581,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400'))) and key is not 
null) (type: boolean)
+                  filterExpr: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400')))) (type: boolean)
                   Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400'))) and key is not 
null) (type: boolean)
+                    predicate: (((value < 'val_50') or (key > '2')) and (((key 
> '20') and (key < '4')) or ((key > '4') and (key < '400')))) (type: boolean)
                     Statistics: Num rows: 72 Data size: 12816 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
@@ -602,10 +602,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: ((((key > '20') and (key < '4')) or ((key > '4') 
and (key < '400'))) and key is not null) (type: boolean)
+                  filterExpr: (((key > '20') and (key < '4')) or ((key > '4') 
and (key < '400'))) (type: boolean)
                   Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((((key > '20') and (key < '4')) or ((key > 
'4') and (key < '400'))) and key is not null) (type: boolean)
+                    predicate: (((key > '20') and (key < '4')) or ((key > '4') 
and (key < '400'))) (type: boolean)
                     Statistics: Num rows: 110 Data size: 19580 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string), value (type: string)
diff --git a/ql/src/test/results/clientpositive/llap/ppd_join2.q.out 
b/ql/src/test/results/clientpositive/llap/ppd_join2.q.out
index 2ded66f022e..06c639984fb 100644
--- a/ql/src/test/results/clientpositive/llap/ppd_join2.q.out
+++ b/ql/src/test/results/clientpositive/llap/ppd_join2.q.out
@@ -43,10 +43,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: ((((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400'))) and key is not null) or ((key <> 
'306') and (sqrt(key) <> 13.0D) and value is not null)) (type: boolean)
+                  filterExpr: ((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400')) or ((key <> '306') and (sqrt(key) 
<> 13.0D) and value is not null)) (type: boolean)
                   Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400'))) and key is not null) (type: 
boolean)
+                    predicate: ((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400'))) (type: boolean)
                     Statistics: Num rows: 386 Data size: 68708 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string), value (type: string)
@@ -78,10 +78,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: (((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400'))) and ((value <> 'val_50') or (key 
> '1')) and key is not null and value is not null) (type: boolean)
+                  filterExpr: (((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400'))) and ((value <> 'val_50') or (key 
> '1')) and value is not null) (type: boolean)
                   Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400'))) and ((value <> 'val_50') or (key 
> '1')) and key is not null and value is not null) (type: boolean)
+                    predicate: (((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400'))) and ((value <> 'val_50') or (key 
> '1')) and value is not null) (type: boolean)
                     Statistics: Num rows: 386 Data size: 68708 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string), value (type: string)
@@ -1733,10 +1733,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: ((((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400'))) and key is not null) or ((key <> 
'306') and (sqrt(key) <> 13.0D) and value is not null)) (type: boolean)
+                  filterExpr: ((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400')) or ((key <> '306') and (sqrt(key) 
<> 13.0D) and value is not null)) (type: boolean)
                   Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400'))) and key is not null) (type: 
boolean)
+                    predicate: ((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400'))) (type: boolean)
                     Statistics: Num rows: 386 Data size: 68708 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string), value (type: string)
@@ -1768,10 +1768,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: (((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400'))) and ((value <> 'val_50') or (key 
> '1')) and key is not null and value is not null) (type: boolean)
+                  filterExpr: (((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400'))) and ((value <> 'val_50') or (key 
> '1')) and value is not null) (type: boolean)
                   Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400'))) and ((value <> 'val_50') or (key 
> '1')) and key is not null and value is not null) (type: boolean)
+                    predicate: (((key < '14') or ((key > '14') and (key < 
'302')) or ((key > '302') and (key < '305')) or ((key > '305') and (key < 
'311')) or ((key > '311') and (key < '400'))) and ((value <> 'val_50') or (key 
> '1')) and value is not null) (type: boolean)
                     Statistics: Num rows: 386 Data size: 68708 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string), value (type: string)
diff --git a/ql/src/test/results/clientpositive/llap/ppd_join3.q.out 
b/ql/src/test/results/clientpositive/llap/ppd_join3.q.out
index cc8e59a8303..520ebe471eb 100644
--- a/ql/src/test/results/clientpositive/llap/ppd_join3.q.out
+++ b/ql/src/test/results/clientpositive/llap/ppd_join3.q.out
@@ -43,10 +43,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: ((((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '11') and (key < '12')) or ((key > '12') and (key 
< '13')) or ((key > '13') and (key < '4')) or ((key > '4') and (key < '400'))) 
and key is not null) (type: boolean)
+                  filterExpr: (((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '13') and (key < '4')) or ((key > '11') and (key < 
'12')) or ((key > '12') and (key < '13')) or ((key > '4') and (key < '400'))) 
(type: boolean)
                   Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '11') and (key < '12')) or ((key > '12') and (key 
< '13')) or ((key > '13') and (key < '4')) or ((key > '4') and (key < '400'))) 
and key is not null) (type: boolean)
+                    predicate: (((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '13') and (key < '4')) or ((key > '11') and (key < 
'12')) or ((key > '12') and (key < '13')) or ((key > '4') and (key < '400'))) 
(type: boolean)
                     Statistics: Num rows: 330 Data size: 28710 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
@@ -64,10 +64,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: (((((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '11') and (key < '12')) or ((key > '12') and (key 
< '13')) or ((key > '13') and (key < '4')) or ((key > '4') and (key < '400'))) 
and ((value <> 'val_500') or (key > '1')) and key is not null) or ((((key > 
'0') and (key < '1')) or ((key > '1') and (key < '11')) or ((key > '11') and 
(key < '12')) or ((key > '12') and (key < '13')) or ((key > '13') and (key < 
'4')) or ((key > '4') and [...]
+                  filterExpr: (((((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '11') and (key < '12')) or ((key > '12') and (key 
< '13')) or ((key > '13') and (key < '4')) or ((key > '4') and (key < '400'))) 
and ((value <> 'val_500') or (key > '1'))) or ((key > '0') and (key < '1')) or 
((key > '1') and (key < '11')) or ((key > '13') and (key < '4')) or ((key > 
'11') and (key < '12')) or ((key > '12') and (key < '13')) or ((key > '4') and 
(key < '400'))) (type [...]
                   Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '11') and (key < '12')) or ((key > '12') and (key 
< '13')) or ((key > '13') and (key < '4')) or ((key > '4') and (key < '400'))) 
and ((value <> 'val_500') or (key > '1')) and key is not null) (type: boolean)
+                    predicate: ((((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '11') and (key < '12')) or ((key > '12') and (key 
< '13')) or ((key > '13') and (key < '4')) or ((key > '4') and (key < '400'))) 
and ((value <> 'val_500') or (key > '1'))) (type: boolean)
                     Statistics: Num rows: 330 Data size: 58740 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
@@ -80,7 +80,7 @@ STAGE PLANS:
                         Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 330 Data size: 28710 Basic 
stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '11') and (key < '12')) or ((key > '12') and (key 
< '13')) or ((key > '13') and (key < '4')) or ((key > '4') and (key < '400'))) 
and key is not null) (type: boolean)
+                    predicate: (((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '13') and (key < '4')) or ((key > '11') and (key < 
'12')) or ((key > '12') and (key < '13')) or ((key > '4') and (key < '400'))) 
(type: boolean)
                     Statistics: Num rows: 330 Data size: 58740 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string), value (type: string)
@@ -1788,10 +1788,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: ((((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '11') and (key < '12')) or ((key > '12') and (key 
< '13')) or ((key > '13') and (key < '4')) or ((key > '4') and (key < '400'))) 
and key is not null) (type: boolean)
+                  filterExpr: (((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '13') and (key < '4')) or ((key > '11') and (key < 
'12')) or ((key > '12') and (key < '13')) or ((key > '4') and (key < '400'))) 
(type: boolean)
                   Statistics: Num rows: 500 Data size: 43500 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '11') and (key < '12')) or ((key > '12') and (key 
< '13')) or ((key > '13') and (key < '4')) or ((key > '4') and (key < '400'))) 
and key is not null) (type: boolean)
+                    predicate: (((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '13') and (key < '4')) or ((key > '11') and (key < 
'12')) or ((key > '12') and (key < '13')) or ((key > '4') and (key < '400'))) 
(type: boolean)
                     Statistics: Num rows: 330 Data size: 28710 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
@@ -1809,10 +1809,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: src
-                  filterExpr: (((((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '11') and (key < '12')) or ((key > '12') and (key 
< '13')) or ((key > '13') and (key < '4')) or ((key > '4') and (key < '400'))) 
and ((value <> 'val_500') or (key > '1')) and key is not null) or ((((key > 
'0') and (key < '1')) or ((key > '1') and (key < '11')) or ((key > '11') and 
(key < '12')) or ((key > '12') and (key < '13')) or ((key > '13') and (key < 
'4')) or ((key > '4') and [...]
+                  filterExpr: (((((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '11') and (key < '12')) or ((key > '12') and (key 
< '13')) or ((key > '13') and (key < '4')) or ((key > '4') and (key < '400'))) 
and ((value <> 'val_500') or (key > '1'))) or ((key > '0') and (key < '1')) or 
((key > '1') and (key < '11')) or ((key > '13') and (key < '4')) or ((key > 
'11') and (key < '12')) or ((key > '12') and (key < '13')) or ((key > '4') and 
(key < '400'))) (type [...]
                   Statistics: Num rows: 500 Data size: 89000 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '11') and (key < '12')) or ((key > '12') and (key 
< '13')) or ((key > '13') and (key < '4')) or ((key > '4') and (key < '400'))) 
and ((value <> 'val_500') or (key > '1')) and key is not null) (type: boolean)
+                    predicate: ((((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '11') and (key < '12')) or ((key > '12') and (key 
< '13')) or ((key > '13') and (key < '4')) or ((key > '4') and (key < '400'))) 
and ((value <> 'val_500') or (key > '1'))) (type: boolean)
                     Statistics: Num rows: 330 Data size: 58740 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string)
@@ -1825,7 +1825,7 @@ STAGE PLANS:
                         Map-reduce partition columns: _col0 (type: string)
                         Statistics: Num rows: 330 Data size: 28710 Basic 
stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '11') and (key < '12')) or ((key > '12') and (key 
< '13')) or ((key > '13') and (key < '4')) or ((key > '4') and (key < '400'))) 
and key is not null) (type: boolean)
+                    predicate: (((key > '0') and (key < '1')) or ((key > '1') 
and (key < '11')) or ((key > '13') and (key < '4')) or ((key > '11') and (key < 
'12')) or ((key > '12') and (key < '13')) or ((key > '4') and (key < '400'))) 
(type: boolean)
                     Statistics: Num rows: 330 Data size: 58740 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: key (type: string), value (type: string)
diff --git a/ql/src/test/results/clientpositive/llap/sharedwork.q.out 
b/ql/src/test/results/clientpositive/llap/sharedwork.q.out
index ddf0adf00af..06ee3219f87 100644
--- a/ql/src/test/results/clientpositive/llap/sharedwork.q.out
+++ b/ql/src/test/results/clientpositive/llap/sharedwork.q.out
@@ -106,7 +106,7 @@ FROM `default`.`my_table_0001`
 WHERE (`col_7` IS NULL OR CAST(`col_7` AS DOUBLE) IS NOT NULL) AND `col_20` IN 
('part1', 'part2', 'part3') AND CAST(`col_3` AS DATE) BETWEEN DATE '2018-07-01' 
AND DATE '2019-01-23') AS `t0`
 LEFT JOIN (SELECT `col_24`, `col_21`
 FROM `default`.`my_table_0003`
-WHERE `col_24` IS NOT NULL AND `col_24` IN ('part1', 'part2', 'part3')) AS 
`t2` ON `t0`.`col_20` = `t2`.`col_24`
+WHERE `col_24` IN ('part1', 'part2', 'part3')) AS `t2` ON `t0`.`col_20` = 
`t2`.`col_24`
 LEFT JOIN (SELECT `col_1`, `col_22`, `col_23`
 FROM `default`.`my_table_0001_00`
 WHERE `col_1` IS NOT NULL) AS `t4` ON `t0`.`col_1` = `t4`.`col_1`
@@ -265,7 +265,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: table__879
-                  filterExpr: (col_24 is not null or (col_24 is not null and 
(col_24) IN ('part1', 'part2', 'part3'))) (type: boolean)
+                  filterExpr: (col_24 is not null or (col_24) IN ('part1', 
'part2', 'part3')) (type: boolean)
                   Statistics: Num rows: 1 Data size: 368 Basic stats: COMPLETE 
Column stats: NONE
                   GatherStats: false
                   Filter Operator
@@ -289,7 +289,7 @@ STAGE PLANS:
                         auto parallelism: true
                   Filter Operator
                     isSamplingPred: false
-                    predicate: (col_24 is not null and (col_24) IN ('part1', 
'part2', 'part3')) (type: boolean)
+                    predicate: (col_24) IN ('part1', 'part2', 'part3') (type: 
boolean)
                     Statistics: Num rows: 1 Data size: 368 Basic stats: 
COMPLETE Column stats: NONE
                     Select Operator
                       expressions: col_24 (type: string), col_21 (type: string)
diff --git 
a/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out 
b/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out
index 6706a932287..3e000a87fb7 100644
--- a/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out
@@ -35,10 +35,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: a
-                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                  filterExpr: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                    predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: ctinyint (type: tinyint), csmallint (type: 
smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), 
cdouble (type: double), cstring1 (type: string), cstring2 (type: string), 
ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: 
boolean), cboolean2 (type: boolean)
@@ -57,10 +57,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: b
-                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null) (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: ctinyint (type: tinyint), csmallint (type: 
smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), 
cdouble (type: double), cstring1 (type: string), cstring2 (type: string), 
ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: 
boolean), cboolean2 (type: boolean)
@@ -176,10 +176,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: a
-                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                  filterExpr: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                    predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: cint (type: int)
@@ -197,10 +197,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: b
-                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null) (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: cint (type: int)
@@ -314,10 +314,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: a
-                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                  filterExpr: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                    predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: csmallint (type: smallint), cint (type: int)
@@ -336,10 +336,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: b
-                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null) (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: cint (type: int)
@@ -475,7 +475,7 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: a
-                  filterExpr: (cint BETWEEN 1000000 AND 3000000 or (cint 
BETWEEN 1000000 AND 3000000 and cint is not null)) (type: boolean)
+                  filterExpr: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
                     predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean)
@@ -491,9 +491,6 @@ STAGE PLANS:
                         Map-reduce partition columns: _col2 (type: int)
                         Statistics: Num rows: ###Masked### Data size: 
###Masked### Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col0 (type: tinyint), _col1 (type: 
smallint), _col3 (type: bigint), _col4 (type: float), _col5 (type: double), 
_col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 
(type: timestamp), _col10 (type: boolean), _col11 (type: boolean), _col12 
(type: boolean)
-                  Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
-                    Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ctinyint (type: tinyint), csmallint (type: 
smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), 
cdouble (type: double), cstring1 (type: string), cstring2 (type: string), 
ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: 
boolean), cboolean2 (type: boolean)
                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8, _col9, _col10, _col11
@@ -634,10 +631,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: a
-                  filterExpr: ((cint BETWEEN 1000000 AND 3000000 and cint is 
not null) or (cint BETWEEN 1000000 AND 3000000 and cint is not null and cbigint 
is not null)) (type: boolean)
+                  filterExpr: (cint BETWEEN 1000000 AND 3000000 or (cint 
BETWEEN 1000000 AND 3000000 and cbigint is not null)) (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                    predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ctinyint (type: tinyint), csmallint (type: 
smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), 
cdouble (type: double), cstring1 (type: string), cstring2 (type: string), 
ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: 
boolean), cboolean2 (type: boolean)
@@ -651,7 +648,7 @@ STAGE PLANS:
                         Statistics: Num rows: ###Masked### Data size: 
###Masked### Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col0 (type: tinyint), _col1 (type: 
smallint), _col3 (type: bigint), _col4 (type: float), _col5 (type: double), 
_col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 
(type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ctinyint (type: tinyint), csmallint (type: 
smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), 
cdouble (type: double), cstring1 (type: string), cstring2 (type: string), 
ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: 
boolean), cboolean2 (type: boolean)
@@ -784,10 +781,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: a
-                  filterExpr: ((cint BETWEEN 1000000 AND 3000000 and cint is 
not null) or (cint BETWEEN 1000000 AND 3000000 and cint is not null and cbigint 
is not null)) (type: boolean)
+                  filterExpr: (cint BETWEEN 1000000 AND 3000000 or (cint 
BETWEEN 1000000 AND 3000000 and cbigint is not null)) (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                    predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cint (type: int)
@@ -800,7 +797,7 @@ STAGE PLANS:
                         Map-reduce partition columns: _col0 (type: int)
                         Statistics: Num rows: ###Masked### Data size: 
###Masked### Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cint (type: int)
@@ -930,10 +927,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: a
-                  filterExpr: ((cint BETWEEN 1000000 AND 3000000 and cint is 
not null) or (cint BETWEEN 1000000 AND 3000000 and cint is not null and cbigint 
is not null)) (type: boolean)
+                  filterExpr: (cint BETWEEN 1000000 AND 3000000 or (cint 
BETWEEN 1000000 AND 3000000 and cbigint is not null)) (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                    predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: csmallint (type: smallint), cint (type: int)
@@ -947,7 +944,7 @@ STAGE PLANS:
                         Statistics: Num rows: ###Masked### Data size: 
###Masked### Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col0 (type: smallint)
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cint (type: int)
diff --git 
a/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out 
b/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out
index 9ee566bab25..2dc72e01125 100644
--- 
a/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out
@@ -35,10 +35,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: a
-                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                  filterExpr: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                    predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: ctinyint (type: tinyint), csmallint (type: 
smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), 
cdouble (type: double), cstring1 (type: string), cstring2 (type: string), 
ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: 
boolean), cboolean2 (type: boolean)
@@ -57,10 +57,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: b
-                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null) (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: ctinyint (type: tinyint), csmallint (type: 
smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), 
cdouble (type: double), cstring1 (type: string), cstring2 (type: string), 
ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: 
boolean), cboolean2 (type: boolean)
@@ -176,10 +176,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: a
-                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                  filterExpr: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                    predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: cint (type: int)
@@ -197,10 +197,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: b
-                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null) (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: cint (type: int)
@@ -314,10 +314,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: a
-                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                  filterExpr: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                    predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: csmallint (type: smallint), cint (type: int)
@@ -336,10 +336,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: b
-                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                  filterExpr: (cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null) (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: cint (type: int)
@@ -477,10 +477,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: a
-                  filterExpr: ((cint BETWEEN 1000000 AND 3000000 and cint is 
not null) or (cint BETWEEN 1000000 AND 3000000 and cint is not null and cbigint 
is not null)) (type: boolean)
+                  filterExpr: (cint BETWEEN 1000000 AND 3000000 or (cint 
BETWEEN 1000000 AND 3000000 and cbigint is not null)) (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                    predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ctinyint (type: tinyint), csmallint (type: 
smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), 
cdouble (type: double), cstring1 (type: string), cstring2 (type: string), 
ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: 
boolean), cboolean2 (type: boolean)
@@ -494,7 +494,7 @@ STAGE PLANS:
                         Statistics: Num rows: ###Masked### Data size: 
###Masked### Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col0 (type: tinyint), _col1 (type: 
smallint), _col3 (type: bigint), _col4 (type: float), _col5 (type: double), 
_col6 (type: string), _col7 (type: string), _col8 (type: timestamp), _col9 
(type: timestamp), _col10 (type: boolean), _col11 (type: boolean)
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ctinyint (type: tinyint), csmallint (type: 
smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), 
cdouble (type: double), cstring1 (type: string), cstring2 (type: string), 
ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: 
boolean), cboolean2 (type: boolean)
@@ -627,10 +627,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: a
-                  filterExpr: ((cint BETWEEN 1000000 AND 3000000 and cint is 
not null) or (cint BETWEEN 1000000 AND 3000000 and cint is not null and cbigint 
is not null)) (type: boolean)
+                  filterExpr: (cint BETWEEN 1000000 AND 3000000 or (cint 
BETWEEN 1000000 AND 3000000 and cbigint is not null)) (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                    predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cint (type: int)
@@ -643,7 +643,7 @@ STAGE PLANS:
                         Map-reduce partition columns: _col0 (type: int)
                         Statistics: Num rows: ###Masked### Data size: 
###Masked### Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cint (type: int)
@@ -773,10 +773,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: a
-                  filterExpr: ((cint BETWEEN 1000000 AND 3000000 and cint is 
not null) or (cint BETWEEN 1000000 AND 3000000 and cint is not null and cbigint 
is not null)) (type: boolean)
+                  filterExpr: (cint BETWEEN 1000000 AND 3000000 or (cint 
BETWEEN 1000000 AND 3000000 and cbigint is not null)) (type: boolean)
                   Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null) (type: boolean)
+                    predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: csmallint (type: smallint), cint (type: int)
@@ -790,7 +790,7 @@ STAGE PLANS:
                         Statistics: Num rows: ###Masked### Data size: 
###Masked### Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col0 (type: smallint)
                   Filter Operator
-                    predicate: (cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null) (type: boolean)
+                    predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint 
is not null) (type: boolean)
                     Statistics: Num rows: ###Masked### Data size: ###Masked### 
Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cint (type: int)
diff --git 
a/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/cbo_query34.q.out 
b/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/cbo_query34.q.out
index 2df9bc77363..3df017c39cc 100644
--- a/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/cbo_query34.q.out
+++ b/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/cbo_query34.q.out
@@ -15,7 +15,7 @@ HiveSortLimit(sort0=[$0], sort1=[$1], sort2=[$2], sort3=[$3], 
dir0=[ASC], dir1=[
                       HiveFilter(condition=[AND(IS NOT NULL($4), IS NOT 
NULL($2), IS NOT NULL($6), IS NOT NULL($22))])
                         HiveTableScan(table=[[default, store_sales]], 
table:alias=[store_sales])
                     HiveProject(d_date_sk=[$0])
-                      HiveFilter(condition=[AND(IN($6, 2000, 2001, 2002), 
OR(BETWEEN(false, $9, 1, 3), BETWEEN(false, $9, 25, 28)), IS NOT NULL($9))])
+                      HiveFilter(condition=[AND(IN($6, 2000, 2001, 2002), 
OR(BETWEEN(false, $9, 1, 3), BETWEEN(false, $9, 25, 28)))])
                         HiveTableScan(table=[[default, date_dim]], 
table:alias=[date_dim])
                   HiveProject(hd_demo_sk=[$0])
                     HiveFilter(condition=[AND(>($4, 0), IN($2, 
_UTF-16LE'>10000', _UTF-16LE'unknown'), CASE(>($4, 0), >(/(CAST($3):DOUBLE, 
CAST($4):DOUBLE), 1.2), false))])
diff --git 
a/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/cbo_query48.q.out 
b/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/cbo_query48.q.out
index b6fea4d6ba8..fd3b640af6c 100644
--- a/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/cbo_query48.q.out
+++ b/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/cbo_query48.q.out
@@ -10,7 +10,7 @@ HiveAggregate(group=[{}], agg#0=[sum($7)])
           HiveTableScan(table=[[default, customer_demographics]], 
table:alias=[customer_demographics])
       HiveJoin(condition=[=($3, $7)], joinType=[inner], algorithm=[none], 
cost=[not available])
         HiveProject(ss_cdemo_sk=[$3], ss_addr_sk=[$5], ss_quantity=[$9], 
ss_sold_date_sk=[$22], EXPR$0=[BETWEEN(false, $21, 0:DECIMAL(12, 2), 
2000:DECIMAL(12, 2))], EXPR$1=[BETWEEN(false, $21, 150:DECIMAL(12, 2), 
3000:DECIMAL(12, 2))], EXPR$2=[BETWEEN(false, $21, 50:DECIMAL(12, 2), 
25000:DECIMAL(12, 2))])
-          HiveFilter(condition=[AND(BETWEEN(false, $12, 50:DECIMAL(3, 0), 
200:DECIMAL(3, 0)), IS NOT NULL($21), IS NOT NULL($12), IS NOT NULL($3), IS NOT 
NULL($5), IS NOT NULL($6), IS NOT NULL($22))])
+          HiveFilter(condition=[AND(BETWEEN(false, $12, 50:DECIMAL(3, 0), 
200:DECIMAL(3, 0)), IS NOT NULL($21), IS NOT NULL($3), IS NOT NULL($5), IS NOT 
NULL($6), IS NOT NULL($22))])
             HiveTableScan(table=[[default, store_sales]], 
table:alias=[store_sales])
         HiveProject(d_date_sk=[$0])
           HiveFilter(condition=[=($6, 1998)])
diff --git 
a/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/cbo_query85.q.out 
b/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/cbo_query85.q.out
index 1489c2a76c0..48f98780d4e 100644
--- a/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/cbo_query85.q.out
+++ b/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/cbo_query85.q.out
@@ -23,10 +23,10 @@ HiveProject(_o__c0=[$0], _o__c1=[$1], _o__c2=[$2], 
_o__c3=[$3])
                       HiveFilter(condition=[AND(IN($8, _UTF-16LE'GA', 
_UTF-16LE'IN', _UTF-16LE'KY', _UTF-16LE'MO', _UTF-16LE'MT', _UTF-16LE'NM', 
_UTF-16LE'OR', _UTF-16LE'WI', _UTF-16LE'WV'), =($10, _UTF-16LE'United 
States'))])
                         HiveTableScan(table=[[default, customer_address]], 
table:alias=[customer_address])
                   HiveProject(cd_demo_sk=[$0], cd_marital_status=[$2], 
cd_education_status=[$3], EXPR$0=[=($2, _UTF-16LE'M')], EXPR$1=[=($3, 
_UTF-16LE'4 yr Degree')], EXPR$2=[=($2, _UTF-16LE'D')], EXPR$3=[=($3, 
_UTF-16LE'Primary')], EXPR$4=[=($2, _UTF-16LE'U')], EXPR$5=[=($3, 
_UTF-16LE'Advanced Degree')])
-                    HiveFilter(condition=[AND(IN($2, _UTF-16LE'D', 
_UTF-16LE'M', _UTF-16LE'U'), IN($3, _UTF-16LE'4 yr Degree', _UTF-16LE'Advanced 
Degree', _UTF-16LE'Primary'), IS NOT NULL($2), IS NOT NULL($3))])
+                    HiveFilter(condition=[AND(IN($2, _UTF-16LE'D', 
_UTF-16LE'M', _UTF-16LE'U'), IN($3, _UTF-16LE'4 yr Degree', _UTF-16LE'Advanced 
Degree', _UTF-16LE'Primary'))])
                       HiveTableScan(table=[[default, customer_demographics]], 
table:alias=[cd1])
                 HiveProject(cd_demo_sk=[$0], cd_marital_status=[$2], 
cd_education_status=[$3])
-                  HiveFilter(condition=[AND(IN($2, _UTF-16LE'D', _UTF-16LE'M', 
_UTF-16LE'U'), IN($3, _UTF-16LE'4 yr Degree', _UTF-16LE'Advanced Degree', 
_UTF-16LE'Primary'), IS NOT NULL($2), IS NOT NULL($3))])
+                  HiveFilter(condition=[AND(IN($2, _UTF-16LE'D', _UTF-16LE'M', 
_UTF-16LE'U'), IN($3, _UTF-16LE'4 yr Degree', _UTF-16LE'Advanced Degree', 
_UTF-16LE'Primary'))])
                     HiveTableScan(table=[[default, customer_demographics]], 
table:alias=[cd2])
           HiveProject(r_reason_sk=[$0], r_reason_desc=[$2])
             HiveTableScan(table=[[default, reason]], table:alias=[reason])
diff --git 
a/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/query34.q.out 
b/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/query34.q.out
index 9957c828ed0..3bd4b54e662 100644
--- a/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/query34.q.out
+++ b/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/query34.q.out
@@ -109,10 +109,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: date_dim
-                  filterExpr: ((d_year) IN (2000, 2001, 2002) and (d_dom 
BETWEEN 1 AND 3 or d_dom BETWEEN 25 AND 28) and d_dom is not null) (type: 
boolean)
+                  filterExpr: ((d_year) IN (2000, 2001, 2002) and (d_dom 
BETWEEN 1 AND 3 or d_dom BETWEEN 25 AND 28)) (type: boolean)
                   Statistics: Num rows: 73049 Data size: 1168784 Basic stats: 
COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((d_year) IN (2000, 2001, 2002) and (d_dom 
BETWEEN 1 AND 3 or d_dom BETWEEN 25 AND 28) and d_dom is not null) (type: 
boolean)
+                    predicate: ((d_year) IN (2000, 2001, 2002) and (d_dom 
BETWEEN 1 AND 3 or d_dom BETWEEN 25 AND 28)) (type: boolean)
                     Statistics: Num rows: 249 Data size: 3984 Basic stats: 
COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: d_date_sk (type: bigint)
diff --git 
a/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/query48.q.out 
b/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/query48.q.out
index 7d4f42012d2..59b49bfa8fc 100644
--- a/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/query48.q.out
+++ b/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/query48.q.out
@@ -15,16 +15,16 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: store_sales
-                  filterExpr: (ss_sales_price BETWEEN 50 AND 200 and 
ss_net_profit is not null and ss_sales_price is not null and ss_cdemo_sk is not 
null and ss_addr_sk is not null and ss_store_sk is not null) (type: boolean)
-                  probeDecodeDetails: cacheKey:HASH_MAP_MAPJOIN_66_container, 
bigKeyColName:ss_addr_sk, smallTablePos:1, keyRatio:3.245472235879363E-4
+                  filterExpr: (ss_sales_price BETWEEN 50 AND 200 and 
ss_net_profit is not null and ss_cdemo_sk is not null and ss_addr_sk is not 
null and ss_store_sk is not null) (type: boolean)
+                  probeDecodeDetails: cacheKey:HASH_MAP_MAPJOIN_66_container, 
bigKeyColName:ss_addr_sk, smallTablePos:1, keyRatio:3.323733066508898E-4
                   Statistics: Num rows: 82510879939 Data size: 20962809999708 
Basic stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: (ss_sales_price BETWEEN 50 AND 200 and 
ss_net_profit is not null and ss_sales_price is not null and ss_cdemo_sk is not 
null and ss_addr_sk is not null and ss_store_sk is not null) (type: boolean)
-                    Statistics: Num rows: 54923868216 Data size: 
13954021757116 Basic stats: COMPLETE Column stats: COMPLETE
+                    predicate: (ss_sales_price BETWEEN 50 AND 200 and 
ss_net_profit is not null and ss_cdemo_sk is not null and ss_addr_sk is not 
null and ss_store_sk is not null) (type: boolean)
+                    Statistics: Num rows: 56248293349 Data size: 
14290506744864 Basic stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: ss_cdemo_sk (type: bigint), ss_addr_sk 
(type: bigint), ss_quantity (type: int), ss_sold_date_sk (type: bigint), 
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)
                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6
-                      Statistics: Num rows: 54923868216 Data size: 
2171039403444 Basic stats: COMPLETE Column stats: COMPLETE
+                      Statistics: Num rows: 56248293349 Data size: 
2223391490876 Basic stats: COMPLETE Column stats: COMPLETE
                       Map Join Operator
                         condition map:
                              Inner Join 0 to 1
@@ -34,7 +34,7 @@ STAGE PLANS:
                         outputColumnNames: _col0, _col1, _col2, _col4, _col5, 
_col6
                         input vertices:
                           1 Map 3
-                        Statistics: Num rows: 11038763346 Data size: 
327325101876 Basic stats: COMPLETE Column stats: COMPLETE
+                        Statistics: Num rows: 11304950271 Data size: 
335218165588 Basic stats: COMPLETE Column stats: COMPLETE
                         Map Join Operator
                           condition map:
                                Inner Join 0 to 1
@@ -44,7 +44,7 @@ STAGE PLANS:
                           outputColumnNames: _col1, _col2, _col4, _col5, _col6
                           input vertices:
                             1 Map 4
-                          Statistics: Num rows: 315393241 Data size: 
3784718904 Basic stats: COMPLETE Column stats: COMPLETE
+                          Statistics: Num rows: 322998581 Data size: 
3875982984 Basic stats: COMPLETE Column stats: COMPLETE
                           Map Join Operator
                             condition map:
                                  Inner Join 0 to 1
@@ -54,14 +54,14 @@ STAGE PLANS:
                             outputColumnNames: _col2, _col4, _col5, _col6, 
_col10, _col11, _col12
                             input vertices:
                               1 Map 5
-                            Statistics: Num rows: 26778677 Data size: 
642688252 Basic stats: COMPLETE Column stats: COMPLETE
+                            Statistics: Num rows: 27424414 Data size: 
658185940 Basic stats: COMPLETE Column stats: COMPLETE
                             Filter Operator
                               predicate: ((_col10 and _col4) or (_col11 and 
_col5) or (_col12 and _col6)) (type: boolean)
-                              Statistics: Num rows: 20084007 Data size: 
482016172 Basic stats: COMPLETE Column stats: COMPLETE
+                              Statistics: Num rows: 20568309 Data size: 
493639420 Basic stats: COMPLETE Column stats: COMPLETE
                               Select Operator
                                 expressions: _col2 (type: int)
                                 outputColumnNames: _col2
-                                Statistics: Num rows: 20084007 Data size: 
482016172 Basic stats: COMPLETE Column stats: COMPLETE
+                                Statistics: Num rows: 20568309 Data size: 
493639420 Basic stats: COMPLETE Column stats: COMPLETE
                                 Group By Operator
                                   aggregations: sum(_col2)
                                   minReductionHashAggr: 0.99
diff --git 
a/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/query85.q.out 
b/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/query85.q.out
index afc194025dc..f50a9a598ee 100644
--- a/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/query85.q.out
+++ b/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/query85.q.out
@@ -197,10 +197,10 @@ STAGE PLANS:
             Map Operator Tree:
                 TableScan
                   alias: cd1
-                  filterExpr: ((cd_marital_status) IN ('D', 'M', 'U') and 
(cd_education_status) IN ('4 yr Degree         ', 'Advanced Degree     ', 
'Primary             ') and cd_marital_status is not null and 
cd_education_status is not null) (type: boolean)
+                  filterExpr: ((cd_marital_status) IN ('D', 'M', 'U') and 
(cd_education_status) IN ('4 yr Degree         ', 'Advanced Degree     ', 
'Primary             ')) (type: boolean)
                   Statistics: Num rows: 1920800 Data size: 359189600 Basic 
stats: COMPLETE Column stats: COMPLETE
                   Filter Operator
-                    predicate: ((cd_marital_status) IN ('D', 'M', 'U') and 
(cd_education_status) IN ('4 yr Degree         ', 'Advanced Degree     ', 
'Primary             ') and cd_marital_status is not null and 
cd_education_status is not null) (type: boolean)
+                    predicate: ((cd_marital_status) IN ('D', 'M', 'U') and 
(cd_education_status) IN ('4 yr Degree         ', 'Advanced Degree     ', 
'Primary             ')) (type: boolean)
                     Statistics: Num rows: 493920 Data size: 92363040 Basic 
stats: COMPLETE Column stats: COMPLETE
                     Select Operator
                       expressions: cd_demo_sk (type: bigint), 
cd_marital_status (type: char(1)), cd_education_status (type: char(20)), 
(cd_marital_status = 'M') (type: boolean), (cd_education_status = '4 yr Degree  
       ') (type: boolean), (cd_marital_status = 'D') (type: boolean), 
(cd_education_status = 'Primary             ') (type: boolean), 
(cd_marital_status = 'U') (type: boolean), (cd_education_status = 'Advanced 
Degree     ') (type: boolean)
diff --git a/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out 
b/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out
index b94f2cd8741..84abd398f4f 100644
--- a/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out
+++ b/ql/src/test/results/clientpositive/tez/explainanalyze_4.q.out
@@ -48,28 +48,28 @@ Stage-0
     Stage-1
       Reducer 3
       File Output Operator [FS_12]
-        Select Operator [SEL_11] (rows=3453/10 width=528)
+        Select Operator [SEL_11] (rows=4626/10 width=528)
           
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"]
         <-Reducer 2 [SIMPLE_EDGE]
           SHUFFLE [RS_10]
-            Merge Join Operator [MERGEJOIN_27] (rows=3453/10 width=528)
+            Merge Join Operator [MERGEJOIN_27] (rows=4626/10 width=528)
               
Conds:RS_6._col2=RS_7._col2(Inner),Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11","_col12","_col13","_col14","_col15","_col16","_col17","_col18","_col19","_col20","_col21","_col22","_col23"]
             <-Map 1 [SIMPLE_EDGE]
               SHUFFLE [RS_6]
                 PartitionCols:_col2
-                Select Operator [SEL_2] (rows=2298/10 width=231)
+                Select Operator [SEL_2] (rows=3078/10 width=231)
                   
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
-                  Filter Operator [FIL_15] (rows=2298/10 width=231)
-                    predicate:(cint BETWEEN 1000000 AND 3000000 and cint is 
not null)
+                  Filter Operator [FIL_15] (rows=3078/10 width=231)
+                    predicate:cint BETWEEN 1000000 AND 3000000
                     TableScan [TS_0] (rows=12288/12288 width=231)
                       
default@alltypesorc,a,Tbl:COMPLETE,Col:COMPLETE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
             <-Map 4 [SIMPLE_EDGE]
               SHUFFLE [RS_7]
                 PartitionCols:_col2
-                Select Operator [SEL_5] (rows=1716/10 width=231)
+                Select Operator [SEL_5] (rows=2298/10 width=231)
                   
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
-                  Filter Operator [FIL_16] (rows=1716/10 width=231)
-                    predicate:(cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null)
+                  Filter Operator [FIL_16] (rows=2298/10 width=231)
+                    predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null)
                     TableScan [TS_3] (rows=12288/12288 width=231)
                       
default@alltypesorc,b,Tbl:COMPLETE,Col:COMPLETE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
 
@@ -151,24 +151,24 @@ Stage-0
           Output:["_col0"],aggregations:["count()"]
         <-Reducer 2 [CUSTOM_SIMPLE_EDGE]
           PARTITION_ONLY_SHUFFLE [RS_10]
-            Merge Join Operator [MERGEJOIN_28] (rows=3453/10 width=8)
+            Merge Join Operator [MERGEJOIN_28] (rows=4626/10 width=8)
               Conds:RS_6._col0=RS_7._col0(Inner)
             <-Map 1 [SIMPLE_EDGE]
               SHUFFLE [RS_6]
                 PartitionCols:_col0
-                Select Operator [SEL_2] (rows=2298/10 width=2)
+                Select Operator [SEL_2] (rows=3078/10 width=2)
                   Output:["_col0"]
-                  Filter Operator [FIL_16] (rows=2298/10 width=2)
-                    predicate:(cint BETWEEN 1000000 AND 3000000 and cint is 
not null)
+                  Filter Operator [FIL_16] (rows=3078/10 width=2)
+                    predicate:cint BETWEEN 1000000 AND 3000000
                     TableScan [TS_0] (rows=12288/12288 width=2)
                       
default@alltypesorc,a,Tbl:COMPLETE,Col:COMPLETE,Output:["cint"]
             <-Map 4 [SIMPLE_EDGE]
               SHUFFLE [RS_7]
                 PartitionCols:_col0
-                Select Operator [SEL_5] (rows=1716/10 width=2)
+                Select Operator [SEL_5] (rows=2298/10 width=2)
                   Output:["_col0"]
-                  Filter Operator [FIL_17] (rows=1716/10 width=8)
-                    predicate:(cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null)
+                  Filter Operator [FIL_17] (rows=2298/10 width=8)
+                    predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null)
                     TableScan [TS_3] (rows=12288/12288 width=8)
                       
default@alltypesorc,b,Tbl:COMPLETE,Col:COMPLETE,Output:["cint","cbigint"]
 
@@ -244,33 +244,33 @@ Stage-0
     Stage-1
       Reducer 4
       File Output Operator [FS_15]
-        Select Operator [SEL_14] (rows=2299/5 width=11)
+        Select Operator [SEL_14] (rows=3079/5 width=11)
           Output:["_col0","_col1"]
         <-Reducer 3 [SIMPLE_EDGE]
           SHUFFLE [RS_13]
-            Group By Operator [GBY_11] (rows=2299/5 width=11)
+            Group By Operator [GBY_11] (rows=3079/5 width=11)
               Output:["_col0","_col1"],aggregations:["count()"],keys:KEY._col0
             <-Reducer 2 [SIMPLE_EDGE]
               SHUFFLE [RS_10]
                 PartitionCols:_col0
-                Merge Join Operator [MERGEJOIN_30] (rows=3453/10 width=3)
+                Merge Join Operator [MERGEJOIN_30] (rows=4626/10 width=3)
                   Conds:RS_6._col1=RS_7._col0(Inner),Output:["_col0"]
                 <-Map 1 [SIMPLE_EDGE]
                   SHUFFLE [RS_6]
                     PartitionCols:_col1
-                    Select Operator [SEL_2] (rows=2298/10 width=5)
+                    Select Operator [SEL_2] (rows=3078/10 width=5)
                       Output:["_col0","_col1"]
-                      Filter Operator [FIL_18] (rows=2298/10 width=5)
-                        predicate:(cint BETWEEN 1000000 AND 3000000 and cint 
is not null)
+                      Filter Operator [FIL_18] (rows=3078/10 width=5)
+                        predicate:cint BETWEEN 1000000 AND 3000000
                         TableScan [TS_0] (rows=12288/12288 width=5)
                           
default@alltypesorc,a,Tbl:COMPLETE,Col:COMPLETE,Output:["csmallint","cint"]
                 <-Map 5 [SIMPLE_EDGE]
                   SHUFFLE [RS_7]
                     PartitionCols:_col0
-                    Select Operator [SEL_5] (rows=1716/10 width=2)
+                    Select Operator [SEL_5] (rows=2298/10 width=2)
                       Output:["_col0"]
-                      Filter Operator [FIL_19] (rows=1716/10 width=8)
-                        predicate:(cint BETWEEN 1000000 AND 3000000 and cint 
is not null and cbigint is not null)
+                      Filter Operator [FIL_19] (rows=2298/10 width=8)
+                        predicate:(cint BETWEEN 1000000 AND 3000000 and 
cbigint is not null)
                         TableScan [TS_3] (rows=12288/12288 width=8)
                           
default@alltypesorc,b,Tbl:COMPLETE,Col:COMPLETE,Output:["cint","cbigint"]
 
@@ -362,7 +362,7 @@ Stage-0
                 Select Operator [SEL_5] (rows=1365/10 width=240)
                   
Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"]
                   Filter Operator [FIL_16] (rows=1365/10 width=240)
-                    predicate:(cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null)
+                    predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null)
                     TableScan [TS_0] (rows=12288/12288 width=240)
                       
default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"]
             <-Reducer 2 [CUSTOM_SIMPLE_EDGE]
@@ -458,7 +458,7 @@ Stage-0
                 Select Operator [SEL_5] (rows=1365/10 width=240)
                   Output:["_col0"]
                   Filter Operator [FIL_17] (rows=1365/10 width=240)
-                    predicate:(cint BETWEEN 1000000 AND 3000000 and cint is 
not null and cbigint is not null)
+                    predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is 
not null)
                     TableScan [TS_0] (rows=12288/12288 width=240)
                       
default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["cint","cbigint"]
             <-Reducer 2 [CUSTOM_SIMPLE_EDGE]
@@ -557,7 +557,7 @@ Stage-0
                     Select Operator [SEL_5] (rows=1365/10 width=240)
                       Output:["_col0"]
                       Filter Operator [FIL_19] (rows=1365/10 width=240)
-                        predicate:(cint BETWEEN 1000000 AND 3000000 and cint 
is not null and cbigint is not null)
+                        predicate:(cint BETWEEN 1000000 AND 3000000 and 
cbigint is not null)
                         TableScan [TS_0] (rows=12288/12288 width=240)
                           
default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["csmallint","cint","cbigint"]
                 <-Reducer 2 [CUSTOM_SIMPLE_EDGE]

Reply via email to