Luka Zdravic created SPARK-59627:
------------------------------------

             Summary: ASOF JOIN gives a generic syntax error for unsupported 
join types
                 Key: SPARK-59627
                 URL: https://issues.apache.org/jira/browse/SPARK-59627
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 5.0.0
            Reporter: Luka Zdravic


The ASOF JOIN grammar allows only INNER or LEFT [OUTER] before ASOF. Any other 
join type is rejected at parse time, but with a generic PARSE_SYNTAX_ERROR that 
does not tell the user which join type is not allowed.
 

Repro (each fails with PARSE_SYNTAX_ERROR):
    SELECT * FROM l RIGHT ASOF JOIN r MATCH_CONDITION (l.ts >= r.ts);
    SELECT * FROM l FULL  ASOF JOIN r MATCH_CONDITION (l.ts >= r.ts);
    SELECT * FROM l CROSS ASOF JOIN r MATCH_CONDITION (l.ts >= r.ts);
Example message: "Syntax error at or near 'asof': extra input 'asof'".
 

Expected: a clear error that names the incompatible join type, e.g.
  "The join types ASOF and RIGHT OUTER are incompatible."

Umbrella: SPARK-59626



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to