fresh-borzoni commented on code in PR #304:
URL: https://github.com/apache/fluss-rust/pull/304#discussion_r2801820224


##########
crates/fluss/src/row/datum.rs:
##########
@@ -493,7 +494,21 @@ impl Datum<'_> {
             Datum::Float32(v) => append_value_to_arrow!(Float32Builder, 
v.into_inner()),
             Datum::Float64(v) => append_value_to_arrow!(Float64Builder, 
v.into_inner()),
             Datum::String(v) => append_value_to_arrow!(StringBuilder, 
v.as_ref()),
-            Datum::Blob(v) => append_value_to_arrow!(BinaryBuilder, 
v.as_ref()),
+            Datum::Blob(v) => {
+                append_value_to_arrow!(BinaryBuilder, v.as_ref());
+                if let Some(b) = builder
+                    .as_any_mut()
+                    .downcast_mut::<FixedSizeBinaryBuilder>()
+                {
+                    return b.append_value(v.as_ref()).map_err(|e| 
RowConvertError {
+                        message: format!("Failed to append FixedSizeBinary: 
{e}"),

Review Comment:
   Can we have smth like - FixedSizeBinary length mismatch: expected {n}, got 
{}.
   
   I mean we know FixedSizeBinary length and also know the length of the bytes 
we are writing, if they don't match - we can just short circuit and it be a lot 
easier to reason.
   
   Actually in Arrow, it's the only thing that can fail in this case.



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