zabetak commented on a change in pull request #2504:
URL: https://github.com/apache/hive/pull/2504#discussion_r679118159
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/jdbc/JDBCAbstractSplitFilterRule.java
##########
@@ -172,13 +172,14 @@ public boolean matches(RelOptRuleCall call) {
final HiveJdbcConverter conv = call.rel(2);
RexNode joinCond = join.getCondition();
+ SqlDialect dialect = conv.getJdbcDialect();
- return super.matches(call) &&
JDBCRexCallValidator.isValidJdbcOperation(joinCond, conv.getJdbcDialect());
+ return super.matches(call, dialect) &&
JDBCRexCallValidator.isValidJdbcOperation(joinCond, dialect);
Review comment:
I think the original author meant to call `super.matches(call, dialect)`
and mistakenly called `super.matches(call)`. The signature of `matches(call,
dialect)` is source of confusion so to avoid similar problems in the future I
would suggest removing entirely this method and call directly `canSplitFilter`.
Moreover, it seems that `canSplitFilter` already calls
`JDBCRexCallValidator.isValidJdbcOperation` internally so possibly we can
remove this additional call from here.
--
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]