@@ -270,6 +270,25 @@ def get_current_snapshot_id(identifier: str) -> int:
270
270
assert tbl .current_snapshot ().snapshot_id == get_current_snapshot_id (identifier ) # type: ignore
271
271
272
272
273
+ @pytest .mark .integration
274
+ def test_python_writes_special_character_column_with_spark_reads (spark : SparkSession , session_catalog : Catalog ) -> None :
275
+ identifier = "default.python_writes_special_character_column_with_spark_reads"
276
+ column_name_with_special_character = "letter/abc"
277
+ TEST_DATA_WITH_SPECIAL_CHARACTER_COLUMN = {
278
+ column_name_with_special_character : ['a' , None , 'z' ],
279
+ }
280
+ pa_schema = pa .schema ([
281
+ (column_name_with_special_character , pa .string ()),
282
+ ])
283
+ arrow_table_with_special_character_column = pa .Table .from_pydict (TEST_DATA_WITH_SPECIAL_CHARACTER_COLUMN , schema = pa_schema )
284
+ tbl = _create_table (session_catalog , identifier , {"format-version" : "1" }, schema = pa_schema )
285
+
286
+ tbl .overwrite (arrow_table_with_special_character_column )
287
+ spark_df = spark .sql (f"SELECT * FROM { identifier } " ).toPandas ()
288
+ pyiceberg_df = tbl .scan ().to_pandas ()
289
+ assert spark_df .equals (pyiceberg_df )
290
+
291
+
273
292
@pytest .mark .integration
274
293
def test_write_bin_pack_data_files (spark : SparkSession , session_catalog : Catalog , arrow_table_with_null : pa .Table ) -> None :
275
294
identifier = "default.write_bin_pack_data_files"
0 commit comments