2010YOUY01 commented on code in PR #22649:
URL: https://github.com/apache/datafusion/pull/22649#discussion_r3329599018
##########
datafusion/common/src/file_options/parquet_writer.rs:
##########
@@ -213,6 +214,12 @@ impl ParquetOptions {
max_predicate_cache_size: _,
} = self;
+ if let Some(0) = max_row_group_bytes {
Review Comment:
I recommend to move all the config related validation to
- datafusion/common/src/config.rs
You can find examples in `config.rs` -- there are configurations that are
custom type, and a `FromStr` trait is implemented on them.
##########
datafusion/sqllogictest/test_files/parquet_max_row_group_bytes.slt:
##########
@@ -0,0 +1,83 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# End-to-end tests for the `max_row_group_bytes` Parquet writer option:
Review Comment:
It would be great to add the following coverages:
- When read back, check the row group count -- for example if
`max_row_group_bytes` was set to `1`, there will be 5 row groups created
- Test the combination of `max_row_group_size` and `max_row_group_bytes` for
the 'whichever reaches first' semantics.
##########
datafusion/common/src/config.rs:
##########
@@ -976,6 +976,15 @@ config_namespace! {
/// can get better compression and be faster to read.
pub max_row_group_size: usize, default = 1024 * 1024
+ /// (writing) Target maximum size of each row group in bytes. When set,
+ /// the writer flushes whenever either this limit or
`max_row_group_size`
+ /// is reached, whichever comes first. Useful for bounding writer
memory
Review Comment:
Let's also update `max_row_group_size` for this 'whichever comes first`
semantics.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]