You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "010Soham (via GitHub)" <gi...@apache.org> on 2026/01/08 07:27:55 UTC
Re: [PR] Core: Improve error for null/unknown schema types in table creation [iceberg-python]
010Soham commented on code in PR #2843:
URL: https://github.com/apache/iceberg-python/pull/2843#discussion_r2671196788
##########
pyiceberg/io/pyarrow.py:
##########
@@ -1435,6 +1435,13 @@ def primitive(self, primitive: pa.DataType) -> PrimitiveType:
elif pa.types.is_null(primitive):
# PyArrow null type (pa.null()) is converted to Iceberg UnknownType
# UnknownType can be promoted to any primitive type in V3+ tables per the Iceberg spec
+ if self._format_version < 3:
+ field_path = ".".join(self._field_names) if self._field_names else "<root>"
+ raise ValueError(
+ "Null type (pa.null()) is not supported in Iceberg format version "
+ f"{self._format_version}. Field: {field_path}. "
+ "Use a concrete type (string, int, boolean, etc.) or set format-version=3."
Review Comment:
thanks @geruh
Updated the error message to mention format-version 3+
--
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-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org