[
https://issues.apache.org/jira/browse/SPARK-59299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Uroš Bojanić updated SPARK-59299:
---------------------------------
Component/s: Tests
> Add missing ASOF JOIN parser unit tests
> ---------------------------------------
>
> Key: SPARK-59299
> URL: https://issues.apache.org/jira/browse/SPARK-59299
> Project: Spark
> Issue Type: Improvement
> Components: SQL, Tests
> Affects Versions: 5.0.0
> Reporter: Luka Zdravic
> Assignee: Luka Zdravic
> Priority: Minor
> Labels: pull-request-available
>
> PlanParserSuite covers SQL ASOF JOIN parsing (SPARK-58122) but is missing
> several cases relative to the ASOF JOIN SQL reference.
> This test-only change adds them:
> 1. Positive parsing of the `>` (GreaterThanOp) and `<` (LessThanOp) match
> operators
> (only `>=` and `<=` were asserted).
> 2. A STRUCT / tuple MATCH_CONDITION, e.g. `(t.a, t.b) >= (u.a, u.b)`, which
> parses to a row constructor (CreateStruct) on each side; pins that the
> top-level comparison is still extracted as the match operator (lexicographic
> multi-column match).
> 3. Explicit `INNER ASOF` and `LEFT OUTER ASOF` join types (only implicit
> INNER and bare LEFT were covered).
> 4. Rejection of a top-level `OR` in MATCH_CONDITION (exercises the previously
> untested Or branch of ASOF_JOIN_MATCH_CONDITION_INVALID_OPERATOR).
> 5. Multi-column USING (a, b) — only single-column USING (b) was
> documented/covered; the new case asserts usingColumns = Some(Seq("a", "b")).
> 6. Rejection of a non-comparison MATCH_CONDITION — MATCH_CONDITION (t.a) (a
> bare column, no top-level comparison), which hits the getOriginalText
> fallback of the ASOF_JOIN_MATCH_CONDITION_INVALID_OPERATOR path — a branch
> none of the existing =/<>/<=>/AND/OR rejection tests reach.
> No production code changes. Verified by running PlanParserSuite.
> Umbrella: SPARK-59298
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]