@@ -256,7 +256,7 @@ def test_data_files(spark: SparkSession, session_catalog: Catalog, arrow_table_w
256
256
identifier = "default.arrow_data_files"
257
257
tbl = _create_table (session_catalog , identifier , {"format-version" : "1" }, [])
258
258
259
- tbl .overwrite (arrow_table_with_null )
259
+ tbl .append (arrow_table_with_null )
260
260
# should produce a DELETE entry
261
261
tbl .overwrite (arrow_table_with_null )
262
262
# Since we don't rewrite, this should produce a new manifest with an ADDED entry
@@ -288,7 +288,7 @@ def get_current_snapshot_id(identifier: str) -> int:
288
288
.snapshot_id
289
289
)
290
290
291
- tbl .overwrite (arrow_table_with_null )
291
+ tbl .append (arrow_table_with_null )
292
292
assert tbl .current_snapshot ().snapshot_id == get_current_snapshot_id (identifier ) # type: ignore
293
293
tbl .overwrite (arrow_table_with_null )
294
294
assert tbl .current_snapshot ().snapshot_id == get_current_snapshot_id (identifier ) # type: ignore
@@ -330,7 +330,7 @@ def test_python_writes_special_character_column_with_spark_reads(
330
330
arrow_table_with_special_character_column = pa .Table .from_pydict (TEST_DATA_WITH_SPECIAL_CHARACTER_COLUMN , schema = pa_schema )
331
331
tbl = _create_table (session_catalog , identifier , {"format-version" : format_version }, schema = pa_schema )
332
332
333
- tbl .overwrite (arrow_table_with_special_character_column )
333
+ tbl .append (arrow_table_with_special_character_column )
334
334
spark_df = spark .sql (f"SELECT * FROM { identifier } " ).toPandas ()
335
335
pyiceberg_df = tbl .scan ().to_pandas ()
336
336
assert spark_df .equals (pyiceberg_df )
@@ -354,7 +354,7 @@ def test_python_writes_dictionary_encoded_column_with_spark_reads(
354
354
355
355
tbl = _create_table (session_catalog , identifier , {"format-version" : format_version }, schema = pa_schema )
356
356
357
- tbl .overwrite (arrow_table )
357
+ tbl .append (arrow_table )
358
358
spark_df = spark .sql (f"SELECT * FROM { identifier } " ).toPandas ()
359
359
pyiceberg_df = tbl .scan ().to_pandas ()
360
360
assert spark_df .equals (pyiceberg_df )
@@ -393,7 +393,7 @@ def test_python_writes_with_small_and_large_types_spark_reads(
393
393
arrow_table = pa .Table .from_pydict (TEST_DATA , schema = pa_schema )
394
394
tbl = _create_table (session_catalog , identifier , {"format-version" : format_version }, schema = pa_schema )
395
395
396
- tbl .overwrite (arrow_table )
396
+ tbl .append (arrow_table )
397
397
spark_df = spark .sql (f"SELECT * FROM { identifier } " ).toPandas ()
398
398
pyiceberg_df = tbl .scan ().to_pandas ()
399
399
assert spark_df .equals (pyiceberg_df )
@@ -429,7 +429,7 @@ def get_data_files_count(identifier: str) -> int:
429
429
430
430
# writes 1 data file since the table is smaller than default target file size
431
431
assert arrow_table_with_null .nbytes < TableProperties .WRITE_TARGET_FILE_SIZE_BYTES_DEFAULT
432
- tbl .overwrite (arrow_table_with_null )
432
+ tbl .append (arrow_table_with_null )
433
433
assert get_data_files_count (identifier ) == 1
434
434
435
435
# writes 1 data file as long as table is smaller than default target file size
@@ -820,7 +820,7 @@ def test_inspect_snapshots(
820
820
identifier = "default.table_metadata_snapshots"
821
821
tbl = _create_table (session_catalog , identifier , properties = {"format-version" : format_version })
822
822
823
- tbl .overwrite (arrow_table_with_null )
823
+ tbl .append (arrow_table_with_null )
824
824
# should produce a DELETE entry
825
825
tbl .overwrite (arrow_table_with_null )
826
826
# Since we don't rewrite, this should produce a new manifest with an ADDED entry
@@ -979,6 +979,7 @@ def test_table_write_subset_of_schema(session_catalog: Catalog, arrow_table_with
979
979
980
980
@pytest .mark .integration
981
981
@pytest .mark .parametrize ("format_version" , [1 , 2 ])
982
+ @pytest .mark .filterwarnings ("ignore:Delete operation did not match any records" )
982
983
def test_table_write_out_of_order_schema (session_catalog : Catalog , arrow_table_with_null : pa .Table , format_version : int ) -> None :
983
984
identifier = "default.test_table_write_out_of_order_schema"
984
985
# rotate the schema fields by 1
@@ -989,6 +990,7 @@ def test_table_write_out_of_order_schema(session_catalog: Catalog, arrow_table_w
989
990
tbl = _create_table (session_catalog , identifier , {"format-version" : format_version }, schema = rotated_schema )
990
991
991
992
tbl .overwrite (arrow_table_with_null )
993
+
992
994
tbl .append (arrow_table_with_null )
993
995
# overwrite and then append should produce twice the data
994
996
assert len (tbl .scan ().to_arrow ()) == len (arrow_table_with_null ) * 2
0 commit comments