twalthr commented on a change in pull request #8521: [FLINK-12601][table] Make 
the DataStream & DataSet conversion to a Table independent from Calcite
URL: https://github.com/apache/flink/pull/8521#discussion_r289290535
 
 

 ##########
 File path: 
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/rules/dataSet/DataSetScanRule.scala
 ##########
 @@ -18,48 +18,41 @@
 
 package org.apache.flink.table.plan.rules.dataSet
 
-import org.apache.calcite.plan.{RelOptRule, RelOptRuleCall, RelTraitSet}
+import org.apache.calcite.plan.RelTraitSet
 import org.apache.calcite.rel.RelNode
 import org.apache.calcite.rel.convert.ConverterRule
 import org.apache.flink.table.plan.nodes.FlinkConventions
 import org.apache.flink.table.plan.nodes.dataset.DataSetScan
-import org.apache.flink.table.plan.schema.DataSetTable
-import org.apache.flink.table.plan.nodes.logical.FlinkLogicalNativeTableScan
+import org.apache.flink.table.plan.nodes.logical.FlinkLogicalDataSetScan
 
 class DataSetScanRule
   extends ConverterRule(
-    classOf[FlinkLogicalNativeTableScan],
+    classOf[FlinkLogicalDataSetScan],
     FlinkConventions.LOGICAL,
     FlinkConventions.DATASET,
-    "DataSetScanRule") {
-
-  /**
-   * If the input is not a DataSetTable, we want the TableScanRule to match 
instead
-   */
-  override def matches(call: RelOptRuleCall): Boolean = {
-    val scan: FlinkLogicalNativeTableScan = 
call.rel(0).asInstanceOf[FlinkLogicalNativeTableScan]
-    val dataSetTable = scan.getTable.unwrap(classOf[DataSetTable[Any]])
-    dataSetTable match {
-      case _: DataSetTable[Any] =>
-        true
-      case _ =>
-        false
-    }
-  }
+    "DataSetScanRule")
+{
 
 Review comment:
   nit: move parenthesis up

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


With regards,
Apache Git Services

Reply via email to