Xuanwo opened a new pull request, #23830: URL: https://github.com/apache/datafusion/pull/23830
## Which issue does this PR close? - Part of #318. - Umbrella PR: #23738. - Depends on #23829 (and transitively #23828). ## 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: https://github.com/Xuanwo/datafusion/compare/xuanwo/asof-logical...xuanwo/asof-sql ## What changes are included in this PR? - Plan `ASOF JOIN ... MATCH_CONDITION (...)` with optional `ON` or `USING` equality keys. - Reject unsupported match shapes and non-equality `ON` predicates. - Unparse ASOF joins while preserving right-side candidate preselection and nested join scope. - Document the supported SQL syntax and semantics. - Add SQL integration and sqllogictest coverage for all four match directions, 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-dirty` - `cargo clippy --all-targets --all-features -- -D warnings` - `cargo test -p datafusion --test core_integration sql::joins::asof_join --all-features` - `cargo test -p datafusion-sqllogictest --test sqllogictests -- asof_join` - Extended workspace tests from the contributor guide ## Are there any user-facing changes? Users can express Snowflake-style ASOF joins in SQL with `MATCH_CONDITION`, optional equality keys, and `<`, `<=`, `>`, or `>=` match directions. 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 `main` without rewriting its published history. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
