You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/07/05 04:16:25 UTC

[GitHub] [flink] danny0405 commented on a change in pull request #8962: [FLINK-13076] [table-planner-blink] Bump Calcite dependency to 1.20.0 in blink planner

danny0405 commented on a change in pull request #8962: [FLINK-13076] [table-planner-blink] Bump Calcite dependency to 1.20.0 in blink planner
URL: https://github.com/apache/flink/pull/8962#discussion_r300535389
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/rules/logical/LogicalCorrelateToJoinFromTemporalTableRule.scala
 ##########
 @@ -31,26 +32,65 @@ import org.apache.calcite.rel.logical.{LogicalCorrelate, LogicalFilter, LogicalS
   */
 class LogicalCorrelateToJoinFromTemporalTableRule
   extends RelOptRule(
-    operand(classOf[LogicalFilter],
-      operand(classOf[LogicalCorrelate], some(
-        operand(classOf[RelNode], any()),
-        operand(classOf[LogicalSnapshot], any())))),
+    operand(classOf[LogicalCorrelate],
+      operand(classOf[RelNode], any()),
+      operand(classOf[RelNode],
+        operand(classOf[RelNode], any()))),
     "LogicalCorrelateToJoinFromTemporalTableRule") {
 
+  override def matches(call: RelOptRuleCall): Boolean = {
+    val rel: RelNode = call.rel(2)
+    rel match {
+      case _: LogicalFilter =>
+        val input: RelNode = call.rel(3)
+        input.isInstanceOf[LogicalSnapshot]
 
 Review comment:
   Can we just split this rule into 2 sub-rules, one is with top filter and one it not.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services