This is an automated email from the ASF dual-hosted git repository.

yuxia pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluss-rust.git


The following commit(s) were added to refs/heads/main by this push:
     new eaf5a24  feat: Fix TableLookup so that SchemaId field bytes are not 
passed to CompactedRow::from_bytes(), these fields can be skipped as current 
rust client implementation does not check schema and already passes row_type 
(#190)
eaf5a24 is described below

commit eaf5a24ea95a7b92b1fcb9c388717ceecd0771ef
Author: Keith Lee <[email protected]>
AuthorDate: Wed Jan 21 12:56:37 2026 +0000

    feat: Fix TableLookup so that SchemaId field bytes are not passed to 
CompactedRow::from_bytes(), these fields can be skipped as current rust client 
implementation does not check schema and already passes row_type (#190)
---
 crates/fluss/src/client/table/lookup.rs | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/crates/fluss/src/client/table/lookup.rs 
b/crates/fluss/src/client/table/lookup.rs
index cd23503..4e89176 100644
--- a/crates/fluss/src/client/table/lookup.rs
+++ b/crates/fluss/src/client/table/lookup.rs
@@ -20,6 +20,7 @@ use crate::client::connection::FlussConnection;
 use crate::client::metadata::Metadata;
 use crate::error::{Error, Result};
 use crate::metadata::{RowType, TableBucket, TableInfo};
+use crate::record::kv::SCHEMA_ID_LENGTH;
 use crate::row::InternalRow;
 use crate::row::compacted::CompactedRow;
 use crate::row::encode::{KeyEncoder, KeyEncoderFactory};
@@ -64,7 +65,10 @@ impl<'a> LookupResult<'a> {
     pub fn get_single_row(&self) -> Result<Option<CompactedRow<'_>>> {
         match self.rows.len() {
             0 => Ok(None),
-            1 => Ok(Some(CompactedRow::from_bytes(self.row_type, 
&self.rows[0]))),
+            1 => Ok(Some(CompactedRow::from_bytes(
+                self.row_type,
+                &self.rows[0][SCHEMA_ID_LENGTH..],
+            ))),
             _ => Err(Error::UnexpectedError {
                 message: "LookupResult contains multiple rows, use get_rows() 
instead".to_string(),
                 source: None,
@@ -76,7 +80,8 @@ impl<'a> LookupResult<'a> {
     pub fn get_rows(&self) -> Vec<CompactedRow<'_>> {
         self.rows
             .iter()
-            .map(|bytes| CompactedRow::from_bytes(self.row_type, bytes))
+            // TODO Add schema id check and fetch when implementing prefix 
lookup
+            .map(|bytes| CompactedRow::from_bytes(self.row_type, 
&bytes[SCHEMA_ID_LENGTH..]))
             .collect()
     }
 }

Reply via email to