Skip to content

fix: rewrite limit / offset#16

Open
sweb wants to merge 1 commit into
mainfrom
fix/rewrite-limit-offset
Open

fix: rewrite limit / offset#16
sweb wants to merge 1 commit into
mainfrom
fix/rewrite-limit-offset

Conversation

@sweb

@sweb sweb commented Jul 20, 2026

Copy link
Copy Markdown
Member

No description provided.

@lfrancke lfrancke moved this to Development: Waiting for Review in Stackable Engineering Jul 24, 2026

@lfrancke lfrancke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor stuff

Comment thread src/rewrite/mod.rs
/// - PostgreSQL type names are normalized to Trino equivalents
/// - `ILIKE` becomes `lower(x) LIKE lower(pattern)`
/// - PostgreSQL function names are mapped to Trino equivalents
/// - `LIMIT n OFFSET m` is reordered into Trino order

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also list the rewrites we do in the README and AGENTs file. We should either remove that stuff or update it.

query.fetch = Some(Fetch {
with_ties: false,
percent: false,
quantity: Some(limit),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check whether/how Trino handles the edge case "0" here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: Waiting for Review

Development

Successfully merging this pull request may close these issues.

2 participants