Skip to content

Conversation

@srowen
Copy link
Member

@srowen srowen commented Oct 8, 2019

What changes were proposed in this pull request?

Invocations like sc.parallelize(Array((1,2))) cause a compile error in 2.13, like:

[ERROR] [Error] /Users/seanowen/Documents/spark_2.13/core/src/test/scala/org/apache/spark/ShuffleSuite.scala:47: overloaded method value apply with alternatives:
  (x: Unit,xs: Unit*)Array[Unit] <and>
  (x: Double,xs: Double*)Array[Double] <and>
  (x: Float,xs: Float*)Array[Float] <and>
  (x: Long,xs: Long*)Array[Long] <and>
  (x: Int,xs: Int*)Array[Int] <and>
  (x: Char,xs: Char*)Array[Char] <and>
  (x: Short,xs: Short*)Array[Short] <and>
  (x: Byte,xs: Byte*)Array[Byte] <and>
  (x: Boolean,xs: Boolean*)Array[Boolean]
 cannot be applied to ((Int, Int), (Int, Int), (Int, Int), (Int, Int))

Using a Seq instead appears to resolve it, and is effectively equivalent.

Why are the changes needed?

To better cross-build for 2.13.

Does this PR introduce any user-facing change?

None.

How was this patch tested?

Existing tests.

@srowen srowen self-assigned this Oct 8, 2019
@SparkQA
Copy link

SparkQA commented Oct 9, 2019

Test build #111923 has finished for PR 26062 at commit c43aa71.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-29401][CORE][ML] Replace calls to .parallelize Arrays of tuples, ambiguous in Scala 2.13, with Seqs of tuples [SPARK-29401][CORE][ML][SQL][GRAPHX] Replace calls to .parallelize Arrays of tuples, ambiguous in Scala 2.13, with Seqs of tuples Oct 9, 2019
@dongjoon-hyun dongjoon-hyun changed the title [SPARK-29401][CORE][ML][SQL][GRAPHX] Replace calls to .parallelize Arrays of tuples, ambiguous in Scala 2.13, with Seqs of tuples [SPARK-29401][CORE][ML][SQL][GRAPHX][TESTS] Replace calls to .parallelize Arrays of tuples, ambiguous in Scala 2.13, with Seqs of tuples Oct 9, 2019
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. These are all test suite (except one graphx doc fix).
Merged to master.

@srowen srowen deleted the SPARK-29401 branch October 9, 2019 14:10
dongjoon-hyun pushed a commit that referenced this pull request Oct 9, 2019
…th Array is ambiguous in 2.13

This is just a followup on #26062 -- see it for more detail.

I think we will eventually find more cases of this. It's hard to get them all at once as there are many different types of compile errors in earlier modules. I'm trying to address them in as a big a chunk as possible.

Closes #26074 from srowen/SPARK-29401.2.

Authored-by: Sean Owen <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
atronchi pushed a commit to atronchi/spark that referenced this pull request Oct 23, 2019
…lize Arrays of tuples, ambiguous in Scala 2.13, with Seqs of tuples

### What changes were proposed in this pull request?

Invocations like `sc.parallelize(Array((1,2)))` cause a compile error in 2.13, like:
```
[ERROR] [Error] /Users/seanowen/Documents/spark_2.13/core/src/test/scala/org/apache/spark/ShuffleSuite.scala:47: overloaded method value apply with alternatives:
  (x: Unit,xs: Unit*)Array[Unit] <and>
  (x: Double,xs: Double*)Array[Double] <and>
  (x: Float,xs: Float*)Array[Float] <and>
  (x: Long,xs: Long*)Array[Long] <and>
  (x: Int,xs: Int*)Array[Int] <and>
  (x: Char,xs: Char*)Array[Char] <and>
  (x: Short,xs: Short*)Array[Short] <and>
  (x: Byte,xs: Byte*)Array[Byte] <and>
  (x: Boolean,xs: Boolean*)Array[Boolean]
 cannot be applied to ((Int, Int), (Int, Int), (Int, Int), (Int, Int))
```
Using a `Seq` instead appears to resolve it, and is effectively equivalent.

### Why are the changes needed?

To better cross-build for 2.13.

### Does this PR introduce any user-facing change?

None.

### How was this patch tested?

Existing tests.

Closes apache#26062 from srowen/SPARK-29401.

Authored-by: Sean Owen <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
atronchi pushed a commit to atronchi/spark that referenced this pull request Oct 23, 2019
…th Array is ambiguous in 2.13

This is just a followup on apache#26062 -- see it for more detail.

I think we will eventually find more cases of this. It's hard to get them all at once as there are many different types of compile errors in earlier modules. I'm trying to address them in as a big a chunk as possible.

Closes apache#26074 from srowen/SPARK-29401.2.

Authored-by: Sean Owen <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants