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
feat(array): refactor StreamChunk
& introduce record iterator
#1916
Conversation
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Codecov Report
@@ Coverage Diff @@
## main #1916 +/- ##
==========================================
+ Coverage 70.62% 70.88% +0.25%
==========================================
Files 611 617 +6
Lines 80064 79990 -74
==========================================
+ Hits 56543 56697 +154
+ Misses 23521 23293 -228
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
LGTM! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM.
And a question: what's the benefit from doing so?
Actually the main purpose of this PR is to reuse the row-level iterator of data chunk in #1905 for stream chunk. For |
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
What's changed and what's your intention?
In this PR, we refactor
StreamChunk
withops
anddata_chunk
instead of unzipping the data chunk into parts, so that we can reuse some functionalities ofDataChunk
.https://github.com/singularity-data/risingwave/blob/1228f9272c6e7bcce9db86f7f7c982a1bc5032e0/src/common/src/array/stream_chunk.rs#L72-L79
Then, we remove the
StreamChunkRowRef
introduced in #1813 and provide a record iterator based onDataChunkRowRef
whose item is...https://github.com/singularity-data/risingwave/blob/1cc6400140e40843de46f79f2a575da6989a206d/src/common/src/array/stream_chunk_iter.rs#L74-L82
Some executors can be benefited from this record-style interface. For now, we keep the row interface for compatibility.
Benchmark
Checklist
Refer to a related PR or issue link (optional)
StreamChunk::rows
to iterate on rows #1839DataChunk
likeStreamChunk
#1840