rubenada commented on code in PR #6895:
URL: https://github.com/apache/hive/pull/6895#discussion_r4314401273


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ExprNodeConverter.java:
##########
@@ -218,10 +218,14 @@ public ExprNodeDesc visitCall(RexCall call) {
       return args.get(0);
     } else if (call.isA(SqlKind.AND)) {
       // Make sure AND is flattened (we may have nested ANDs due to 
SearchTransformer conversion above)
-      return ExprNodeDescUtils.and(args);
+      // Flattening/deduplication may collapse the operand list;
+      // AND require at least two operands (GenericUDFOPAnd#initialize 
enforces this), so unwrapping trivial cases.

Review Comment:
   nit: I think "unwrap" instead of "unwrapping" would read better. Also we 
should probably add a '.' at the end of the previous (existing) comment.
   Same thing for the new comment on the OR case.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to