[ 
https://issues.apache.org/jira/browse/SPARK-17594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15504285#comment-15504285
 ] 

Virgil Palanciuc commented on SPARK-17594:
------------------------------------------

It's not - initially my example was about the ArrayOutOfBounds exception, which 
you're right, had already been reported. But I got that exception when trying 
to reproduce this issue, and now I actually reproduced it: the issue is wrong 
results with left-join, that didn't occur with spark 1.6, and doesn't occur if 
I use "<=>" instead of "===" for join.

I'll try with master and let you know if it works.

> 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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to