feat: support ASOF JOIN SQL#23830
Draft
Xuanwo wants to merge 6 commits into
Draft
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #23830 +/- ##
==========================================
- Coverage 80.75% 80.74% -0.01%
==========================================
Files 1089 1090 +1
Lines 368948 370643 +1695
Branches 368948 370643 +1695
==========================================
+ Hits 297952 299291 +1339
- Misses 53237 53479 +242
- Partials 17759 17873 +114 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thank you for opening this pull request! Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch). Details |
This was referenced Jul 23, 2026
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
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.
Which issue does this PR close?
Rationale for this change
This is the SQL frontend layer of the ASOF JOIN stack. It adds syntax and
unparsing only after the physical and logical contracts have been separated
into their own reviewable PRs.
GitHub shows the cumulative stack because fork branches cannot be selected as
upstream PR bases. The isolated diff for this layer is:
Xuanwo/datafusion@xuanwo/asof-logical...xuanwo/asof-sql
What changes are included in this PR?
ASOF JOIN ... MATCH_CONDITION (...)with optionalONorUSINGequality keys.
ONpredicates.nested join scope.
coercion, equality-free joins, USING, invalid contracts, EXPLAIN, boundedness,
and optimized-plan round trips.
Are these changes tested?
Yes:
cargo fmt --all./ci/scripts/doc_prettier_check.sh --write --allow-dirtycargo clippy --all-targets --all-features -- -D warningscargo test -p datafusion --test core_integration sql::joins::asof_join --all-featurescargo test -p datafusion-sqllogictest --test sqllogictests -- asof_joinAre there any user-facing changes?
Users can express Snowflake-style ASOF joins in SQL with
MATCH_CONDITION, optional equality keys, and<,<=,>, or>=matchdirections. The user guide documents the contract and examples.
This PR should be reviewed and merged after #23829. After its dependencies
squash-merge, this branch will be refreshed from
mainwithout rewriting itspublished history.