[
https://issues.apache.org/jira/browse/SPARK-62245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wenchen Fan resolved SPARK-62245.
---------------------------------
Fix Version/s: 4.4.0
Resolution: Fixed
Issue resolved by pull request 60820
[https://github.com/apache/spark/pull/60820]
> DataFrame as-of join drops a right row exactly at the tolerance when
> allowExactMatches is false
> -----------------------------------------------------------------------------------------------
>
> Key: SPARK-62245
> URL: https://issues.apache.org/jira/browse/SPARK-62245
> 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: 4.4.0
>
>
> Dataset.joinAsOf with a tolerance and allowExactMatches = false also makes
> the tolerance bound strict. So a right row exactly `tolerance` away from the
> left row is dropped. SQL ASOF JOIN and pandas merge_asof keep it.
> pyspark.pandas.merge_asof has the same problem.
> Example: left key 5, right key 3, tolerance 2, backward, allowExactMatches =
> false.
> - SQL ASOF JOIN and pandas merge_asof: match 3.
> - DataFrame joinAsOf and pyspark.pandas.merge_asof: no match.
> Fix: allowExactMatches changes only the match itself (> instead of >=). The
> tolerance bound stays inclusive. The code comes from SPARK-36813.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]