srielau opened a new pull request, #57251: URL: https://github.com/apache/spark/pull/57251
## What changes were proposed in this pull request? First stacked PR for [SPARK-58092](https://issues.apache.org/jira/browse/SPARK-58092) / [SPARK-58122](https://issues.apache.org/jira/browse/SPARK-58122): SQL surface area for ASOF JOIN only (parser, keywords, errors, feature flag, minimal logical plan). ### In scope - ANTLR grammar: `ASOF JOIN ... MATCH_CONDITION (left_expr op right_expr) [ON ... | USING ...]` - Keywords `ASOF` and `MATCH_CONDITION` (lexer, docs, golden files, JDBC metadata test) - `spark.sql.join.asofJoin.enabled` conf (default off) - Parse-time errors for disabled feature and invalid MATCH_CONDITION operators (`=`, `AND`, `OR`) - Minimal `AsOfJoin` extensions (`usingColumns`, `matchComparison`, `fromMatchCondition`) — plan stays unresolved until analysis lands - Tests: `PlanParserSuite` (asof join), `AsOfJoinSQLSuite` (parse error) ### Out of scope (follow-up PRs) - `ResolveAsOfJoin` / analysis validation - Sort-merge execution (`SortMergeAsOfJoinExec`, planner) - `spark.sql.join.sortMergeAsOfJoin.enabled` - Integration tests (`AsOfJoinSortMergeSQLSuite`) ## Why is this needed? Splits the large ASOF JOIN change into reviewable pieces. This PR is parser-only and should be zero user-visible behavior when the conf is off (default). ## Does this PR introduce any user-facing change? No, when `spark.sql.join.asofJoin.enabled` is false (default). When enabled, SQL parses to an unresolved `AsOfJoin` logical node; execution is not wired yet. ## How was this patch tested? ``` build/sbt "catalyst/testOnly org.apache.spark.sql.catalyst.parser.PlanParserSuite -- -z \"asof join\"" "sql/testOnly org.apache.spark.sql.AsOfJoinSQLSuite" ``` ## Was this patch authored or co-authored using generative AI tooling? Co-authored with Cursor. -- 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]
