mbutrovich commented on code in PR #2635:
URL: https://github.com/apache/iceberg-rust/pull/2635#discussion_r4189111716
##########
crates/iceberg/src/arrow/value.rs:
##########
@@ -628,23 +627,25 @@ pub(crate) fn create_primitive_array_single_element(
data_type: &DataType,
prim_lit: &Option<PrimitiveLiteral>,
) -> Result<ArrayRef> {
+ // With no value, the single element is NULL. `new_null_array` supports
every
+ // Arrow type, including nested ones (list/map/struct), which matters for
+ // columns added by schema evolution after a data file was written (#2618).
+ if prim_lit.is_none() {
Review Comment:
> Given that, I'd prefer to keep this PR as the focused
wraparound/nested-NULL fix and do the rename + `Literal` widening + V3 default
support together in the follow-up, so the type change lands in one coherent
step rather than renaming now and re-touching the signature later. Happy to
open the follow-up issue/PR for that.
Has that follow-up issue been filed? I couldn't find one. Could you open it
and reference it in the new
[`TODO`](https://github.com/apache/iceberg-rust/blob/a8d823a3d0f8310ba76b9e67c04e9985f0f8b7c6/crates/iceberg/src/arrow/record_batch_transformer.rs#L867-L868)
so the rename and the struct default work stay connected to this PR? #3261
tracks applying `initial-default` to a nested field missing from an existing
struct. Materializing a `{}` struct default needs the same per-child default
logic, so extending #3261 to cover both would also work.
--
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]