You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Virgil Palanciuc (JIRA)" <ji...@apache.org> on 2016/09/19 18:14:20 UTC
[jira] [Reopened] (SPARK-17594) Bug in left-outer join
[ https://issues.apache.org/jira/browse/SPARK-17594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Virgil Palanciuc reopened SPARK-17594:
--------------------------------------
Reopening with the proper example
> Bug in left-outer join
> ----------------------
>
> Key: SPARK-17594
> URL: https://issues.apache.org/jira/browse/SPARK-17594
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.0.0
> Reporter: Virgil Palanciuc
>
> I have a bug where I think a left-join returns wrong results, by mistakenly matching long values that are identical on 32bits (differ in their upper halves).
> Instructions to reproduce
> {code}
> scala> val x = Seq((100L,17179869185L), (102L,17179869185L), (101L,17179869186L), (200L,17179869186L), (401L,1L), (500L,1L), (600L,8589934593L), (700L,8589934593L), (800L,8589934593L), (900L,8589934594L), (1000L,8589934594L), (1200L,2L), (1300L,2L), (1301L,2L), (1400L,17179869187L), (1500L,17179869188L), (1600L,8589934595L)).toDF("u","x1")
> x: org.apache.spark.sql.DataFrame = [u: bigint, x1: bigint]
> scala> val y = Seq((17179869187L,-8589934595L), (17179869188L,-8589934595L), (17179869185L,-8589934593L)).toDF("x2","y")
> y: org.apache.spark.sql.DataFrame = [x2: bigint, y: bigint]
> scala> x.join(y,'x1 === 'x2, "left_outer").show()
> {code}
> | u| x1| x2| y|
> | 100|17179869185|17179869185|-8589934593|
> | 102|17179869185|17179869185|-8589934593|
> | 101|17179869186| null| null|
> | 200|17179869186| null| null|
> | 401| 1|17179869185|-8589934593|
> | 500| 1|17179869185|-8589934593|
> | 600| 8589934593|17179869185|-8589934593|
> | 700| 8589934593|17179869185|-8589934593|
> | 800| 8589934593|17179869185|-8589934593|
> | 900| 8589934594| null| null|
> |1000| 8589934594| null| null|
> |1200| 2| null| null|
> |1300| 2| null| null|
> |1301| 2| null| null|
> |1400|17179869187|17179869187|-8589934595|
> |1500|17179869188|17179869188|-8589934595|
> |1600| 8589934595|17179869187|-8589934595|
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org