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-45698][CORE][SQL][SS] Clean up the deprecated API usage related to Buffer #43551

Closed
wants to merge 2 commits into from

Conversation

LuciferYang
Copy link
Contributor

@LuciferYang LuciferYang commented Oct 27, 2023

What changes were proposed in this pull request?

This PR cleans up the use of the following APIs in s.c.mutable.Buffer, as they have been deprecated after Scala 2.13.0 or Scala 2.13.4:

  • trimStart -> dropInPlace
  • trimEnd -> dropRightInPlace
  • append(elems: A*) -> appendAll
  • prepend(elems: A*) -> prependAll(elems)
  @deprecated("use dropInPlace instead", since = "2.13.4")
  def trimStart(n: Int): Unit = dropInPlace(n)

  @deprecated("use dropRightInPlace instead", since = "2.13.4")
  def trimEnd(n: Int): Unit = dropRightInPlace(n)

  @deprecated("Use appendAll instead", "2.13.0")
  @`inline` final def append(elems: A*): this.type = addAll(elems)

  @deprecated("Use prependAll instead", "2.13.0")
  @`inline` final def prepend(elems: A*): this.type = prependAll(elems)

Why are the changes needed?

Clean up deprecated API usage.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Pass GitHub Acitons.

Was this patch authored or co-authored using generative AI tooling?

No

@LuciferYang LuciferYang marked this pull request as draft October 27, 2023 05:49
@LuciferYang LuciferYang changed the title [SPARK-45698] Clean up the deprecated API usage related to Buffer [SPARK-45698][CORE][SQL][SS] Clean up the deprecated API usage related to Buffer Oct 27, 2023
@LuciferYang LuciferYang marked this pull request as ready for review October 27, 2023 06:15
@MaxGekk
Copy link
Member

MaxGekk commented Oct 27, 2023

+1, LGTM. Merging to master.
Thank you, @LuciferYang and @HyukjinKwon for review.

@MaxGekk MaxGekk closed this in d072833 Oct 27, 2023
@LuciferYang
Copy link
Contributor Author

Thanks @MaxGekk @HyukjinKwon

Copy link
Contributor

@beliefer beliefer left a comment

Choose a reason for hiding this comment

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

LGTM later.

@LuciferYang LuciferYang deleted the buffer-deprecated branch November 10, 2023 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants