Skip to content

Comments

[SPARK-30566][BUILD] Iterator doesn't refer outer identifier named "iterator" properly in Scala 2.13#27275

Closed
sarutak wants to merge 1 commit intoapache:masterfrom
sarutak:fix-iterator-for-2.13
Closed

[SPARK-30566][BUILD] Iterator doesn't refer outer identifier named "iterator" properly in Scala 2.13#27275
sarutak wants to merge 1 commit intoapache:masterfrom
sarutak:fix-iterator-for-2.13

Conversation

@sarutak
Copy link
Member

@sarutak sarutak commented Jan 18, 2020

What changes were proposed in this pull request?

Renamed an identifier iterator to iter to avoid compile error with Scala 2.13.

Why are the changes needed?

As of Scala 2.13, scala.collection.Iterator has "iterator" method so if an inner class of Iterator means to refer an outer identifier named "iterator", it does not work as we think.
I listed source files that can be affected by that change by find . -name "*.scala" -exec grep -El "new .*Iterator\[.* +{" {} \;
As far as I confirmed util.Utils` is affected.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing tests.

@SparkQA
Copy link

SparkQA commented Jan 18, 2020

Test build #116981 has finished for PR 27275 at commit df1af67.

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

@srowen
Copy link
Member

srowen commented Jan 18, 2020

Looks fine. I don't remember that one in my local build for 2.13 but who knows :)
I am sitting on a number of changes for 2.13, and happy to work with you on those if you are too.

@HyukjinKwon
Copy link
Member

Merged to master.

@sarutak
Copy link
Member Author

sarutak commented Jan 21, 2020

@srowen Yeah, I'll tackle those issues for Scala 2.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants