liurenjie1024 commented on code in PR #1482:
URL: https://github.com/apache/iceberg-rust/pull/1482#discussion_r2192293057


##########
crates/iceberg/src/avro/schema.rs:
##########
@@ -81,20 +81,33 @@ impl SchemaVisitor for SchemaToAvroSchema {
             field_schema = avro_optional(field_schema)?;
         }
 
+        let default = if let Some(literal) = &field.initial_default {
+            let raw_literal = RawLiteral::try_from(literal.clone(), 
&field.field_type)?;

Review Comment:
   I just realized that we already have this method: 
https://github.com/apache/iceberg-rust/blob/c74a27ac0d77314926240d325701107e5360f836/crates/iceberg/src/spec/values.rs#L2012
   
   We should not use `RawLiteral` since it's used  internally for ser/de.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to