You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Mihai Budiu (Jira)" <ji...@apache.org> on 2026/09/07 18:47:00 UTC
[jira] [Resolved] (CALCITE-7761) Preserve OFFSET and FETCH when rewriting outer ORDER BY
[ https://issues.apache.org/jira/browse/CALCITE-7761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mihai Budiu resolved CALCITE-7761.
----------------------------------
Fix Version/s: 1.43.0
Resolution: Fixed
Fixed in [https://github.com/apache/calcite/commit/b81f46f4ca42a904cfdeef265012f45fa18f6cc3]
Thank you for the report and fix [~ktkalenko@gridgain.com]
> Preserve OFFSET and FETCH when rewriting outer ORDER BY
> -------------------------------------------------------
>
> Key: CALCITE-7761
> URL: https://issues.apache.org/jira/browse/CALCITE-7761
> Project: Calcite
> Issue Type: Improvement
> Reporter: Kirill Tkalenko
> Assignee: Kirill Tkalenko
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.43.0
>
>
> {{SqlValidatorImpl.performUnconditionalRewrites}} may overwrite {{OFFSET}} or {{FETCH}} previously added to an inner {{SELECT}} during query rewriting. Merge the outer {{SqlOrderBy}} only when the inner {{SELECT}} has no {{{}ORDER BY{}}}, {{{}OFFSET{}}}, or {{{}FETCH{}}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)