davidradl commented on code in PR #29027:
URL: https://github.com/apache/flink/pull/29027#discussion_r3879754695
##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/operators/sink/OutputConversionOperator.java:
##########
@@ -71,12 +72,10 @@ public void processElement(StreamRecord<RowData> element)
throws Exception {
if (consumeRowtimeMetadata) {
// timestamp is TIMESTAMP_LTZ
- final long rowtime = rowData.getTimestamp(rowData.getArity() - 1,
3).getMillisecond();
- outRecord.setTimestamp(rowtime);
+ updateRowtime(rowData, rowData.getArity() - 1);
} else if (rowtimeIndex != -1) {
// timestamp might be TIMESTAMP or TIMESTAMP_LTZ
- final long rowtime = rowData.getTimestamp(rowtimeIndex,
3).getMillisecond();
- outRecord.setTimestamp(rowtime);
+ updateRowtime(rowData, rowtimeIndex);
Review Comment:
nit: you could move updateRowtime call outside the if else and set the index
in the if else.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]