qzyu999 commented on code in PR #474:
URL: https://github.com/apache/fluss-rust/pull/474#discussion_r3068648298


##########
crates/fluss/src/row/column_writer.rs:
##########
@@ -339,41 +365,65 @@ impl ColumnWriter {
     /// directly to the concrete Arrow builder.
     #[inline]
     pub fn write_field(&mut self, row: &dyn InternalRow) -> Result<()> {
-        if self.nullable && row.is_null_at(self.pos)? {
+        self.write_field_at(row, self.pos)
+    }
+
+    /// Read one value from `row` at position `pos` and append it
+    /// directly to the concrete Arrow builder.
+    #[inline]
+    pub fn write_field_at(&mut self, row: &dyn InternalRow, pos: usize) -> 
Result<()> {
+        if self.nullable && row.is_null_at(pos)? {
             self.append_null();
             return Ok(());
         }
-        self.write_non_null(row)
+        self.write_non_null_at(row, pos)
     }
 
     /// Finish the builder, producing the final Arrow array.
     pub fn finish(&mut self) -> ArrayRef {
-        self.as_builder_mut().finish()
+        match &mut self.inner {
+            TypedWriter::List {
+                element_writer,
+                offsets,
+                validity,
+            } => {
+                let values = element_writer.finish();
+                finish_list_array(values, offsets, validity)

Review Comment:
   Hi @leekeiabstraction, thanks for the clarification, the above changes were 
added in 8a6742c986e412f4ad8c4cd70164410bd230d8d6.



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