-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-45048: [C++][Parquet] Deprecate unused chunk_size
parameter in parquet::arrow::FileWriter::NewRowGroup()
#45049
base: main
Are you sure you want to change the base?
Conversation
chunk_size
parameter in parquet::arrow::FileWriter::NewRowGroup()
chunk_size
parameter in parquet::arrow::FileWriter::NewRowGroup()
|
81c50e0
to
9234e16
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.
f287bc8
to
49bb54a
Compare
@@ -590,7 +590,7 @@ gparquet_arrow_file_writer_new_row_group(GParquetArrowFileWriter *writer, | |||
{ | |||
auto parquet_arrow_file_writer = gparquet_arrow_file_writer_get_raw(writer); | |||
return garrow::check(error, | |||
parquet_arrow_file_writer->NewRowGroup(chunk_size), | |||
parquet_arrow_file_writer->NewRowGroup(), |
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.
Could you also remove the chunk_size
parameter from this function?
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.
Sure, do I need to deprecate it?
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.
You don't need to deprecate it. We can do it as a breaking change. Because this will not be used by many users. This is a method added in 18.0.0.
diff --git a/c_glib/parquet-glib/arrow-file-writer.cpp b/c_glib/parquet-glib/arrow-file-writer.cpp
index 2b8e2bdeac..82f86e823b 100644
--- a/c_glib/parquet-glib/arrow-file-writer.cpp
+++ b/c_glib/parquet-glib/arrow-file-writer.cpp
@@ -574,7 +574,6 @@ gparquet_arrow_file_writer_write_table(GParquetArrowFileWriter *writer,
/**
* gparquet_arrow_file_writer_new_row_group:
* @writer: A #GParquetArrowFileWriter.
- * @chunk_size: The max number of rows in a row group.
* @error: (nullable): Return location for a #GError or %NULL.
*
* Start a new row group.
@@ -585,7 +584,6 @@ gparquet_arrow_file_writer_write_table(GParquetArrowFileWriter *writer,
*/
gboolean
gparquet_arrow_file_writer_new_row_group(GParquetArrowFileWriter *writer,
- gsize chunk_size,
GError **error)
{
auto parquet_arrow_file_writer = gparquet_arrow_file_writer_get_raw(writer);
diff --git a/c_glib/parquet-glib/arrow-file-writer.h b/c_glib/parquet-glib/arrow-file-writer.h
index 2c82f7c1f8..b35cea1182 100644
--- a/c_glib/parquet-glib/arrow-file-writer.h
+++ b/c_glib/parquet-glib/arrow-file-writer.h
@@ -136,7 +136,6 @@ gparquet_arrow_file_writer_write_table(GParquetArrowFileWriter *writer,
GPARQUET_AVAILABLE_IN_18_0
gboolean
gparquet_arrow_file_writer_new_row_group(GParquetArrowFileWriter *writer,
- gsize chunk_size,
GError **error);
GPARQUET_AVAILABLE_IN_18_0
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.
Could you also update c_glib/parquet-glib/arrow-file-writer.h
?
BTW, could you use your fork not apache/arrow next time?
@@ -556,7 +556,7 @@ cdef extern from "parquet/arrow/writer.h" namespace "parquet::arrow" nogil: | |||
const shared_ptr[ArrowWriterProperties]& arrow_properties) | |||
|
|||
CStatus WriteTable(const CTable& table, int64_t chunk_size) | |||
CStatus NewRowGroup(int64_t chunk_size) | |||
CStatus NewRowGroup() |
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.
Is this a breaking change?
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.
I can expose the deprecated method as well.
Rationale for this change
Just noticed that the implementation doesn't use the parameter.
What changes are included in this PR?
Remove the parameter from
AddRowGroup()
Are these changes tested?
Are there any user-facing changes?
The
chunk_size
parameter is now deprecated.chunk_size
parameter inparquet::arrow::FileWriter::NewRowGroup()
#45048