dannycjones commented on code in PR #2635:
URL: https://github.com/apache/iceberg-rust/pull/2635#discussion_r4073348335


##########
crates/iceberg/src/arrow/record_batch_transformer.rs:
##########


Review Comment:
   I hope to follow-up on this soon so not a big deal, but in general I'd 
prefer we fail closed if we cannot support this.
   
   I was planning to introduce this:
   
   ```rust
   let default_value = match iceberg_field.initial_default.as_ref() {
       None => None,
       Some(Literal::Primitive(prim)) => Some(prim.clone()),
       Some(_) => {
           return Err(Error::new(
               ErrorKind::FeatureUnsupported,
               format!(
                   "Cannot read field {} that is absent from the data file: \
                       applying a non-primitive initial-default for {} is not 
yet \
                       supported",
                   iceberg_field.name, iceberg_field.field_type
               ),
           ));
       }
   };
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to