Skip to content

Commit e4c1748

Browse files
authored
Emit warnings instead of failing when seeing unsupported configuration (#1111)
1 parent 86728e2 commit e4c1748

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pyiceberg/io/pyarrow.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import os
3333
import re
3434
import uuid
35+
import warnings
3536
from abc import ABC, abstractmethod
3637
from concurrent.futures import Future
3738
from copy import copy
@@ -2544,7 +2545,7 @@ def _get_parquet_writer_kwargs(table_properties: Properties) -> Dict[str, Any]:
25442545
f"{TableProperties.PARQUET_BLOOM_FILTER_COLUMN_ENABLED_PREFIX}.*",
25452546
]:
25462547
if unsupported_keys := fnmatch.filter(table_properties, key_pattern):
2547-
raise NotImplementedError(f"Parquet writer option(s) {unsupported_keys} not implemented")
2548+
warnings.warn(f"Parquet writer option(s) {unsupported_keys} not implemented")
25482549

25492550
compression_codec = table_properties.get(TableProperties.PARQUET_COMPRESSION, TableProperties.PARQUET_COMPRESSION_DEFAULT)
25502551
compression_level = property_as_int(

tests/integration/test_writes/test_writes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ def test_write_parquet_unsupported_properties(
549549
identifier = "default.write_parquet_unsupported_properties"
550550

551551
tbl = _create_table(session_catalog, identifier, properties, [])
552-
with pytest.raises(NotImplementedError):
552+
with pytest.warns(UserWarning, match=r"Parquet writer option.*"):
553553
tbl.append(arrow_table_with_null)
554554

555555

0 commit comments

Comments
 (0)