Skip to content

chore: Update the InternalRow Trait: get_binary, get_bytes to return &[u8]#104

Merged
luoyuxia merged 2 commits into
apache:mainfrom
Kelvinyu1117:feat/optimize-internal-row
Dec 21, 2025
Merged

chore: Update the InternalRow Trait: get_binary, get_bytes to return &[u8]#104
luoyuxia merged 2 commits into
apache:mainfrom
Kelvinyu1117:feat/optimize-internal-row

Conversation

@Kelvinyu1117
Copy link
Copy Markdown
Contributor

@Kelvinyu1117 Kelvinyu1117 commented Dec 20, 2025

Purpose

Linked issue: close #85

Update the InternalRow Trait: get_binary, get_bytes to return &[u8]. However, I keep the C++ binding to use vector for now as it might require some changes to the FfiDatum.

Brief change log

Tests

API and Format

Documentation

@Kelvinyu1117
Copy link
Copy Markdown
Contributor Author

@luoyuxia Would you mind to take a look when you have time?
Thanks!

Comment thread crates/fluss/src/row/mod.rs Outdated

fn get_bytes(&self, pos: usize) -> Vec<u8> {
self.values.get(pos).unwrap().as_blob().to_vec()
fn get_bytes(&self, pos: usize) -> &[u8] {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, formatting: there's an additional space before &[u8]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

Copy link
Copy Markdown
Contributor

@luoyuxia luoyuxia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kelvinyu1117 Thanks. LGTM!

@luoyuxia luoyuxia merged commit c883de5 into apache:main Dec 21, 2025
13 checks passed
zhaohaidao pushed a commit to zhaohaidao/fluss-rust that referenced this pull request Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InternalRow get_binary and get_bytes should return & [u8] to avoid bytes copy

3 participants