Skip to content

Commit

Permalink
remove max_statistics_size from ColumnProperties
Browse files Browse the repository at this point in the history
Signed-off-by: Max Piskunov <[email protected]>
  • Loading branch information
maxitg authored and rtyler committed Jan 15, 2025
1 parent 8667622 commit d73a9af
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
5 changes: 1 addition & 4 deletions python/deltalake/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,26 +218,23 @@ def __init__(
self,
dictionary_enabled: Optional[bool] = None,
statistics_enabled: Optional[Literal["NONE", "CHUNK", "PAGE"]] = None,
max_statistics_size: Optional[int] = None,
bloom_filter_properties: Optional[BloomFilterProperties] = None,
):
"""Create a Column Properties instance for the Rust parquet writer:
Args:
dictionary_enabled: Enable dictionary encoding for the column.
statistics_enabled: Statistics level for the column.
max_statistics_size: Maximum size of statistics for the column.
bloom_filter_properties: Bloom Filter Properties for the column.
"""
self.dictionary_enabled = dictionary_enabled
self.statistics_enabled = statistics_enabled
self.max_statistics_size = max_statistics_size
self.bloom_filter_properties = bloom_filter_properties

def __str__(self) -> str:
return (
f"dictionary_enabled: {self.dictionary_enabled}, statistics_enabled: {self.statistics_enabled}, "
f"max_statistics_size: {self.max_statistics_size}, bloom_filter_properties: {self.bloom_filter_properties}"
f"bloom_filter_properties: {self.bloom_filter_properties}"
)


Expand Down
4 changes: 0 additions & 4 deletions python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1573,9 +1573,6 @@ fn set_writer_properties(writer_properties: PyWriterProperties) -> DeltaResult<W

properties = properties.set_statistics_enabled(enabled_statistics);
}
if let Some(max_statistics_size) = default_column_properties.max_statistics_size {
properties = properties.set_max_statistics_size(max_statistics_size);
}
if let Some(bloom_filter_properties) = default_column_properties.bloom_filter_properties {
if let Some(set_bloom_filter_enabled) = bloom_filter_properties.set_bloom_filter_enabled
{
Expand Down Expand Up @@ -1937,7 +1934,6 @@ pub struct BloomFilterProperties {
pub struct ColumnProperties {
pub dictionary_enabled: Option<bool>,
pub statistics_enabled: Option<String>,
pub max_statistics_size: Option<usize>,
pub bloom_filter_properties: Option<BloomFilterProperties>,
}

Expand Down
2 changes: 0 additions & 2 deletions python/tests/test_writerproperties.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ def test_writer_properties_all_filled():
"a": ColumnProperties(
dictionary_enabled=True,
statistics_enabled="CHUNK",
max_statistics_size=40,
bloom_filter_properties=BloomFilterProperties(
set_bloom_filter_enabled=True, fpp=0.2, ndv=30
),
),
"b": ColumnProperties(
dictionary_enabled=True,
statistics_enabled="PAGE",
max_statistics_size=400,
bloom_filter_properties=BloomFilterProperties(
set_bloom_filter_enabled=False, fpp=0.2, ndv=30
),
Expand Down

0 comments on commit d73a9af

Please sign in to comment.