danny0405 commented on a change in pull request #10224:
[FLINK-14716][table-planner-blink] Cooperate computed column with push down
rules
URL: https://github.com/apache/flink/pull/10224#discussion_r347266960
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/schema/TableSourceTable.scala
##########
@@ -19,45 +19,56 @@
package org.apache.flink.table.planner.plan.schema
import org.apache.flink.table.catalog.CatalogTable
-import org.apache.flink.table.planner.calcite.FlinkTypeFactory
import org.apache.flink.table.planner.plan.stats.FlinkStatistic
-import org.apache.flink.table.planner.sources.TableSourceUtil
import org.apache.flink.table.sources.{TableSource, TableSourceValidation}
-import org.apache.calcite.rel.`type`.{RelDataType, RelDataTypeFactory}
+
+import org.apache.calcite.rel.`type`.RelDataType
import org.apache.flink.shaded.guava18.com.google.common.base.Preconditions
import org.apache.flink.table.api.{TableException, WatermarkSpec}
-import org.apache.flink.table.types.logical.{TimestampKind, TimestampType}
+import org.apache.flink.table.planner.calcite.FlinkToRelContext
+
+import org.apache.calcite.plan.{RelOptSchema, RelOptTable}
+import org.apache.calcite.rel.RelNode
+import org.apache.calcite.rel.logical.LogicalTableScan
+
+import java.util.{List => JList}
import scala.collection.JavaConverters._
+import scala.collection.JavaConversions._
/**
- * Abstract class which define the interfaces required to convert a
[[TableSource]] to
- * a Calcite Table
+ * Abstract class which define the implementations required to translate
+ * the Calcite [[RelOptTable]] to the Flink specific relational expression
with [[TableSource]],
+ * i.e. The computed column and watermark strategy specifications.
+ *
+ * <p>It also defines the [[copy]] method used for push down rules.
*
- * @param tableSource The [[TableSource]] for which is converted to a Calcite
Table.
- * @param isStreamingMode A flag that tells if the current table is in stream
mode.
- * @param statistic The table statistics.
+ * @param tableSource The [[TableSource]] for which is converted to a Calcite
Table
+ * @param isStreamingMode A flag that tells if the current table is in stream
mode
+ * @param catalogTable Catalog table where this table source table comes from
*/
class TableSourceTable[T](
+ relOptSchema: RelOptSchema,
+ names: JList[String],
+ rowType: RelDataType,
Review comment:
Agree, update to use `PushProjectIntoTableSourceScanRule` to use
`tableSourceTable.catalogTable.getSchema`
----------------------------------------------------------------
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