Skip to content

Reject IN (SELECT …) subqueries properly as UNSUPPORTED_QUERY - #4595

Open
robert-brunel wants to merge 1 commit into
mainfrom
apple/robert-brunel/antijoin-1
Open

Reject IN (SELECT …) subqueries properly as UNSUPPORTED_QUERY#4595
robert-brunel wants to merge 1 commit into
mainfrom
apple/robert-brunel/antijoin-1

Conversation

@robert-brunel

@robert-brunel robert-brunel commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

In AstNormalizer.visitInPredicate(), add an assert that raises UNSUPPORTED_QUERY if the IN predicate has a nested SELECT, which isn’t supported yet. The same guard already exists in ExpressionVisitor.visitInPredicate(), but is effectively unreachable because normalization runs first and, as written, only handles expressions(), which is null in the IN (SELECT …) case and, prior to this change, would trigger a NullPointerException.

@robert-brunel robert-brunel self-assigned this Sep 8, 2026
@robert-brunel robert-brunel added the bug fix Change that fixes a bug label Sep 8, 2026
@arnaud-lacurie
arnaud-lacurie requested a review from hatyo September 8, 2026 21:58
Base automatically changed from apple/robert-brunel/antijoin-0 to main September 9, 2026 09:33
In `AstNormalizer.visitInPredicate()`, add an assert that raises `UNSUPPORTED_QUERY` if the `IN` predicate has a nested `SELECT`, which isn’t supported yet. The same guard already exists in `ExpressionVisitor.visitInPredicate()`, but is effectively unreachable because normalization runs first and as written only handles `expressions()`, which is null in the `IN (SELECT …)` case and prior to this change would trigger a `NullPointerException`.
@robert-brunel
robert-brunel force-pushed the apple/robert-brunel/antijoin-1 branch from d317965 to 9278929 Compare September 9, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix Change that fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant