kevinjqliu commented on code in PR #2109:
URL: https://github.com/apache/iceberg-python/pull/2109#discussion_r2152474286


##########
pyiceberg/utils/schema_conversion.py:
##########
@@ -171,11 +171,11 @@ def _resolve_union(
         # This means that null has to come first:
         # https://avro.apache.org/docs/current/spec.html
         # type of the default value must match the first element of the union.
-        if "null" != avro_types[0]:
-            raise TypeError("Only null-unions are supported")
+        if avro_types[0] != "null" and avro_types[0] != {'type': 'null'}:

Review Comment:
   should we add a test for this in 
https://github.com/apache/iceberg-python/blob/483d9475cd729bdd9bb70fd9d1d7b6ff96d98cc1/tests/utils/test_schema_conversion.py#L235-L239



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