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

 ##########
 File path: 
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/nodes/dataset/DataSetScan.scala
 ##########
 @@ -36,15 +39,20 @@ import org.apache.flink.types.Row
 class DataSetScan(
     cluster: RelOptCluster,
     traitSet: RelTraitSet,
-    table: RelOptTable,
+    catalog: RelOptSchema,
+    inputDataSet: DataSet[_],
+    fieldIdxs: Array[Int],
     rowRelDataType: RelDataType)
-  extends TableScan(cluster, traitSet, table)
+  extends TableScan(
+    cluster,
+    traitSet,
+    RelOptTableImpl.create(catalog, rowRelDataType, List[String]().asJava, 
null))
   with BatchScan {
 
-  val dataSetTable: DataSetTable[Any] = 
getTable.unwrap(classOf[DataSetTable[Any]])
-
   override def deriveRowType(): RelDataType = rowRelDataType
 
+  override def estimateRowCount(mq: RelMetadataQuery): Double = 1000L
 
 Review comment:
   We had it hardcoded in the ctor of `DataSetTable`. (In theory you could 
provide it in the ctor of the  `DataSetTable`, but in fact it was always set to 
1000).

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to