zabetak commented on code in PR #6241:
URL: https://github.com/apache/hive/pull/6241#discussion_r2654993298


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterProjectTransposeRule.java:
##########
@@ -59,14 +62,22 @@
 import org.apache.hadoop.hive.ql.optimizer.calcite.HiveCalciteUtil;
 import org.apache.hadoop.hive.ql.optimizer.calcite.HiveRelFactories;
 import org.apache.hadoop.hive.ql.optimizer.calcite.HiveRelOptUtil;
-import 
org.apache.hadoop.hive.ql.optimizer.calcite.HiveRelOptUtil.RewritablePKFKJoinInfo;
 import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveProject;
+import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveTableScan;
 
 public class HiveFilterProjectTransposeRule extends FilterProjectTransposeRule 
{
 
+  private static RelOptRuleOperand joinOperand() {
+    Predicate<Join> isRewritable = join -> {
+      RelMetadataQuery mq = join.getCluster().getMetadataQuery();
+      return HiveRelOptUtil.isRewritablePKFKJoin(join, join.getLeft(), 
join.getRight(), mq).rewritable;
+    };
+    return operandJ(Join.class, null, isRewritable, any());

Review Comment:
   I tried getting rid of the deprecations but it requires a significant 
refactoring of the rule so for keeping the scope of the JIRA more focused I 
decided not to do it as part of this PR.



-- 
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