rluvaton commented on code in PR #9357:
URL: https://github.com/apache/arrow-rs/pull/9357#discussion_r2769486009
##########
parquet/src/file/properties.rs:
##########
@@ -575,7 +595,34 @@ impl WriterPropertiesBuilder {
/// If the value is set to 0.
pub fn set_max_row_group_size(mut self, value: usize) -> Self {
assert!(value > 0, "Cannot have a 0 max row group size");
- self.max_row_group_size = value;
+ self.max_row_group_row_count = Some(value);
+ self
+ }
+
+ /// Sets maximum number of rows in a row group, or `None` for unlimited.
+ ///
+ /// # Panics
+ /// If the value is `Some(0)`.
+ pub fn set_max_row_group_row_count(mut self, value: Option<usize>) -> Self
{
+ if let Some(v) = value {
+ assert!(v > 0, "Cannot have a 0 max row group size");
+ }
+ self.max_row_group_row_count = value;
+ self
+ }
+
+ /// Sets maximum size of a row group in bytes, or `None` for unlimited.
+ ///
+ /// Row groups are flushed when their estimated encoded size exceeds this
threshold.
+ /// This is similar to the official `parquet.block.size` behavior.
+ ///
+ /// # Panics
+ /// If the value is `Some(0)`.
+ pub fn set_max_row_group_bytes(mut self, value: Option<usize>) -> Self {
+ if let Some(v) = value {
+ assert!(v > 0, "Cannot have a 0 max row group bytes");
+ }
Review Comment:
```suggestion
assert_ne!(value, Some(0), "Cannot have a 0 max row group bytes");
```
--
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]