pitrou commented on code in PR #47087:
URL: https://github.com/apache/arrow/pull/47087#discussion_r2314250106
##########
python/pyarrow/tests/parquet/test_parquet_writer.py:
##########
@@ -448,3 +448,46 @@ def
test_parquet_content_defined_chunking_parameters(tempdir):
# using min_chunk_size, max_chunk_size and norm_level
cdc_options = {"min_chunk_size": 32_768, "max_chunk_size": 65_536,
"norm_level": 1}
pq.write_table(table, path, use_content_defined_chunking=cdc_options)
+
+
[email protected]
+def test_parquet_writer_properties_access():
+ df = _test_dataframe(100)
+ table = pa.Table.from_pandas(df, preserve_index=False)
+
+ out = pa.BufferOutputStream()
+
+ with pq.ParquetWriter(
+ out, table.schema,
+ compression='snappy',
+ version='2.6',
+ use_dictionary=True,
+ write_statistics=True,
+ data_page_size=64 * 1024,
+ use_deprecated_int96_timestamps=False,
+ store_schema=True,
+ use_compliant_nested_type=True,
+ writer_engine_version='V2'
+ ) as writer:
+
+ props = writer.properties
+ assert props is not None
+ assert hasattr(props, 'version')
+ assert hasattr(props, 'created_by')
+ assert hasattr(props, 'dictionary_enabled')
+ assert hasattr(props, 'statistics_enabled')
Review Comment:
No need for all this, the attribute accesses below are sufficient.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]