hongkunxu opened a new pull request, #20401: URL: https://github.com/apache/pinot/pull/20401
## Problem The SQL parser preserves `OFFSET`. Single-stage `GROUP BY` sizes candidate retention using only `LIMIT`, and both broker reduction paths start at the first group. As a result, `ORDER BY ... LIMIT 10 OFFSET 1000` returns groups 1–10. The requested page is groups 1001–1010. ## Fix Use `LIMIT + OFFSET` to size candidate retention on both the server and the broker. The broker sends servers a copy of the query with the widened `LIMIT` and preserves the original pagination parameters for final reduction. Both the single-server fast path and the regular merge path now skip `OFFSET` groups after ordering and `HAVING` filtering, then return up to `LIMIT` groups. -- 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]
