KurtYoung commented on a change in pull request #10123:
[FLINK-14665][table-planner-blink] Support computed column for create…
URL: https://github.com/apache/flink/pull/10123#discussion_r344424499
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/schema/FlinkRelOptTable.scala
##########
@@ -221,12 +230,40 @@ class FlinkRelOptTable protected(
val cluster: RelOptCluster = context.getCluster
if (table.isInstanceOf[TranslatableTable]) {
table.asInstanceOf[TranslatableTable].toRel(context, this)
- } else if (Hook.ENABLE_BINDABLE.get(false)) {
- LogicalTableScan.create(cluster, this)
- } else if (CalcitePrepareImpl.ENABLE_ENUMERABLE) {
- EnumerableTableScan.create(cluster, this)
} else {
- throw new AssertionError
+ if (!context.isInstanceOf[FlinkToRelContext]) {
+ // If the transform comes from a RelOptRule,
+ // returns the scan directly.
+ LogicalTableScan.create(cluster, this)
+ } else {
+ // Get row type of physical fields.
+ val physicalFields = getRowType.getFieldList
Review comment:
If you are warping lines, make each call a separate line, like:
>val physicalFields = getRowType
.getFieldList
.filter(f => !columnExprs.contains(f.getName))
.toList`
----------------------------------------------------------------
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