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_r247926320
########## File path: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/calcite/RelTimeIndicatorConverter.scala ########## @@ -215,6 +217,19 @@ class RelTimeIndicatorConverter(rexBuilder: RexBuilder) extends RelShuttle { materializerUtils.projectAndMaterializeFields(rewrittenTemporalJoin, indicesToMaterialize) } + def visit(upsertToRetraction: LogicalUpsertToRetraction): RelNode = { Review comment: I think this code is a bit incorrect. First, you didn't recursively call the `RelTimeIndicatorConverter` on the `upsertToRetraction` input: ``` val rewrittenInput = upsertToRetraction.accept(this) ``` Secondly, we should solve this in some more generic way. Not only `upsertToRetraction` nodes needs to materialize it's output, but basically every node that produces updates/retractions needs to do that. I would propose to introduce a common logic to do that, maybe as a separate `RelShuttle` that we would execute at the end of the planning (probably by checking `DataStreamRel#producesUpdates` flag). What do you think? Also this requires some tests coverage (that `rowtTime` was materialised). ---------------------------------------------------------------- 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