pnowojski commented on a change in pull request #6787: [FLINK-8577][table] Implement proctime DataStream to Table upsert conversion URL: https://github.com/apache/flink/pull/6787#discussion_r241817741
########## File path: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/logical/EnumerableToLogicalTableScan.scala ########## @@ -22,13 +22,16 @@ import org.apache.calcite.adapter.enumerable.EnumerableTableScan import org.apache.calcite.plan.RelOptRule.{any, operand} import org.apache.calcite.plan.{RelOptRule, RelOptRuleCall, RelOptRuleOperand} import org.apache.calcite.rel.logical.LogicalTableScan +import org.apache.flink.table.plan.logical.rel.LogicalUpsertToRetraction +import org.apache.flink.table.plan.schema.UpsertStreamTable /** * Rule that converts an EnumerableTableScan into a LogicalTableScan. * We need this rule because Calcite creates an EnumerableTableScan * when parsing a SQL query. We convert it into a LogicalTableScan * so we can merge the optimization process with any plan that might be created - * by the Table API. + * by the Table API. The rule also checks whether the source is an upsert source and adds Review comment: This rule is only applied on the `EnumerableTableScan` nodes. This comment suggests, that `EnumerableTableScan` appears only in sql, so something is wrong here. If we want to keep it as it is now, the comment need updating. (please check also my comment below in `LogicalToEnumerableTableScan`) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services