ayushtkn commented on PR #12211:
URL: https://github.com/apache/iceberg/pull/12211#issuecomment-3378815544

   Hi Folks,
   I was going through the implementation for updating column defaults and 
noticed that updating default values for fields within a Struct data type isn’t 
currently supported.
   
   Looking at the code:
   
   
https://github.com/apache/iceberg/blob/840497e3d73c45665610cb2e897d6f3eb53fd9f5/api/src/main/java/org/apache/iceberg/UpdateSchema.java#L532-L533
   
   — this API wouldn’t allow changing the default for a field inside a Struct, 
since the lookup would fail for nested fields.
   
   An alternative could be to update the column with a new type that includes 
the updated defaults, but the update API seems to only support primitive data 
types:
   
https://github.com/apache/iceberg/blob/840497e3d73c45665610cb2e897d6f3eb53fd9f5/api/src/main/java/org/apache/iceberg/UpdateSchema.java#L502-L503
   
   I couldn’t find any tests covering default updates for Struct fields. Is 
this limitation intentional, or did I overlook something?


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