kevinjqliu commented on code in PR #2843:
URL: https://github.com/apache/iceberg-python/pull/2843#discussion_r2646154990
##########
tests/catalog/test_base.py:
##########
@@ -207,6 +207,16 @@ def test_convert_schema_if_needed(
assert expected == catalog._convert_schema_if_needed(schema)
+def test_convert_schema_if_needed_rejects_null_type(catalog: InMemoryCatalog)
-> None:
+ schema = pa.schema([pa.field("n1", pa.null())])
+ with pytest.raises(ValueError) as exc_info:
+ catalog._convert_schema_if_needed(schema)
+ message = str(exc_info.value)
+ assert "Null type" in message
+ assert "n1" in message
+ assert "format-version=3" in message
Review Comment:
this is the full error message
```
'Null type (pa.null()) is not supported in Iceberg format version 2. Field:
n1. Use a concrete type (string, int, boolean, etc.) or set 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: [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]