leekeiabstraction commented on code in PR #190:
URL: https://github.com/apache/fluss-rust/pull/190#discussion_r2712765449
##########
crates/fluss/src/client/table/lookup.rs:
##########
@@ -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,
Review Comment:
Good question. That is right, however that would be an unexpected case. I
would expect that schema id field and header to be there, having said that,
making this more defensive by returning Error would be a good improvement to
make
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]