rdblue commented on pull request #2496:
URL: https://github.com/apache/iceberg/pull/2496#issuecomment-1038403141


   > Are complex types allowed to have defaults? Just wondering how complicated 
this can get
   
   I don't think that maps or lists can have default map values or list 
elements. May entire map or list can be defaulted? It would be easier if you 
could assume an empty map or empty list default. We could allow empty defaults 
with a simple flag, or we could allow expressing defaults like `map("a" => 1)` 
or `list(1, 2, 3)`. I'm not sure if the custom defaults are worth the 
complexity.
   
   We have a similar choice for structs. A struct could be defaulted using a 
flag and nested default values, so the struct is non-null and all its columns 
have default values. Or we could allow setting a specific default struct. I'm 
again not sure about the utility of the specific default struct. It is way more 
complicated for us to store the default values.
   
   The choice here may come down to the strategy used to store default values. 
If we use simple JSON structures, then we can definitely store the nested 
defaults. I'm interested to hear a proposal for this.


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