Add StringView support in PrestoIterativePartitioningSerializer#1861
Open
xin-zhang2 wants to merge 3 commits into
Open
Add StringView support in PrestoIterativePartitioningSerializer#1861xin-zhang2 wants to merge 3 commits into
xin-zhang2 wants to merge 3 commits into
Conversation
a4c9ff4 to
61d9860
Compare
55d3fc4 to
24cb922
Compare
61d9860 to
59ca55a
Compare
yingsu00
reviewed
Apr 2, 2026
| for (uint32_t p = 0; p < numPartitions; ++p) { | ||
| const auto offset = rawPartitionOffsets[p]; | ||
| for (auto i = lastOffset; i < offset; ++i) { | ||
| if (!rawNulls || !bits::isBitNull(rawNulls, i)) { |
Collaborator
There was a problem hiding this comment.
Separate the inner loop into two separate loops by checking partitionedVector->numNullsAt(p)
- this partition doesn't have nulls at all
- this partition has nulls
This will improve performance for the no nulls case.
| for (uint32_t p = 0; p < numPartitions_; ++p) { | ||
| const auto offset = partitionOffsets[p]; | ||
| if (outputStreams[p] != nullptr) { | ||
| for (vector_size_t i = lastOffset; i < offset; ++i) { |
Collaborator
There was a problem hiding this comment.
Same as above, separate the inner loop into two. See line 639 for an example.
You can add a benchmark for StringView to verify the perf difference.
| for (uint32_t p = 0; p < numPartitions_; ++p) { | ||
| const auto offset = partitionOffsets[p]; | ||
| if (outputStreams[p] != nullptr) { | ||
| for (vector_size_t i = lastOffset; i < offset; ++i) { |
0292160 to
51197ca
Compare
yingsu00
reviewed
Apr 9, 2026
Collaborator
yingsu00
left a comment
There was a problem hiding this comment.
@xin-zhang2 Could you please add stringview to the benchmark?
51197ca to
4808bf7
Compare
Member
Author
Benchmark Results |
70ad998 to
211901c
Compare
4808bf7 to
2a16457
Compare
2a16457 to
6e9146e
Compare
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.
No description provided.