laskoviymishka commented on code in PR #779:
URL: https://github.com/apache/iceberg-go/pull/779#discussion_r2931993163
##########
table/arrow_utils.go:
##########
@@ -832,7 +872,12 @@ func (a *arrowProjectionVisitor) Struct(st
iceberg.StructType, structArr arrow.A
} else if !field.Required {
dt := retOrPanic(TypeToArrowType(field.Type, false,
a.useLargeTypes))
- arr =
array.MakeArrayOfNull(compute.GetAllocator(a.ctx), dt, structArr.Len())
+ if field.WriteDefault != nil {
Review Comment:
You're correct. ToRequestedSchema is used in both paths — read
(arrow_scanner.go) and write (writer.go, rolling_data_writer.go).
A flag is the right fix, but put it on ToRequestedSchema's signature rather
than the internal struct, so call sites are explicit. The write-path callers
pass true (use write-default), read-path callers pass false (use
initial-default). The visitor stores it internally.
--
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]