KurtYoung 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_r347076228
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/PushProjectIntoTableSourceScanRule.scala
##########
@@ -94,16 +97,26 @@ class PushProjectIntoTableSourceScanRule extends
RelOptRule(
}
// project push down does not change the statistic, we can reuse origin
statistic
+ val flinkTypeFactory = tableSourceTable
+ .getRelOptSchema
+ .getTypeFactory
+ .asInstanceOf[FlinkTypeFactory]
+ val newSourceRowType = TableSourceUtil.getSourceRowType(flinkTypeFactory,
+ oldTableSource.getTableSchema,
+ oldTableSource,
+ Option(usedFields),
+ tableSourceTable.isStreamingMode)
val newTableSourceTable = new TableSourceTable(
Review comment:
let `TableSourceTable` provide a `copy` method with new rowType and
tableSource
----------------------------------------------------------------
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