wuchong commented on a change in pull request #8736: [FLINK-12846][table] Carry 
primary key and unique key information in TableSchema
URL: https://github.com/apache/flink/pull/8736#discussion_r294126242
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/schema/TableSourceTable.scala
 ##########
 @@ -19,20 +19,24 @@
 package org.apache.flink.table.plan.schema
 
 import org.apache.calcite.rel.`type`.{RelDataType, RelDataTypeFactory}
+import org.apache.flink.table.{JHashSet, JSet}
 import org.apache.flink.table.calcite.FlinkTypeFactory
 import org.apache.flink.table.plan.stats.FlinkStatistic
 import org.apache.flink.table.sources.{TableSource, TableSourceUtil}
 
+import java.util
+
 /**
   * Abstract class which define the interfaces required to convert a 
[[TableSource]] to
   * a Calcite Table
   */
 class TableSourceTable[T](
     val tableSource: TableSource[T],
-    val isStreaming: Boolean,
-    val statistic: FlinkStatistic)
 
 Review comment:
   1. the statistic from catalog should be restored via 
`TableSource#getTableStats()`.
   2. I think if the TableSource is not changed, then we don't need to 
re-construct a new `TableSourceTable`. I can reuse the original 
`TableSourceTable` and avoid calling `TableSource#getTableStats` again.

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