[MINOR] refactor: avoid unnecessary bitmap clone and AND - #1442
Merged
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1442 +/- ##
============================================
+ Coverage 53.38% 54.29% +0.91%
- Complexity 2729 2730 +1
============================================
Files 422 402 -20
Lines 24046 21686 -2360
Branches 2051 2051
============================================
- Hits 12836 11775 -1061
+ Misses 10412 9185 -1227
+ Partials 798 726 -72 ☔ View full report in Codecov by Sentry. |
Member
|
Thanks @EnricoMi for your contribution. Welcome to Apache Uniffle community 👏🏻 |
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?
Add note that
processedBlockIdscan be a superset ofblockIdBitmap. Add quick check ifprocessedBlockIdsis equal toblockIdBitmap. In that case, there is no need to clone andANDthe bitmaps.Why are the changes needed?
The logic is equivalent but more performant when
processedBlockIdsis not a superset ofblockIdBitmap(when no other blocks than theblockIdBitmapare retrieved).Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing tests in
ShuffleReadClientImplTestcover this.