@@ -858,12 +858,15 @@ def test_conflict_delete_delete(
858858 spark : SparkSession , session_catalog : Catalog , arrow_table_with_null : pa .Table , format_version : int
859859) -> None :
860860 identifier = "default.test_conflict"
861- tbl1 = _create_table (session_catalog , identifier , format_version , [arrow_table_with_null ])
861+ tbl1 = _create_table (session_catalog , identifier , format_version , schema = arrow_table_with_null .schema )
862+ tbl1 .append (arrow_table_with_null )
862863 tbl2 = session_catalog .load_table (identifier )
863864
864865 tbl1 .delete ("string == 'z'" )
865866
866- with pytest .raises (CommitFailedException , match = "(branch main has changed: expected id ).*" ):
867+ with pytest .raises (
868+ CommitFailedException , match = "Operation .* is not allowed when performing .*. Check for overlaps or conflicts."
869+ ):
867870 # tbl2 isn't aware of the commit by tbl1
868871 tbl2 .delete ("string == 'z'" )
869872
@@ -874,7 +877,8 @@ def test_conflict_delete_append(
874877 spark : SparkSession , session_catalog : Catalog , arrow_table_with_null : pa .Table , format_version : int
875878) -> None :
876879 identifier = "default.test_conflict"
877- tbl1 = _create_table (session_catalog , identifier , format_version , [arrow_table_with_null ])
880+ tbl1 = _create_table (session_catalog , identifier , format_version , schema = arrow_table_with_null .schema )
881+ tbl1 .append (arrow_table_with_null )
878882 tbl2 = session_catalog .load_table (identifier )
879883
880884 # This is allowed
@@ -888,12 +892,15 @@ def test_conflict_append_delete(
888892 spark : SparkSession , session_catalog : Catalog , arrow_table_with_null : pa .Table , format_version : int
889893) -> None :
890894 identifier = "default.test_conflict"
891- tbl1 = _create_table (session_catalog , identifier , format_version , [arrow_table_with_null ])
895+ tbl1 = _create_table (session_catalog , identifier , format_version , schema = arrow_table_with_null .schema )
896+ tbl1 .append (arrow_table_with_null )
892897 tbl2 = session_catalog .load_table (identifier )
893898
894899 tbl1 .append (arrow_table_with_null )
895900
896- with pytest .raises (CommitFailedException , match = "(branch main has changed: expected id ).*" ):
901+ with pytest .raises (
902+ CommitFailedException , match = "Operation .* is not allowed when performing .*. Check for overlaps or conflicts."
903+ ):
897904 # tbl2 isn't aware of the commit by tbl1
898905 tbl2 .delete ("string == 'z'" )
899906
@@ -904,7 +911,8 @@ def test_conflict_append_append(
904911 spark : SparkSession , session_catalog : Catalog , arrow_table_with_null : pa .Table , format_version : int
905912) -> None :
906913 identifier = "default.test_conflict"
907- tbl1 = _create_table (session_catalog , identifier , format_version , [arrow_table_with_null ])
914+ tbl1 = _create_table (session_catalog , identifier , format_version , schema = arrow_table_with_null .schema )
915+ tbl1 .append (arrow_table_with_null )
908916 tbl2 = session_catalog .load_table (identifier )
909917
910918 tbl1 .append (arrow_table_with_null )
0 commit comments