[
https://issues.apache.org/jira/browse/SPARK-59627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Luka Zdravic updated SPARK-59627:
---------------------------------
Description:
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
was:
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."
[~lukazdravic] will fix this
Umbrella: SPARK-59626
> 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
> Priority: Minor
> Labels: pull-request-available
>
> 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]