Skip to content

Generic: Add missing space after ANY when displaying ILIKE ANY ... ESCAPE - #3045

Open
xgbtxy wants to merge 1 commit into
apache:mainfrom
xgbtxy:fix/ilike-any-escape-display-space
Open

xgbtxy wants to merge 1 commit into
apache:mainfrom
xgbtxy:fix/ilike-any-escape-display-space

Conversation

@xgbtxy

@xgbtxy xgbtxy commented Nov 24, 2026

Copy link
Copy Markdown

SELECT * FROM x WHERE a ILIKE ANY pat ESCAPE '!' currently displays as:

SELECT * FROM x WHERE a ILIKE ANYpat ESCAPE '!'

Because Expr::ILike with Some(escape_char) emitted "ANY" without a trailing space (unlike Expr::Like and the non-ESCAPE branch of Expr::ILike), ANY concatenates into identifier patterns and changes the reparsed AST (any: true, pattern: pat -> any: false, pattern: ANYpat).

This PR emits "ANY " in that branch and adds unit tests plus a fuzz seed.

Verified locally with cargo test --all-features, cargo fmt --all -- --check, and cargo clippy --all-targets --all-features -- -D warnings.

AI assistance was used in discovering this round-trip mismatch and drafting the fix and tests; all changes were reviewed and verified locally.

Copilot AI balanced review requested due to automatic review settings November 24, 2026 12:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions

Copy link
Copy Markdown

No dialect label was applied because the title does not name a SQL dialect.

If this change targets one or more dialects, edit the title to <Dialect>[, <Dialect>]: <description>, add a Dialects: <Dialect>[, <Dialect>] line to the description, or reply with one. Reply Dialects: none if the change is dialect-agnostic.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants