GitHub user sadhen reopened a pull request:
https://github.com/apache/spark/pull/22264
[SPARK-25256][SQL] Plan mismatch errors in Hive tests in 2.12
## What changes were proposed in this pull request?
### For `SPARK-5775 read array from
partitioned_parquet_with_key_and_complextypes`:
scala2.12
```
scala> (1 to 10).toString
res4: String = Range 1 to 10
```
scala2.11
```
scala> (1 to 10).toString
res2: String = Range(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
```
And
```
def prepareAnswer(answer: Seq[Row], isSorted: Boolean): Seq[Row] = {
val converted: Seq[Row] = answer.map(prepareRow)
if (!isSorted) converted.sortBy(_.toString()) else converted
}
```
sortBy `_.toString` is not a good idea.
### Other failures are caused by
```
Array(Int.box(1)).toSeq == Array(Double.box(1.0)).toSeq
```
It is false in 2.12.2 + and is true in 2.11.x , 2.12.0, 2.12.1
## How was this patch tested?
This is a patch on a specific unit test.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sadhen/spark SPARK25256
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/22264.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #22264
----
commit 8d009e1d4bc9582cf349474a9e61086690cf3943
Author: å¿å¬ <rendong@...>
Date: 2018-08-29T08:16:26Z
fix equality for Range and WrappedArray
commit d7f2e3763cfd03f537eaef98a34a5e7eac5d3d6d
Author: å¿å¬ <rendong@...>
Date: 2018-08-30T03:35:14Z
fix equlity for WrappedArray.ofRef
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]