Github user godfreyhe commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3520#discussion_r106074574
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/dataset/BatchTableSourceScan.scala
 ---
    @@ -19,31 +19,34 @@
     package org.apache.flink.table.plan.nodes.dataset
     
     import org.apache.calcite.plan._
    +import org.apache.calcite.rel.`type`.RelDataType
     import org.apache.calcite.rel.metadata.RelMetadataQuery
     import org.apache.calcite.rel.{RelNode, RelWriter}
     import org.apache.flink.api.java.DataSet
     import org.apache.flink.table.api.{BatchTableEnvironment, TableEnvironment}
     import org.apache.flink.table.calcite.FlinkTypeFactory
    +import org.apache.flink.table.plan.nodes.TableSourceScan
     import org.apache.flink.table.plan.schema.TableSourceTable
    -import org.apache.flink.table.sources.BatchTableSource
    +import org.apache.flink.table.sources.{BatchTableSource, TableSource}
     import org.apache.flink.types.Row
     
     /** Flink RelNode to read data from an external source defined by a 
[[BatchTableSource]]. */
     class BatchTableSourceScan(
         cluster: RelOptCluster,
         traitSet: RelTraitSet,
         table: RelOptTable,
    -    val tableSource: BatchTableSource[_])
    -  extends BatchScan(cluster, traitSet, table) {
    +    tableSource: BatchTableSource[_])
    +  extends TableSourceScan(cluster, traitSet, table, tableSource)
    +  with BatchScan {
     
    -  override def deriveRowType() = {
    +  override def deriveRowType(): RelDataType = {
    --- End diff --
    
    Move this method to `TableSourceScan`. The behavior is same between 
`TableSourceScan`'s sub-class.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to