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


##########
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:
   If it's not too much of an effort, it could be good idea to not use 
deprecated APIs like `operandJ`. Although, this is not the only place where it 
is used, so this is not a strict requirement. I will leave it up to you.



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