vranes opened a new pull request, #58657: URL: https://github.com/apache/spark/pull/58657
### What changes were proposed in this pull request? This PR adds test coverage for the SQL `ASOF JOIN` `MATCH_CONDITION` clause. It changes tests only; there is no production code change. `AsOfJoinSQLSuite` (analysis): - A `MATCH_CONDITION` with two literal operands passes analysis. - A literal operand that lands on the same join side as a column operand is rejected with `ASOF_JOIN_MATCH_CONDITION_TABLE_REFERENCE`. - Array-of-struct operands whose element structs differ in both field name and type are rejected with `DATATYPE_MISMATCH.BINARY_OP_DIFF_TYPES`. `AsOfJoinSortMergeSQLSuite` (execution through the sort-merge operator): - An array-of-struct `MATCH_CONDITION` with compatible but not identical element field types selects the correct nearest match. - A scalar `INT` vs `STRING` `MATCH_CONDITION` is string-promoted and compared lexicographically. ### Why are the changes needed? The SQL `ASOF JOIN` `MATCH_CONDITION` path lacked coverage for several operand edge cases: literal operands and their join-side assignment, array-of-struct element name and type combinations, and cross-type comparison. These tests exercise those cases and pin the current behavior, including inputs that surface a generic type-mismatch error. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Added unit tests in `AsOfJoinSQLSuite` and `AsOfJoinSortMergeSQLSuite`. Both suites pass locally: `AsOfJoinSQLSuite` (19 tests) and `AsOfJoinSortMergeSQLSuite` (33 tests). ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8) This pull request and its description were written by Isaac. -- 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]
