forked from apache/datafusion
-
Notifications
You must be signed in to change notification settings - Fork 0
QUALIFY
clause implementation
#34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
nvm I missed that there is already an attempt to do this. First, I should check if it works for us |
osipovartem
approved these changes
Aug 13, 2025
Vedin
pushed a commit
that referenced
this pull request
Sep 12, 2025
* dissallow pushdown of volatile PhysicalExprs * fix * add FilteredVec helper to handle filter / remap pattern (#34) * checkpoint: Address PR feedback in https://github.com/apach... * add FilteredVec to consolidate handling of filter / remap pattern * lint * Add slt test for pushing volatile predicates down (#35) --------- Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Vedin
pushed a commit
that referenced
this pull request
Sep 16, 2025
Make required funcs public (#1) * Make required funcs public * Make required funcs public * Make required funcs public Extend to_date UDF supported types (#3) * Extend to_date supported types * Remove TODO Add "rlike" as an alias for regexp_like (#2) * Add "rlike" as an alias for regexp_like * Update docs Extend references with new ShowSchemas type (#4) * Extend references with new SHowSchemas type * Make resolve_table_ref as pub * Fix docs linter Implement regexp_substr (#6) * Extend references with new SHowSchemas type Make resolve_table_ref as pub Fix docs linter Add DDL AlterTable Add DDL AlterTable Add "rlike" as an alias for regexp_like (#2) * Add "rlike" as an alias for regexp_like * Update docs Extend references with new ShowSchemas type (#4) * Extend references with new SHowSchemas type * Make resolve_table_ref as pub * Fix docs linter Fix deps Import alter table Temp Temp Add regexp_substr udf Add regexp_substr udf Add regexp_substr udf Add regexp_substr udf * Add regexp_substr to docs * Update comments and fix returned datatype * Update docs Make statements publci (#7) Make context public (#9) * Make conext public * Fix clippy DFParser should skip unsupported COPY INTO (#10) Skip CREATE STAGE by DFParser (pass to dialect parser) (#11) * DFParser should skip unsupported COPY INTO * Add tests * Add tests * Add tests * Add tests * Fmt * Fmt * Fmt Extend references with new Show* types (#14) Add e flag support (#16) * Add e flag support * Add e flag support * fix fmt * clippy return Int64 instead of UInt64 when returning count (#17) Revert commit: 314a726 (#18) * Revert "return Int64 instead of UInt64 when returning count (#17)" This reverts commit 314a726. * revert changes as of a bad approach use Bump sqlparser version to 0.55. Fixes after rebase named arguments for table functions (#20) TableFunction Fixes (#23) * TableFunction Fixes * Also fix tests after rebase * Taplo format * Clippy * Fix docs PIVOT command (#22) * Pivot initial changes * Polishing * Rebase fixes * Add slt tests * Add display for PIVOT * Only check projections in case of subqueries * Add builder test * Add default on null. Cargo fmt * Add default_on_null to proto and tests * Fix protoc and clippy * Cargo fmt Update parser version (#26) Fix incompatible type in IS NOT DISTINCT filter for PIVOT (#25) * Fix incompattible type in IS NOT DISTINCT filter * Cargo fmt * Cargo clippy UNPIVOT command (#24) * UNPIVOT command implementation * UNPIVOT command * Add slt tests * Taplo and cargo fmt * Resolve comments Update sql-parser Update parser update parser with fetch (#28) Enhance string concat coercion to support castable types (#27) * Allow any stringle types for concatination * Fix fmt Added basic support for table functions in relations (#29) * Add basic support for flatten join * Fix outer Update sqlparser-version Get table function in ascii lowercase (#30) * Get table function in ascii lowercase * Get table function in ascii lowercase Update parser version Update parser Allow boolean vs integer comparison (#31) * Allow comparison between boolean and int values * Allow comparison between boolean and int values * Add integer types * clippy+fmt+tests fix * tests fix * Fix incompatible types test * Fix slt test * Fix docs Fix unpivot. Columns result always in uppercase (#32) Update parser (#33) * Update parser * Update version * Update parser and external table * Fix external table * Fix external table `QUALIFY` clause implementation (#34) * Implement clause * Remove comment * Remove unimplemented Support projection in subquery with IN clause (#35) Update parser with SECURE keyword for views (#36) * Update parser with SECURE keyword for views * update rustc version for compatibility Decorellate subqueries in IN inside JOIN filter and Aggregates (#37)
JanKaul
pushed a commit
that referenced
this pull request
Oct 17, 2025
Make required funcs public (#1) * Make required funcs public * Make required funcs public * Make required funcs public Extend to_date UDF supported types (#3) * Extend to_date supported types * Remove TODO Add "rlike" as an alias for regexp_like (#2) * Add "rlike" as an alias for regexp_like * Update docs Extend references with new ShowSchemas type (#4) * Extend references with new SHowSchemas type * Make resolve_table_ref as pub * Fix docs linter Implement regexp_substr (#6) * Extend references with new SHowSchemas type Make resolve_table_ref as pub Fix docs linter Add DDL AlterTable Add DDL AlterTable Add "rlike" as an alias for regexp_like (#2) * Add "rlike" as an alias for regexp_like * Update docs Extend references with new ShowSchemas type (#4) * Extend references with new SHowSchemas type * Make resolve_table_ref as pub * Fix docs linter Fix deps Import alter table Temp Temp Add regexp_substr udf Add regexp_substr udf Add regexp_substr udf Add regexp_substr udf * Add regexp_substr to docs * Update comments and fix returned datatype * Update docs Make statements publci (#7) Make context public (#9) * Make conext public * Fix clippy DFParser should skip unsupported COPY INTO (#10) Skip CREATE STAGE by DFParser (pass to dialect parser) (#11) * DFParser should skip unsupported COPY INTO * Add tests * Add tests * Add tests * Add tests * Fmt * Fmt * Fmt Extend references with new Show* types (#14) Add e flag support (#16) * Add e flag support * Add e flag support * fix fmt * clippy return Int64 instead of UInt64 when returning count (#17) Revert commit: 314a726 (#18) * Revert "return Int64 instead of UInt64 when returning count (#17)" This reverts commit 314a726. * revert changes as of a bad approach use Bump sqlparser version to 0.55. Fixes after rebase named arguments for table functions (#20) TableFunction Fixes (#23) * TableFunction Fixes * Also fix tests after rebase * Taplo format * Clippy * Fix docs PIVOT command (#22) * Pivot initial changes * Polishing * Rebase fixes * Add slt tests * Add display for PIVOT * Only check projections in case of subqueries * Add builder test * Add default on null. Cargo fmt * Add default_on_null to proto and tests * Fix protoc and clippy * Cargo fmt Update parser version (#26) Fix incompatible type in IS NOT DISTINCT filter for PIVOT (#25) * Fix incompattible type in IS NOT DISTINCT filter * Cargo fmt * Cargo clippy UNPIVOT command (#24) * UNPIVOT command implementation * UNPIVOT command * Add slt tests * Taplo and cargo fmt * Resolve comments Update sql-parser Update parser update parser with fetch (#28) Enhance string concat coercion to support castable types (#27) * Allow any stringle types for concatination * Fix fmt Added basic support for table functions in relations (#29) * Add basic support for flatten join * Fix outer Update sqlparser-version Get table function in ascii lowercase (#30) * Get table function in ascii lowercase * Get table function in ascii lowercase Update parser version Update parser Allow boolean vs integer comparison (#31) * Allow comparison between boolean and int values * Allow comparison between boolean and int values * Add integer types * clippy+fmt+tests fix * tests fix * Fix incompatible types test * Fix slt test * Fix docs Fix unpivot. Columns result always in uppercase (#32) Update parser (#33) * Update parser * Update version * Update parser and external table * Fix external table * Fix external table `QUALIFY` clause implementation (#34) * Implement clause * Remove comment * Remove unimplemented Support projection in subquery with IN clause (#35) Update parser with SECURE keyword for views (#36) * Update parser with SECURE keyword for views * update rustc version for compatibility Decorellate subqueries in IN inside JOIN filter and Aggregates (#37)
JanKaul
pushed a commit
that referenced
this pull request
Oct 17, 2025
Make required funcs public (#1) * Make required funcs public * Make required funcs public * Make required funcs public Extend to_date UDF supported types (#3) * Extend to_date supported types * Remove TODO Add "rlike" as an alias for regexp_like (#2) * Add "rlike" as an alias for regexp_like * Update docs Extend references with new ShowSchemas type (#4) * Extend references with new SHowSchemas type * Make resolve_table_ref as pub * Fix docs linter Implement regexp_substr (#6) * Extend references with new SHowSchemas type Make resolve_table_ref as pub Fix docs linter Add DDL AlterTable Add DDL AlterTable Add "rlike" as an alias for regexp_like (#2) * Add "rlike" as an alias for regexp_like * Update docs Extend references with new ShowSchemas type (#4) * Extend references with new SHowSchemas type * Make resolve_table_ref as pub * Fix docs linter Fix deps Import alter table Temp Temp Add regexp_substr udf Add regexp_substr udf Add regexp_substr udf Add regexp_substr udf * Add regexp_substr to docs * Update comments and fix returned datatype * Update docs Make statements publci (#7) Make context public (#9) * Make conext public * Fix clippy DFParser should skip unsupported COPY INTO (#10) Skip CREATE STAGE by DFParser (pass to dialect parser) (#11) * DFParser should skip unsupported COPY INTO * Add tests * Add tests * Add tests * Add tests * Fmt * Fmt * Fmt Extend references with new Show* types (#14) Add e flag support (#16) * Add e flag support * Add e flag support * fix fmt * clippy return Int64 instead of UInt64 when returning count (#17) Revert commit: 314a726 (#18) * Revert "return Int64 instead of UInt64 when returning count (#17)" This reverts commit 314a726. * revert changes as of a bad approach use Bump sqlparser version to 0.55. Fixes after rebase named arguments for table functions (#20) TableFunction Fixes (#23) * TableFunction Fixes * Also fix tests after rebase * Taplo format * Clippy * Fix docs PIVOT command (#22) * Pivot initial changes * Polishing * Rebase fixes * Add slt tests * Add display for PIVOT * Only check projections in case of subqueries * Add builder test * Add default on null. Cargo fmt * Add default_on_null to proto and tests * Fix protoc and clippy * Cargo fmt Update parser version (#26) Fix incompatible type in IS NOT DISTINCT filter for PIVOT (#25) * Fix incompattible type in IS NOT DISTINCT filter * Cargo fmt * Cargo clippy UNPIVOT command (#24) * UNPIVOT command implementation * UNPIVOT command * Add slt tests * Taplo and cargo fmt * Resolve comments Update sql-parser Update parser update parser with fetch (#28) Enhance string concat coercion to support castable types (#27) * Allow any stringle types for concatination * Fix fmt Added basic support for table functions in relations (#29) * Add basic support for flatten join * Fix outer Update sqlparser-version Get table function in ascii lowercase (#30) * Get table function in ascii lowercase * Get table function in ascii lowercase Update parser version Update parser Allow boolean vs integer comparison (#31) * Allow comparison between boolean and int values * Allow comparison between boolean and int values * Add integer types * clippy+fmt+tests fix * tests fix * Fix incompatible types test * Fix slt test * Fix docs Fix unpivot. Columns result always in uppercase (#32) Update parser (#33) * Update parser * Update version * Update parser and external table * Fix external table * Fix external table `QUALIFY` clause implementation (#34) * Implement clause * Remove comment * Remove unimplemented Support projection in subquery with IN clause (#35) Update parser with SECURE keyword for views (#36) * Update parser with SECURE keyword for views * update rustc version for compatibility Decorellate subqueries in IN inside JOIN filter and Aggregates (#37)
JanKaul
pushed a commit
that referenced
this pull request
Oct 17, 2025
Make required funcs public (#1) * Make required funcs public * Make required funcs public * Make required funcs public Extend to_date UDF supported types (#3) * Extend to_date supported types * Remove TODO Add "rlike" as an alias for regexp_like (#2) * Add "rlike" as an alias for regexp_like * Update docs Extend references with new ShowSchemas type (#4) * Extend references with new SHowSchemas type * Make resolve_table_ref as pub * Fix docs linter Implement regexp_substr (#6) * Extend references with new SHowSchemas type Make resolve_table_ref as pub Fix docs linter Add DDL AlterTable Add DDL AlterTable Add "rlike" as an alias for regexp_like (#2) * Add "rlike" as an alias for regexp_like * Update docs Extend references with new ShowSchemas type (#4) * Extend references with new SHowSchemas type * Make resolve_table_ref as pub * Fix docs linter Fix deps Import alter table Temp Temp Add regexp_substr udf Add regexp_substr udf Add regexp_substr udf Add regexp_substr udf * Add regexp_substr to docs * Update comments and fix returned datatype * Update docs Make statements publci (#7) Make context public (#9) * Make conext public * Fix clippy DFParser should skip unsupported COPY INTO (#10) Skip CREATE STAGE by DFParser (pass to dialect parser) (#11) * DFParser should skip unsupported COPY INTO * Add tests * Add tests * Add tests * Add tests * Fmt * Fmt * Fmt Extend references with new Show* types (#14) Add e flag support (#16) * Add e flag support * Add e flag support * fix fmt * clippy return Int64 instead of UInt64 when returning count (#17) Revert commit: 314a726 (#18) * Revert "return Int64 instead of UInt64 when returning count (#17)" This reverts commit 314a726. * revert changes as of a bad approach use Bump sqlparser version to 0.55. Fixes after rebase named arguments for table functions (#20) TableFunction Fixes (#23) * TableFunction Fixes * Also fix tests after rebase * Taplo format * Clippy * Fix docs PIVOT command (#22) * Pivot initial changes * Polishing * Rebase fixes * Add slt tests * Add display for PIVOT * Only check projections in case of subqueries * Add builder test * Add default on null. Cargo fmt * Add default_on_null to proto and tests * Fix protoc and clippy * Cargo fmt Update parser version (#26) Fix incompatible type in IS NOT DISTINCT filter for PIVOT (#25) * Fix incompattible type in IS NOT DISTINCT filter * Cargo fmt * Cargo clippy UNPIVOT command (#24) * UNPIVOT command implementation * UNPIVOT command * Add slt tests * Taplo and cargo fmt * Resolve comments Update sql-parser Update parser update parser with fetch (#28) Enhance string concat coercion to support castable types (#27) * Allow any stringle types for concatination * Fix fmt Added basic support for table functions in relations (#29) * Add basic support for flatten join * Fix outer Update sqlparser-version Get table function in ascii lowercase (#30) * Get table function in ascii lowercase * Get table function in ascii lowercase Update parser version Update parser Allow boolean vs integer comparison (#31) * Allow comparison between boolean and int values * Allow comparison between boolean and int values * Add integer types * clippy+fmt+tests fix * tests fix * Fix incompatible types test * Fix slt test * Fix docs Fix unpivot. Columns result always in uppercase (#32) Update parser (#33) * Update parser * Update version * Update parser and external table * Fix external table * Fix external table `QUALIFY` clause implementation (#34) * Implement clause * Remove comment * Remove unimplemented Support projection in subquery with IN clause (#35) Update parser with SECURE keyword for views (#36) * Update parser with SECURE keyword for views * update rustc version for compatibility Decorellate subqueries in IN inside JOIN filter and Aggregates (#37)
JanKaul
pushed a commit
that referenced
this pull request
Oct 17, 2025
Make required funcs public (#1) * Make required funcs public * Make required funcs public * Make required funcs public Extend to_date UDF supported types (#3) * Extend to_date supported types * Remove TODO Add "rlike" as an alias for regexp_like (#2) * Add "rlike" as an alias for regexp_like * Update docs Extend references with new ShowSchemas type (#4) * Extend references with new SHowSchemas type * Make resolve_table_ref as pub * Fix docs linter Implement regexp_substr (#6) * Extend references with new SHowSchemas type Make resolve_table_ref as pub Fix docs linter Add DDL AlterTable Add DDL AlterTable Add "rlike" as an alias for regexp_like (#2) * Add "rlike" as an alias for regexp_like * Update docs Extend references with new ShowSchemas type (#4) * Extend references with new SHowSchemas type * Make resolve_table_ref as pub * Fix docs linter Fix deps Import alter table Temp Temp Add regexp_substr udf Add regexp_substr udf Add regexp_substr udf Add regexp_substr udf * Add regexp_substr to docs * Update comments and fix returned datatype * Update docs Make statements publci (#7) Make context public (#9) * Make conext public * Fix clippy DFParser should skip unsupported COPY INTO (#10) Skip CREATE STAGE by DFParser (pass to dialect parser) (#11) * DFParser should skip unsupported COPY INTO * Add tests * Add tests * Add tests * Add tests * Fmt * Fmt * Fmt Extend references with new Show* types (#14) Add e flag support (#16) * Add e flag support * Add e flag support * fix fmt * clippy return Int64 instead of UInt64 when returning count (#17) Revert commit: 314a726 (#18) * Revert "return Int64 instead of UInt64 when returning count (#17)" This reverts commit 314a726. * revert changes as of a bad approach use Bump sqlparser version to 0.55. Fixes after rebase named arguments for table functions (#20) TableFunction Fixes (#23) * TableFunction Fixes * Also fix tests after rebase * Taplo format * Clippy * Fix docs PIVOT command (#22) * Pivot initial changes * Polishing * Rebase fixes * Add slt tests * Add display for PIVOT * Only check projections in case of subqueries * Add builder test * Add default on null. Cargo fmt * Add default_on_null to proto and tests * Fix protoc and clippy * Cargo fmt Update parser version (#26) Fix incompatible type in IS NOT DISTINCT filter for PIVOT (#25) * Fix incompattible type in IS NOT DISTINCT filter * Cargo fmt * Cargo clippy UNPIVOT command (#24) * UNPIVOT command implementation * UNPIVOT command * Add slt tests * Taplo and cargo fmt * Resolve comments Update sql-parser Update parser update parser with fetch (#28) Enhance string concat coercion to support castable types (#27) * Allow any stringle types for concatination * Fix fmt Added basic support for table functions in relations (#29) * Add basic support for flatten join * Fix outer Update sqlparser-version Get table function in ascii lowercase (#30) * Get table function in ascii lowercase * Get table function in ascii lowercase Update parser version Update parser Allow boolean vs integer comparison (#31) * Allow comparison between boolean and int values * Allow comparison between boolean and int values * Add integer types * clippy+fmt+tests fix * tests fix * Fix incompatible types test * Fix slt test * Fix docs Fix unpivot. Columns result always in uppercase (#32) Update parser (#33) * Update parser * Update version * Update parser and external table * Fix external table * Fix external table `QUALIFY` clause implementation (#34) * Implement clause * Remove comment * Remove unimplemented Support projection in subquery with IN clause (#35) Update parser with SECURE keyword for views (#36) * Update parser with SECURE keyword for views * update rustc version for compatibility Decorellate subqueries in IN inside JOIN filter and Aggregates (#37)
JanKaul
pushed a commit
that referenced
this pull request
Oct 17, 2025
Make required funcs public (#1) * Make required funcs public * Make required funcs public * Make required funcs public Extend to_date UDF supported types (#3) * Extend to_date supported types * Remove TODO Add "rlike" as an alias for regexp_like (#2) * Add "rlike" as an alias for regexp_like * Update docs Extend references with new ShowSchemas type (#4) * Extend references with new SHowSchemas type * Make resolve_table_ref as pub * Fix docs linter Implement regexp_substr (#6) * Extend references with new SHowSchemas type Make resolve_table_ref as pub Fix docs linter Add DDL AlterTable Add DDL AlterTable Add "rlike" as an alias for regexp_like (#2) * Add "rlike" as an alias for regexp_like * Update docs Extend references with new ShowSchemas type (#4) * Extend references with new SHowSchemas type * Make resolve_table_ref as pub * Fix docs linter Fix deps Import alter table Temp Temp Add regexp_substr udf Add regexp_substr udf Add regexp_substr udf Add regexp_substr udf * Add regexp_substr to docs * Update comments and fix returned datatype * Update docs Make statements publci (#7) Make context public (#9) * Make conext public * Fix clippy DFParser should skip unsupported COPY INTO (#10) Skip CREATE STAGE by DFParser (pass to dialect parser) (#11) * DFParser should skip unsupported COPY INTO * Add tests * Add tests * Add tests * Add tests * Fmt * Fmt * Fmt Extend references with new Show* types (#14) Add e flag support (#16) * Add e flag support * Add e flag support * fix fmt * clippy return Int64 instead of UInt64 when returning count (#17) Revert commit: 314a726 (#18) * Revert "return Int64 instead of UInt64 when returning count (#17)" This reverts commit 314a726. * revert changes as of a bad approach use Bump sqlparser version to 0.55. Fixes after rebase named arguments for table functions (#20) TableFunction Fixes (#23) * TableFunction Fixes * Also fix tests after rebase * Taplo format * Clippy * Fix docs PIVOT command (#22) * Pivot initial changes * Polishing * Rebase fixes * Add slt tests * Add display for PIVOT * Only check projections in case of subqueries * Add builder test * Add default on null. Cargo fmt * Add default_on_null to proto and tests * Fix protoc and clippy * Cargo fmt Update parser version (#26) Fix incompatible type in IS NOT DISTINCT filter for PIVOT (#25) * Fix incompattible type in IS NOT DISTINCT filter * Cargo fmt * Cargo clippy UNPIVOT command (#24) * UNPIVOT command implementation * UNPIVOT command * Add slt tests * Taplo and cargo fmt * Resolve comments Update sql-parser Update parser update parser with fetch (#28) Enhance string concat coercion to support castable types (#27) * Allow any stringle types for concatination * Fix fmt Added basic support for table functions in relations (#29) * Add basic support for flatten join * Fix outer Update sqlparser-version Get table function in ascii lowercase (#30) * Get table function in ascii lowercase * Get table function in ascii lowercase Update parser version Update parser Allow boolean vs integer comparison (#31) * Allow comparison between boolean and int values * Allow comparison between boolean and int values * Add integer types * clippy+fmt+tests fix * tests fix * Fix incompatible types test * Fix slt test * Fix docs Fix unpivot. Columns result always in uppercase (#32) Update parser (#33) * Update parser * Update version * Update parser and external table * Fix external table * Fix external table `QUALIFY` clause implementation (#34) * Implement clause * Remove comment * Remove unimplemented Support projection in subquery with IN clause (#35) Update parser with SECURE keyword for views (#36) * Update parser with SECURE keyword for views * update rustc version for compatibility Decorellate subqueries in IN inside JOIN filter and Aggregates (#37)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
QUALIFY
idiomatically datafusion (without transpilation / logical plan hacks ) embucket#520