edubraqd commented on code in PR #24905:
URL: https://github.com/apache/datafusion/pull/24905#discussion_r4000927701
##########
datafusion/common/src/file_options/parquet_writer.rs:
##########
@@ -251,6 +252,54 @@ impl ParquetOptions {
max_in_list_size: _,
} = self;
+ // The `parquet` crate rejects these values with a panic (`assert!`)
+ // while the properties are being built, so check them here and report
+ // a configuration error instead.
+ if *write_batch_size == 0 {
+ return Err(DataFusionError::Configuration(
+ "datafusion.execution.parquet.write_batch_size must be greater
than 0"
+ .to_string(),
+ ));
+ }
+ if *max_row_group_size == 0 {
+ return Err(DataFusionError::Configuration(
+ "datafusion.execution.parquet.max_row_group_size must be
greater than 0"
+ .to_string(),
+ ));
+ }
+ if *column_index_truncate_length == Some(0) {
+ return Err(DataFusionError::Configuration(
+ "datafusion.execution.parquet.column_index_truncate_length
must be greater than 0 (unset it to disable truncation)"
Review Comment:
Fixed in 9041f8d: the wrapped literals now use `\` continuations, so the
messages are single-spaced. Sorry for the delay on this one.
--
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]