You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jecsand838 (via GitHub)" <gi...@apache.org> on 2025/08/24 04:02:50 UTC

Re: [PR] [avro] Support all default types for avro schema's record field [arrow-rs]

jecsand838 commented on code in PR #8210:
URL: https://github.com/apache/arrow-rs/pull/8210#discussion_r2296497057


##########
arrow-avro/src/schema.rs:
##########
@@ -215,8 +215,8 @@ pub struct Field<'a> {
     #[serde(borrow)]
     pub r#type: Schema<'a>,
     /// Optional default value for this field
-    #[serde(borrow, default)]
-    pub default: Option<&'a str>,
+    #[serde(default)]
+    pub default: Option<serde_json::Value>,

Review Comment:
   You should be able to use `Value` here without the `serde_json` due to the import on line 22.
   ```suggestion
       pub default: Option<Value>,
   ```



-- 
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: github-unsubscribe@arrow.apache.org

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