paultmathew commented on code in PR #3334:
URL: https://github.com/apache/iceberg-python/pull/3334#discussion_r3201928520


##########
tests/integration/test_writes/test_writes.py:
##########
@@ -2027,7 +2027,15 @@ def test_write_optional_list(session_catalog: Catalog) 
-> None:
             required=False,
         ),
     )
-    session_catalog.create_table_if_not_exists(identifier, schema)
+    # Ensure a clean slate: the test asserts exact row counts after each
+    # append, so a stale table from a previous run would accumulate rows and
+    # fail. Other tests in this module use _create_table() which does the same
+    # drop-if-exists step.
+    try:
+        session_catalog.drop_table(identifier=identifier)
+    except NoSuchTableError:
+        pass
+    session_catalog.create_table(identifier, schema)

Review Comment:
   Done. Switched to _create_table(). Diff is now a one-liner. Thanks for the 
cleanup pointer!



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