[
https://issues.apache.org/jira/browse/SPARK-62246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wenchen Fan resolved SPARK-62246.
---------------------------------
Fix Version/s: 5.0.0
Resolution: Fixed
Issue resolved by pull request 60796
[https://github.com/apache/spark/pull/60796]
> DataFrame as-of join with using columns returns the key column of both sides
> ----------------------------------------------------------------------------
>
> Key: SPARK-62246
> URL: https://issues.apache.org/jira/browse/SPARK-62246
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 4.4.0
> Reporter: Luka Zdravic
> Assignee: Luka Zdravic
> Priority: Minor
> Labels: pull-request-available
> Fix For: 5.0.0
>
>
> Dataset.joinAsOf(..., usingColumns, ...) turns each using column into
> left(name) === right(name). So the output keeps the key column of both sides,
> and select("sym") fails with AMBIGUOUS_REFERENCE. SQL ASOF JOIN ... USING
> (sym) and a regular join(other, Seq("sym")) return one key column, placed
> first.
> SQL: ASOF JOIN quotes ... USING (sym) -> sym, tt, qty, qt, bid
> DataFrame: joinAsOf(..., usingColumns = ["sym"]) -> tt, sym, qty, qt, sym,
> bid
> PySpark DataFrame._joinAsOf(on="sym") and Spark Connect take the same path.
> Fix: build the AsOfJoin with usingColumns, as SQL does.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]