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_r249056854
########## 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 = { + val input = upsertToRetraction.getInput.accept(this) + val relTypes = input.getRowType.getFieldList.map(_.getType) + val timeIndicatorIndexes = relTypes.zipWithIndex + .filter(e => FlinkTypeFactory.isTimeIndicatorType(e._1)) + .map(_._2).toSet + + val rewrittenInput = input.copy(input.getTraitSet, input.getInputs) Review comment: `input` is already a `rewrittenInput`. `val rewrittenInput = input.copy(input.getTraitSet, input.getInputs)` looks to me as a no-op: 1. rename `input` -> `rewrittenInput` 2. drop copy? ---------------------------------------------------------------- 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