[
https://issues.apache.org/jira/browse/SPARK-59628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18119132#comment-18119132
]
Anmol Mishra commented on SPARK-59628:
--------------------------------------
[~lukazdravic]
Just wanted to check if there’s any coordination around who’s picking up which
ticket ?
I spent some time on this and submitted a PR, but it looks like you were also
working on it afterward, so we ended up duplicating effort. Is there a way we
can improve coordination to avoid this going forward?
> ASOF JOIN silently ignores a missing MATCH_CONDITION when the left table has
> no alias
> -------------------------------------------------------------------------------------
>
> Key: SPARK-59628
> URL: https://issues.apache.org/jira/browse/SPARK-59628
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 5.0.0
> Reporter: Luka Zdravic
> Priority: Minor
> Labels: pull-request-available
>
> MATCH_CONDITION is required for ASOF JOIN. When it is missing and the left
> table has no alias, the parser does not fail. It reads the ASOF keyword as
> the alias of the left table and builds a plain INNER JOIN. The query then
> runs and returns wrong results with no error.
>
> Repro:
> SELECT * FROM t ASOF JOIN u ON t.a = u.a;
> Parsed (unresolved) plan, no error:
> 'Project [*]
> +- 'Join Inner, ('t.a = 'u.a)
> :- 'SubqueryAlias asof
> : +- 'UnresolvedRelation [t]
> +- 'UnresolvedRelation [u]
> The ASOF keyword was consumed as the alias "asof" of table t.
>
> Expected: fail with a clear error that MATCH_CONDITION is required for ASOF
> JOIN.
> 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]