[SPARK-45602][CORE][SQL][SS][YARN][K8S] Replace s.c.MapOps.filterKeys with s.c.MapOps.view.filterKeys#43445
Closed
LuciferYang wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-45602][CORE][SQL][SS][YARN][K8S] Replace s.c.MapOps.filterKeys with s.c.MapOps.view.filterKeys#43445LuciferYang wants to merge 1 commit intoapache:masterfrom
s.c.MapOps.filterKeys with s.c.MapOps.view.filterKeys#43445LuciferYang wants to merge 1 commit intoapache:masterfrom
Conversation
HyukjinKwon
approved these changes
Oct 19, 2023
s.c.MapOps.filterKeys with s.c.MapOps.view.filterKeyss.c.MapOps.filterKeys with s.c.MapOps.view.filterKeys
Contributor
Author
|
Merged into master for Spark 4.0. Thanks @HyukjinKwon |
LuciferYang
commented
Dec 4, 2023
|
|
||
| val startOffsets = newPartitionOffsets ++ | ||
| oldStartPartitionOffsets.filterKeys(!deletedPartitions.contains(_)) | ||
| oldStartPartitionOffsets.view.filterKeys(!deletedPartitions.contains(_)) |
Contributor
Author
There was a problem hiding this comment.
@cloud-fan This PR replaces s.c.MapOps.filterKeys with s.c.MapOps.view.filterKeys, which is similar to #43448 (comment). Does this also seem verbose to you? Should we replace it with another function, such as filter? Or do you have any better suggestions?
Contributor
Author
There was a problem hiding this comment.
Okay, I will submit a pr.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This pr replace
s.c.MapOps.filterKeyswiths.c.MapOps.view.filterKeysdue tos.c.MapOps.filterKeysmarked as deprecated since Scala 2.13.0:https://github.com/scala/scala/blob/bf45e199e96383b96a6955520d7d2524c78e6e12/src/library/scala/collection/Map.scala#L248-L254
Why are the changes needed?
Cleanup 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