luoyuxia commented on code in PR #138:
URL: https://github.com/apache/fluss-rust/pull/138#discussion_r2679293321


##########
crates/fluss/src/row/compacted/compacted_row.rs:
##########
@@ -24,125 +24,100 @@ use crate::row::{GenericRow, InternalRow};
 // Reference implementation:
 // 
https://github.com/apache/fluss/blob/main/fluss-common/src/main/java/org/apache/fluss/row/compacted/CompactedRow.java
 #[allow(dead_code)]
-pub struct CompactedRow {
+pub struct CompactedRow<'a> {
     arity: usize,
-    segment: Bytes,
+    segment: &'a [u8],
     offset: usize,
     size_in_bytes: usize,
-    decoded: bool,
-    decoded_row: GenericRow<'static>,
-    reader: CompactedRowReader,
-    deserializer: CompactedRowDeserializer,
+    decoded_row: OnceLock<GenericRow<'a>>,
+    deserializer: CompactedRowDeserializer<'a>,
+    reader: CompactedRowReader<'a>,
 }
 
 #[allow(dead_code)]
-impl CompactedRow {
+impl<'a> CompactedRow<'a> {
     pub fn calculate_bit_set_width_in_bytes(arity: usize) -> usize {

Review Comment:
   Let's make it a free function.



-- 
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]

Reply via email to