twalthr commented on code in PR #24256:
URL: https://github.com/apache/flink/pull/24256#discussion_r1846079945
##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/batch/sql/OverAggregateITCase.scala:
##########
@@ -532,6 +532,33 @@ class OverAggregateITCase extends BatchTestBase {
)
}
+ @Test
+ def testWindowAggregationSumWithQualify(): Unit = {
+ checkResult(
+ "SELECT d, e FROM Table5 QUALIFY sum(e) OVER (PARTITION BY d ORDER BY e)
> 20",
Review Comment:
This is awesome. It will simplify stream deduplication. Can you also add a
test for this and update the docs?
From:
```
SELECT [column_list]
FROM (
SELECT [column_list],
ROW_NUMBER() OVER ([PARTITION BY col1[, col2...]]
ORDER BY time_attr [asc|desc]) AS rownum
FROM table_name)
WHERE rownum = 1
```
To:
```
SELECT [column_list],
ROW_NUMBER() OVER ([PARTITION BY col1[, col2...]] ORDER BY time_attr
[asc|desc]) AS rownum
FROM table_name)
QUALIFY rownum = 1
```
--
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]