jcamachor commented on a change in pull request #1492:
URL: https://github.com/apache/hive/pull/1492#discussion_r487546716
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HivePointLookupOptimizerRule.java
##########
@@ -734,6 +721,30 @@ private RexNode useStructIfNeeded(List<? extends RexNode>
columns) {
}
operands.remove(i);
--i;
+ } else if (operand.getKind() == SqlKind.EQUALS) {
+ Constraint c = Constraint.of(operand);
+ if (c == null || !HiveCalciteUtil.isDeterministic(c.exprNode)) {
+ continue;
+ }
+ String ref = c.exprNode.toString();
+ stringToExpr.put(ref, c.exprNode);
+ if (inLHSExprToRHSExprs.containsKey(ref)) {
+ String expr = c.constNode.toString();
+ stringToExpr.put(expr, c.constNode);
Review comment:
Makes sense, I will simplify this code.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]