> My initial idea was to disallow the use of UnknownType as the element in ListType and not allow the UnknownType as either a Key or Value of a MapType. Any thoughts or concerns?
That makes sense. I would also include `StructType` here too. `StructType` is another "complex type" (extends NestedType <https://github.com/apache/iceberg/blob/360f87326d4ccf67512a0240e529035801d9db2b/api/src/main/java/org/apache/iceberg/types/Types.java#L1001>) just like `ListType` and `MapType`. This will make `unknown` the first primitive type to not be allowed as part of another complex type. Best, Kevin Liu On Sat, Jul 26, 2025 at 5:43 AM Fokko Driesprong <fo...@apache.org> wrote: > Hi everyone, > > Recently I took a stab at implementing reading UknownType > <https://github.com/apache/iceberg/pull/13445> in the Java > implementation. I thought it would make sense to add this to the reference > implementation first. However, I ran into a limitation with the current > definition in the spec: > > Must be optional with null defaults; not stored in data files > > > One obvious limitation is that it cannot be the key of a MapType, as it > has to be not-null. It can't be stored either as the value of a MapType > since there is no easy way to store just the key without doing awkward > things, such as writing just the keys as a list. > > My initial idea was to disallow the use of UnknownType as the element in > ListType and not allow the UnknownType as either a Key or Value of a > MapType. Any thoughts or concerns? > > Kind regards from Belgium, > Fokko >