xuyangzhong commented on code in PR #30071:
URL: https://github.com/apache/flink/pull/30071#discussion_r4689780051
##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/operators/rank/AbstractTopNFunction.java:
##########
@@ -306,16 +308,11 @@ protected boolean isInRankRange(long rank, long rankEnd) {
private RowData createOutputRow(RowData inputRow, long rank, RowKind
rowKind) {
if (outputRankNumber) {
- GenericRowData rankRow = new GenericRowData(1);
rankRow.setField(0, rank);
-
- outputRow.replace(inputRow, rankRow);
- outputRow.setRowKind(rowKind);
- return outputRow;
- } else {
- inputRow.setRowKind(rowKind);
Review Comment:
Good catch!
--
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]