[ 
https://issues.apache.org/jira/browse/SPARK-60000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SPARK-60000:
-----------------------------------
    Labels: pull-request-available  (was: )

> MATCH_CONDITION rejects a column hidden by a nested USING join. ON accepts it.
> ------------------------------------------------------------------------------
>
>                 Key: SPARK-60000
>                 URL: https://issues.apache.org/jira/browse/SPARK-60000
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 4.4.0
>            Reporter: Luka Zdravic
>            Priority: Minor
>              Labels: pull-request-available
>
> {code:sql}
>   
>   -- fails: [ASOF_JOIN_MATCH_CONDITION_TABLE_REFERENCE] ... Got: "lts" and 
> "k".
>   SELECT l.lts, r.rts
>   FROM (VALUES (1, 10), (2, 20)) AS l(k, lts)
>   ASOF JOIN ((VALUES (1, 5), (2, 15)) AS r(k, rts) JOIN (VALUES (1), (2)) AS 
> d(k) USING (k))
>     MATCH_CONDITION (l.lts >= d.k);
>     
>   -- works:
>   SELECT l.lts, r.rts
>   FROM (VALUES (1, 10), (2, 20)) AS l(k, lts)
>   JOIN ((VALUES (1, 5), (2, 15)) AS r(k, rts) JOIN (VALUES (1), (2)) AS d(k) 
> USING (k))
>     ON l.lts >= d.k;
>   {code}
> Cause: the side check looks only at visible columns (left.outputSet / 
> right.outputSet in ResolveAsOfJoin), so d.k has no side.
> Expected: the ASOF query returns (10, 15) and (20, 15).
> Assigned to : [~lukazdravic] 



--
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