You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apache/datafusion-sqlparser-rs#2598 added ClickHouse's GLOBAL IN and GLOBAL NOT IN, which put a global flag on Expr::InList and Expr::InSubquery. subql names every field of those variants in the compiler, the prefilter and the re-execution key predicate, so it stopped building against sqlparser main.
GLOBAL asks a distributed ClickHouse query to evaluate the right-hand side once on the initiator and broadcast it. None of subql's backends has that read, so the compiler refuses a GLOBAL list or subquery as it refuses any unsupported condition, the prefilter leaves it unknown, and the key predicate built for re-execution is never GLOBAL. Only ClickHouse parses the keyword, so the test compiles ClickHouse-parsed conditions directly.
The lockfiles follow sqlparser and sql-traits main in their own commits. The all-features, demo and fuzz builds stay red until LucaCappelletti94/pg2sqlite#122 merges, after which one more lock refresh lands here.
Adding global to sqlparser’s membership-expression variants broke compilation because the compiler, prefilter, and re-execution predicate did not account for the new field. The compiler now rejects GLOBAL IN and GLOBAL NOT IN because the backend does not support ClickHouse’s distributed-query behavior.
The prefilter treats global membership as unknown, and re-execution predicates remain non-global. ClickHouse-specific tests cover plain and global list and subquery membership conditions.
Reviewing files that changed from the base of the PR and between bd56fb7 and 673580d.
⛔ Files ignored due to path filters: 2
Cargo.lock is excluded by !**/*.lock
fuzz/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing: 5
CHANGELOG.md
src/compiler/parser/compilation_helpers.rs
src/compiler/parser/mod.rs
src/compiler/prefilter.rs
src/reexec/plan.rs
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
📝 Walkthrough
The compiler rejects ClickHouse GLOBAL IN membership lists and subqueries. Prefilter analysis treats global lists as unknown, and generated IN predicates explicitly set global to false. Tests cover supported and rejected conditions.
Changes: GLOBAL IN handling
Layer / File(s)
Summary
Reject and validate GLOBAL IN conditions src/compiler/parser/compilation_helpers.rs, src/compiler/prefilter.rs, src/reexec/plan.rs, src/compiler/parser/mod.rs, CHANGELOG.md
The compiler rejects global membership lists and subqueries. Prefilter analysis excludes global lists, and generated predicates set global to false. Tests verify that non-global IN and NOT IN compile, while their global forms return UnsupportedSql. The changelog records this behavior.
This change makes the compiler refuse ClickHouse GLOBAL IN membership tests and adapts related code to the new sqlparser field. No concrete merge-blocking risk was found in the supplied changes.
Caution
Pre-merge checks failed
Please resolve all errors before merging. Addressing warnings is optional.
Ignore
Failed checks: 1 error
Check name
Status
Explanation
Resolution
Git Dependency Pin Stays Out Of Commits
The PR modifies Cargo.lock and fuzz/Cargo.lock, while Cargo.toml, fuzz/Cargo.toml, and subql-demo/Cargo.toml declare git = dependencies without rev or tag (for example, Cargo.toml:26…
Either revert the Cargo.lock and fuzz/Cargo.lock changes, or add an explicit rev or tag to every Git dependency in all repository manifests, then regenerate the lockfiles.
Passed checks: 11 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title is an imperative, plain statement of the main change. It is 42 characters long, has no conventional-commit prefix or file path, and has no trailing period.
Docstring Coverage
Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 4 files. (1 skipped: 1 u…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
No Placeholder Implementations
No added line matches the specified placeholder or deferral markers. The new unsupported_expression(expr) path explicitly rejects GLOBAL membership as unsupported behavior; it is not a placeholder…
No Blanket Diagnostic Suppression
No added line matches a blanket diagnostic suppression. The Rust changes add explicit global matching, comments, and tests only; the lockfile and changelog additions contain no suppression directive…
Behavior Change Carries A Test
The pull request changes runtime behavior in src/compiler/parser/compilation_helpers.rs, src/compiler/prefilter.rs, and src/reexec/plan.rs. It also adds the #[test] item `a_global_membership_t…
Crate Readme Is The Crate Documentation
The check applies only when the pull request changes README.md or src/lib.rs. The authoritative diff changes neither file, although src/lib.rs exists.
Pre-Alpha Has No Deployments
No added line mentions a migration guide, migration SQL, upgrade path, existing deployments, version-bump coordination, flag day, rollout sequence, deprecation window, backward-compatibility shim, or …
Prose Punctuation
No added prose violates the punctuation rule. The changelog and Rust comments/doc comments contain no semicolons, em dashes, en dashes, curly quotes, or ellipses. The ASCII hyphens are list-marker or …
Full details: Docstring Coverage
Explanation
Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 4 files. (1 skipped: 1 unsupported.)
Full details: No Placeholder Implementations
Explanation
No added line matches the specified placeholder or deferral markers. The new unsupported_expression(expr) path explicitly rejects GLOBAL membership as unsupported behavior; it is not a placeholder implementation. The added comments and changelog contain no TODO, FIXME, HACK, or XXX markers.
Full details: No Blanket Diagnostic Suppression
Explanation
No added line matches a blanket diagnostic suppression. The Rust changes add explicit global matching, comments, and tests only; the lockfile and changelog additions contain no suppression directives.
Full details: Behavior Change Carries A Test
Explanation
The pull request changes runtime behavior in src/compiler/parser/compilation_helpers.rs, src/compiler/prefilter.rs, and src/reexec/plan.rs. It also adds the #[test] item a_global_membership_test_is_refused_where_the_plain_one_compiles in src/compiler/parser/mod.rs, covering plain and GLOBAL list and subquery membership cases.
Full details: Pre-Alpha Has No Deployments
Explanation
No added line mentions a migration guide, migration SQL, upgrade path, existing deployments, version-bump coordination, flag day, rollout sequence, deprecation window, backward-compatibility shim, or an alias for old clients. The package is version 0.1.0 and the README links its crates.io package.
Full details: Prose Punctuation
Explanation
No added prose violates the punctuation rule. The changelog and Rust comments/doc comments contain no semicolons, em dashes, en dashes, curly quotes, or ellipses. The ASCII hyphens are list-marker or compound-word uses such as right-hand and Bind-placeholder. Assert messages also comply.
Full details: Git Dependency Pin Stays Out Of Commits
Explanation
The PR modifies Cargo.lock and fuzz/Cargo.lock, while Cargo.toml, fuzz/Cargo.toml, and subql-demo/Cargo.toml declare git = dependencies without rev or tag (for example, Cargo.toml:26 and Cargo.toml:106). This breaks the invariant that changed lockfiles must not accompany bare Git dependencies.
Resolution
Either revert the Cargo.lock and fuzz/Cargo.lock changes, or add an explicit rev or tag to every Git dependency in all repository manifests, then regenerate the lockfiles.
Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings
Commit to this branch
Create a new PR
🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
🛠️ Fix failing CI checks: 💡
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❌ Patch coverage is 97.67442% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.46%. Comparing base (bd56fb7) to head (48a3c32).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
apache/datafusion-sqlparser-rs#2598 added ClickHouse's
GLOBAL INandGLOBAL NOT IN, which put aglobalflag onExpr::InListandExpr::InSubquery. subql names every field of those variants in the compiler, the prefilter and the re-execution key predicate, so it stopped building against sqlparser main.GLOBALasks a distributed ClickHouse query to evaluate the right-hand side once on the initiator and broadcast it. None of subql's backends has that read, so the compiler refuses aGLOBALlist or subquery as it refuses any unsupported condition, the prefilter leaves it unknown, and the key predicate built for re-execution is neverGLOBAL. Only ClickHouse parses the keyword, so the test compiles ClickHouse-parsed conditions directly.The lockfiles follow sqlparser and sql-traits main in their own commits. The all-features, demo and fuzz builds stay red until LucaCappelletti94/pg2sqlite#122 merges, after which one more lock refresh lands here.
Adding
globaltosqlparser’s membership-expression variants broke compilation because the compiler, prefilter, and re-execution predicate did not account for the new field. The compiler now rejectsGLOBAL INandGLOBAL NOT INbecause the backend does not support ClickHouse’s distributed-query behavior.The prefilter treats global membership as unknown, and re-execution predicates remain non-global. ClickHouse-specific tests cover plain and global list and subquery membership conditions.