Fokko commented on code in PR #117:
URL: https://github.com/apache/iceberg-python/pull/117#discussion_r1381820029


##########
tests/io/test_pyarrow.py:
##########
@@ -708,15 +709,17 @@ def _write_table_to_file(filepath: str, schema: 
pa.Schema, table: pa.Table) -> s
 
 @pytest.fixture
 def file_int(schema_int: Schema, tmpdir: str) -> str:
-    pyarrow_schema = pa.schema(schema_to_pyarrow(schema_int), 
metadata={"iceberg.schema": schema_int.model_dump_json()})
+    pyarrow_schema = schema_to_pyarrow(schema_int, metadata={ICEBERG_SCHEMA: 
bytes(schema_int.model_dump_json(), 'utf-8')})

Review Comment:
   Sounds good, I've introduced a utf8 constant 👍 



##########
tests/io/test_pyarrow.py:
##########
@@ -708,15 +709,17 @@ def _write_table_to_file(filepath: str, schema: 
pa.Schema, table: pa.Table) -> s
 
 @pytest.fixture
 def file_int(schema_int: Schema, tmpdir: str) -> str:
-    pyarrow_schema = pa.schema(schema_to_pyarrow(schema_int), 
metadata={"iceberg.schema": schema_int.model_dump_json()})
+    pyarrow_schema = schema_to_pyarrow(schema_int, metadata={ICEBERG_SCHEMA: 
bytes(schema_int.model_dump_json(), 'utf-8')})

Review Comment:
   Sounds good, I've introduced a utf8 constant 👍 



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

Reply via email to