Jackie-Jiang commented on code in PR #14264:
URL: https://github.com/apache/pinot/pull/14264#discussion_r1815544184
##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/NullHandlingIntegrationTest.java:
##########
@@ -326,6 +326,31 @@ public void testAggregateServerReturnFinalResult(boolean
useMultiStageQueryEngin
assertTrue(response.get("resultTable").get("rows").get(0).get(0).isNull());
}
+ @Test
+ public void testWindowFunctionIgnoreNulls()
+ throws Exception {
+ // Window functions are only supported in the multi-stage query engine
+ setUseMultiStageQueryEngine(true);
+ String sqlQuery =
+ "SELECT salary, LAST_VALUE(salary) IGNORE NULLS OVER (ORDER BY
DaysSinceEpoch) AS gapfilledSalary from "
Review Comment:
Does it work with bounded preceding/following? I remember running into some
exception when trying it out
##########
pinot-query-planner/src/main/java/org/apache/pinot/calcite/sql/fun/PinotOperatorTable.java:
##########
@@ -152,7 +149,17 @@ public static PinotOperatorTable instance() {
SqlStdOperatorTable.RANK,
SqlStdOperatorTable.ROW_NUMBER,
+ // WINDOW Functions (non-aggregate)
+ SqlStdOperatorTable.LAST_VALUE,
+ SqlStdOperatorTable.FIRST_VALUE,
+ // TODO: Replace these with SqlStdOperatorTable.LEAD and
SqlStdOperatorTable.LAG when the function implementations
Review Comment:
Does this mean `IGNORE NULLS` are simply ignored?
I'd suggest using the standard operator, and throw exception when `IGNORE
NULLS` is specified but cannot be supported to make the behavior more explicit
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]