Skip to content

[CALCITE-7592] Add expression support for FETCH - #5133

Merged
xiedeyantu merged 1 commit into
apache:mainfrom
tkalkirill:calcite-7592-new
Aug 3, 2026
Merged

[CALCITE-7592] Add expression support for FETCH#5133
xiedeyantu merged 1 commit into
apache:mainfrom
tkalkirill:calcite-7592-new

Conversation

@tkalkirill

Copy link
Copy Markdown
Contributor

Jira Link

CALCITE-7592

Changes Proposed

This PR introduces support for arithmetic and scalar expressions for "FETCH", enabling queries to execute similarly to those in other popular DBMSs (PostgreSQL, Oracle, H2, and MS SQL):

SELECT * FROM person FETCH NEXT (? + 1) ROWS ONLY;
SELECT * FROM person FETCH NEXT (udf(?)) ROWS ONLY;
SELECT * FROM person FETCH NEXT (1 + NVL(?, 10000)) ROWS ONLY.

@sonarqubecloud

Copy link
Copy Markdown

@tkalkirill

Copy link
Copy Markdown
Contributor Author

@xiedeyantu Can you take a look?

@xiedeyantu xiedeyantu added the LGTM-will-merge-soon Overall PR looks OK. Only minor things left. label Jul 31, 2026
@tkalkirill

Copy link
Copy Markdown
Contributor Author

@xiedeyantu Hi, could you please merge it?

@xiedeyantu
xiedeyantu merged commit c0295dc into apache:main Aug 3, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LGTM-will-merge-soon Overall PR looks OK. Only minor things left.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants