-
Notifications
You must be signed in to change notification settings - Fork 590
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(java-binding): store java binding row in iter #12533
Conversation
Codecov Report
@@ Coverage Diff @@
## main #12533 +/- ##
==========================================
- Coverage 69.31% 69.31% -0.01%
==========================================
Files 1469 1469
Lines 241031 241009 -22
==========================================
- Hits 167073 167048 -25
- Misses 73958 73961 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
LGTM
Co-authored-by: William Wen <[email protected]>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Previously, in our java binding iterator, the
next
method returns newly allocated row pointer. This is bad design because we should the cost of allocation is considerable, and more importantly, it is very easy for users to forget to release the row pointer.In this PR, we change to store the row inside the java binding iterator. In this way, we don't have to allocate a new row in each
next
call, and we don't have to carefully remember to close it.After this PR, the
SinkRow
is notAutoClosable
any more, and we don't have to wrap the rows returned fromnext
with a try-with-resource to release the row.Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.