-
Notifications
You must be signed in to change notification settings - Fork 3.8k
GH-45902: [Python][Parquet] Expose ParquetWriter properties and arrow_properties #47087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format?
or
See also: |
f921baf
to
db3942b
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting a PR!
From a quick look the test needs a @pytest.mark.pandas
mark and some style changes are needed to fix linter errors:
diff --git a/cpp/src/parquet/arrow/writer.cc b/cpp/src/parquet/arrow/writer.cc
index 3724e2edf0..cdaeebc294 100644
--- a/cpp/src/parquet/arrow/writer.cc
+++ b/cpp/src/parquet/arrow/writer.cc
@@ -473,7 +473,9 @@ class FileWriterImpl : public FileWriter {
const WriterProperties& properties() const override { return *writer_->properties(); }
- const ArrowWriterProperties& arrow_properties() const override { return *arrow_properties_; }
+ const ArrowWriterProperties& arrow_properties() const override {
+ return *arrow_properties_;
+ }
::arrow::MemoryPool* memory_pool() const override {
return column_write_context_.memory_pool;
diff --git a/python/pyarrow/_parquet.pyx b/python/pyarrow/_parquet.pyx
index f1287d7b8a..6f3b9a5f[43](https://github.com/apache/arrow/actions/runs/16257450496/job/45897414651?pr=47087#step:5:44) 100644
--- a/python/pyarrow/_parquet.pyx
+++ b/python/pyarrow/_parquet.pyx
@@ -2458,7 +2458,6 @@ cdef class WriterPropertiesWrapper(_Weakrefable):
return self.props.default_column_properties().statistics_enabled()
-
cdef class ArrowWriterPropertiesWrapper(_Weakrefable):
cdef:
shared_ptr[ArrowWriterProperties] props
I will have a look at the proposed code shortly.
db3942b
to
23d3161
Compare
23d3161
to
3adfc51
Compare
@AlenkaF thank you, I added |
Rationale for this change
Exposes
ParquetWriter
properties viawriter.properties
andwriter.arrow_properties
(see #45902)
What changes are included in this PR?
See above
Are these changes tested?
Yes
Are there any user-facing changes?
Yes, properties are available via
writer.properties
andwriter.arrow_properties