MartijnVisser commented on code in PR #30245:
URL: https://github.com/apache/flink/pull/30245#discussion_r4781977920


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/common/OverAggregateTestPrograms.java:
##########
@@ -446,6 +449,117 @@ public class OverAggregateTestPrograms {
                                     + " FROM timestamp_ltz_range_source")
                     .build();
 
+    public static final TableTestProgram OVER_AGGREGATE_RANK_TIMESTAMP_LTZ =
+            getRankTestProgram(
+                    "over-aggregate-batch-rank-timestamp-ltz",
+                    "RANK, DENSE_RANK and PERCENT_RANK with TIMESTAMP_LTZ 
ORDER BY",
+                    "CAST(TO_TIMESTAMP_LTZ(b, 3) AS TIMESTAMP_LTZ(0))",
+                    "CAST(TO_TIMESTAMP_LTZ(b, 3) AS TIMESTAMP_LTZ(3))",
+                    "CAST(TO_TIMESTAMP_LTZ(b, 3) AS TIMESTAMP_LTZ(6))",
+                    "CAST(TO_TIMESTAMP_LTZ(b, 3) AS TIMESTAMP_LTZ(9))");
+
+    public static final TableTestProgram 
OVER_AGGREGATE_RANK_BYTES_AND_INTERVALS =
+            getRankTestProgram(
+                    "over-aggregate-batch-rank-bytes-and-intervals",
+                    "RANK, DENSE_RANK and PERCENT_RANK with BYTES and INTERVAL 
ORDER BY",
+                    "CAST(CAST(b AS STRING) AS BYTES)",
+                    "b * INTERVAL '1' SECOND",
+                    "b * INTERVAL '1' MONTH");
+
+    public static final TableTestProgram OVER_AGGREGATE_RANK_ARRAY_AND_ROW =
+            getRankTestProgram(
+                    "over-aggregate-batch-rank-array-and-row",
+                    "RANK, DENSE_RANK and PERCENT_RANK with ARRAY and ROW 
ORDER BY",
+                    "ARRAY[b]",

Review Comment:
   These keys are NOT NULL, so `accumulate` never copies a NULL in these 
programs. A nullable ARRAY or ROW key with NULLS LAST would cover that path; 
without it, dropping the guard there goes unnoticed.



-- 
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]

Reply via email to