Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-38337][CORE][SQL][DSTREAM][MLLIB] Replace toIterator with iterator for IterableLike/IterableOnce to cleanup deprecated api usage #35665

Closed

Conversation

LuciferYang
Copy link
Contributor

What changes were proposed in this pull request?

In Scala 2.12, IterableLike.toIterator identified as @deprecatedOverriding:

@deprecatedOverriding("toIterator should stay consistent with iterator for all Iterables: override iterator instead.", "2.11.0")
override def toIterator: Iterator[A] = iterator

In Scala 2.13, IterableOnce.toIterator identified as @deprecated:

  @deprecated("Use .iterator instead of .toIterator", "2.13.0")
  @`inline` final def toIterator: Iterator[A] = iterator

This PR replaces toIterator with iterator as recommended by scaladoc as above.

Why are the changes needed?

Cleanup deprecated api usage

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Pass GA

@HyukjinKwon
Copy link
Member

Merged to master.

@LuciferYang
Copy link
Contributor Author

thanks @HyukjinKwon

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, late LGTM.

@LuciferYang
Copy link
Contributor Author

thanks @dongjoon-hyun

@LuciferYang LuciferYang deleted the toIterator-is-deprecated branch October 22, 2023 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants