amogh-jahagirdar commented on code in PR #411:
URL: https://github.com/apache/iceberg-python/pull/411#discussion_r1485414210


##########
tests/catalog/test_hive.py:
##########
@@ -294,6 +294,37 @@ def test_create_table(table_schema_simple: Schema, 
hive_database: HiveDatabase,
 
     assert metadata.model_dump() == expected.model_dump()
 
+    catalog.create_table(
+        ("default", "table_v1"), schema=table_schema_simple, 
properties={"owner": "javaberg", "format-version": "1"}
+    )
+    expected_v1 = TableMetadataV1(
+        location=metadata.location,
+        table_uuid=metadata.table_uuid,
+        last_updated_ms=metadata.last_updated_ms,
+        last_column_id=3,
+        schema=Schema(
+            NestedField(field_id=1, name="foo", field_type=StringType(), 
required=False),
+            NestedField(field_id=2, name="bar", field_type=IntegerType(), 
required=True),
+            NestedField(field_id=3, name="baz", field_type=BooleanType(), 
required=False),
+            schema_id=0,
+            identifier_field_ids=[2],
+        ),
+        current_schema_id=0,
+        last_partition_id=1000,
+        properties={"owner": "javaberg", 'write.parquet.compression-codec': 
'zstd'},
+        spec=PartitionSpec(),
+        current_snapshot_id=None,
+        snapshots=[],
+        snapshot_log=[],
+        metadata_log=[],
+        sort_orders=[SortOrder(order_id=0)],
+        default_sort_order_id=0,
+        refs={},
+        format_version=1,
+    )
+
+    assert metadata.model_dump() == expected_v1.model_dump

Review Comment:
   Let me fix this assertion, it's not using the right metadata



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