soumyakanti3578 commented on code in PR #5291:
URL: https://github.com/apache/hive/pull/5291#discussion_r1645045838


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java:
##########
@@ -3199,18 +3199,13 @@ private RelNode genFilterRelNode(ASTNode filterNode, 
RelNode srcRel,
     }
 
     private RelNode genFilterRelNode(RexNode filterExpression, RelNode srcRel,
-        ImmutableMap<String, Integer> outerNameToPosMap, RowResolver outerRR) 
throws SemanticException {
+        ImmutableMap<String, Integer> outerNameToPosMap, RowResolver outerRR) {
       if (RexUtil.isLiteral(filterExpression, false)
           && filterExpression.getType().getSqlTypeName() != 
SqlTypeName.BOOLEAN) {

Review Comment:
   `WHERE 'foo' and 'bar'` is already supported through CBO because it goes 
through `TypeCheckProcFactory.DefaultExprProcessor#process()` as it tries to 
generate for the `and` tree. Because `and`'s children should be of type 
`boolean`, they get cast appropriately.
   
   Whereas, when we only have `WHERE 'foo'`, it goes through 
`TypeCheckProcFactory.StrExprProcessor#process()`, which just returns the 
string back, without adding a cast.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to