Skip to content

chore: optimize get_char method#105

Merged
luoyuxia merged 1 commit into
mainfrom
get_char_optimize
Dec 21, 2025
Merged

chore: optimize get_char method#105
luoyuxia merged 1 commit into
mainfrom
get_char_optimize

Conversation

@luoyuxia
Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #xxx

Brief change log

Tests

API and Format

Documentation

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR optimizes the get_char method in the InternalRow trait and its implementations by changing the return type from String to &str and removing length validation to align with Java client behavior.

Key Changes:

  • Modified the InternalRow::get_char() trait method signature to return &str instead of String
  • Removed length validation logic from both GenericRow and ColumnarRow implementations
  • Changed UTF-8 error handling in ColumnarRow from lossy conversion to strict validation with panic

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
crates/fluss/src/row/mod.rs Updated trait signature and GenericRow implementation to return borrowed string reference and removed length validation
crates/fluss/src/row/column.rs Updated ColumnarRow implementation to return borrowed string reference, removed length check and lossy UTF-8 fallback

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/fluss/src/row/mod.rs
Comment thread crates/fluss/src/row/mod.rs Outdated
Comment thread crates/fluss/src/row/column.rs
Comment thread crates/fluss/src/row/mod.rs Outdated
@luoyuxia luoyuxia merged commit e3728fc into main Dec 21, 2025
13 checks passed
zhaohaidao pushed a commit to zhaohaidao/fluss-rust that referenced this pull request Jan 21, 2026
@luoyuxia luoyuxia deleted the get_char_optimize branch February 5, 2026 23:44
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.

2 participants