c-thiel commented on PR #331:
URL: https://github.com/apache/iceberg-rust/pull/331#issuecomment-2204539127

   @nastra, @Fokko during testing we found a Problem with the 
"default-namespace". I am hoping for some insights from your side:
   According to the iceberg view spec, "default-namespace" is required: 
https://iceberg.apache.org/view-spec/#versions.
   As such it is modeled as `NamespaceIdent`:
   
https://github.com/c-thiel/iceberg-rust/blob/d8a7aabce73888e5b22712d60ca95b856db66fc2/crates/iceberg/src/spec/view_version.rs#L56
   
   Valid Namespace Identifiers have at least one element, which is validated by 
the `NamespaceIdent` constructor.
   
   When creating views, spark creates Metadata objects that specify the 
"default-namespace" field but as an empty vec. This is a quite unlucky 
situation, I am not sure what the desired behavior is:
   1. My feeling is that this is a bug in the Iceberg Spec. [] as 
"default-namespace" provides the same information as a non-required field 
(null), as a namespace without an element is unusable. However, views in spark 
work, which shows that default-namespace is not always required. Thus it should 
be optional.
   2. It's a bug in the spark implementation and in fact "default-namespace" 
should always contain at least one element.
   3. They are both right, in which case we would except [] as a valid 
namespace and must change the rust implementation.
   4. [] is in general not a valid namespace unless it is used as a 
"default-namespace" in which some special behavior is expected. This however 
brings me back to 1 - why not just use null in this case?


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to