ldsantos0911 commented on code in PR #2155: URL: https://github.com/apache/iceberg-python/pull/2155#discussion_r2271029832
########## tests/io/test_pyarrow_visitor.py: ########## @@ -313,6 +314,28 @@ def test_pyarrow_dictionary_encoded_type_to_iceberg(value_type: pa.DataType, exp assert visit_pyarrow(pyarrow_dict, _ConvertToIceberg()) == expected_result +def test_schema_check_null_column(table_schema_simple: Schema) -> None: + pyarrow_schema: pa.Schema = schema_to_pyarrow(table_schema_simple) + new_field = pyarrow_schema.field(0).with_type(pa.null()) # Make the optional string field null for testing + pyarrow_schema = pyarrow_schema.set(0, new_field) + assert pyarrow_schema.field(0).type == pa.null() + _check_pyarrow_schema_compatible(table_schema_simple, pyarrow_schema) + + +def test_schema_conversion_null_column(table_schema_simple: Schema) -> None: + pyarrow_schema: pa.Schema = schema_to_pyarrow(table_schema_simple) + new_field = pyarrow_schema.field(2).with_type(pa.null()) # Make the optional boolean field null for testing Review Comment: Sure I can make a new schema. I think I was just trying to get it working and forgot to clean this up 😀 -- 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