You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "devinjdangelo (via GitHub)" <gi...@apache.org> on 2023/08/16 00:41:42 UTC
[GitHub] [arrow-datafusion] devinjdangelo opened a new pull request, #7295: Minor: fix some parquet writer session level defaults
devinjdangelo opened a new pull request, #7295:
URL: https://github.com/apache/arrow-datafusion/pull/7295
## Which issue does this PR close?
None
## Rationale for this change
I noticed that with the current default parquet writer settings, writing a single row to a parquet file results in a file over 4MB in size. Some of the config values are being set to explicit values (e.g. plain encoding) rather than the default setting in the `parquet` crate which is to leave these values as `None`.
## What changes are included in this PR?
This PR makes the session level default for these values `None` to match the behavior of the `parquet` crate. After doing so, parquet files are now a minimum of 4KB rather than 4MB.
## Are these changes tested?
Yes by existing tests.
## Are there any user-facing changes?
Better default parquet writer settings
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb merged pull request #7295: Minor: fix some parquet writer session level defaults
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #7295:
URL: https://github.com/apache/arrow-datafusion/pull/7295
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #7295: Minor: fix some parquet writer session level defaults
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #7295:
URL: https://github.com/apache/arrow-datafusion/pull/7295#discussion_r1296223733
##########
datafusion/common/src/config.rs:
##########
@@ -336,16 +336,16 @@ config_namespace! {
/// bit_packed, delta_binary_packed, delta_length_byte_array,
/// delta_byte_array, rle_dictionary, and byte_stream_split.
/// These values are not case sensitive.
- pub encoding: String, default = "plain".into()
+ pub encoding: Option<String>, default = None
/// Sets if bloom filter is enabled for any column
pub bloom_filter_enabled: bool, default = false
/// Sets bloom filter false positive probability
- pub bloom_filter_fpp: f64, default = 0.05
+ pub bloom_filter_fpp: Option<f64>, default = None
/// Sets bloom filter number of distinct values
Review Comment:
```suggestion
/// Sets bloom filter number of distinct values. If NULL, uses
/// default parquet writer setting
```
##########
datafusion/common/src/config.rs:
##########
@@ -303,21 +303,21 @@ config_namespace! {
/// Valid values are: uncompressed, snappy, gzip(level),
/// lzo, brotli(level), lz4, zstd(level), and lz4_raw.
/// These values are not case sensitive.
- pub compression: String, default = "snappy".into()
+ pub compression: Option<String>, default = None
/// Sets if dictionary encoding is enabled
- pub dictionary_enabled: bool, default = true
+ pub dictionary_enabled: Option<bool>, default = None
/// Sets best effort maximum dictionary page size, in bytes
pub dictionary_page_size_limit: usize, default = 1024 * 1024
/// Sets if statistics are enabled for any column
/// Valid values are: "none", "chunk", and "page"
/// These values are not case sensitive.
Review Comment:
```suggestion
/// These values are not case sensitive. If NULL, uses
/// default parquet writer setting
```
##########
datafusion/common/src/config.rs:
##########
@@ -303,21 +303,21 @@ config_namespace! {
/// Valid values are: uncompressed, snappy, gzip(level),
/// lzo, brotli(level), lz4, zstd(level), and lz4_raw.
/// These values are not case sensitive.
- pub compression: String, default = "snappy".into()
+ pub compression: Option<String>, default = None
/// Sets if dictionary encoding is enabled
Review Comment:
```suggestion
/// Sets if dictionary encoding is enabled. If NULL, uses
/// default parquet writer setting
```
##########
datafusion/common/src/config.rs:
##########
@@ -336,16 +336,16 @@ config_namespace! {
/// bit_packed, delta_binary_packed, delta_length_byte_array,
/// delta_byte_array, rle_dictionary, and byte_stream_split.
/// These values are not case sensitive.
- pub encoding: String, default = "plain".into()
+ pub encoding: Option<String>, default = None
/// Sets if bloom filter is enabled for any column
pub bloom_filter_enabled: bool, default = false
/// Sets bloom filter false positive probability
Review Comment:
```suggestion
/// Sets bloom filter false positive probability. If NULL, uses
/// default parquet writer setting
```
##########
datafusion/common/src/config.rs:
##########
@@ -303,21 +303,21 @@ config_namespace! {
/// Valid values are: uncompressed, snappy, gzip(level),
/// lzo, brotli(level), lz4, zstd(level), and lz4_raw.
/// These values are not case sensitive.
- pub compression: String, default = "snappy".into()
+ pub compression: Option<String>, default = None
/// Sets if dictionary encoding is enabled
- pub dictionary_enabled: bool, default = true
+ pub dictionary_enabled: Option<bool>, default = None
/// Sets best effort maximum dictionary page size, in bytes
pub dictionary_page_size_limit: usize, default = 1024 * 1024
/// Sets if statistics are enabled for any column
/// Valid values are: "none", "chunk", and "page"
/// These values are not case sensitive.
- pub statistics_enabled: String, default = "page".into()
+ pub statistics_enabled: Option<String>, default = None
/// Sets max statistics size for any column
Review Comment:
```suggestion
/// Sets max statistics size for any column. If NULL, uses
/// default parquet writer setting
```
##########
datafusion/common/src/config.rs:
##########
@@ -303,21 +303,21 @@ config_namespace! {
/// Valid values are: uncompressed, snappy, gzip(level),
/// lzo, brotli(level), lz4, zstd(level), and lz4_raw.
/// These values are not case sensitive.
Review Comment:
I think it would help to be clear what NULL means:
```suggestion
/// These values are not case sensitive. If NULL, uses
/// default parquet writer setting
```
##########
datafusion/common/src/config.rs:
##########
@@ -336,16 +336,16 @@ config_namespace! {
/// bit_packed, delta_binary_packed, delta_length_byte_array,
/// delta_byte_array, rle_dictionary, and byte_stream_split.
/// These values are not case sensitive.
Review Comment:
```suggestion
/// These values are not case sensitive. If NULL, uses
/// default parquet writer setting
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on pull request #7295: Minor: fix some parquet writer session level defaults
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7295:
URL: https://github.com/apache/arrow-datafusion/pull/7295#issuecomment-1682202514
Thanks again @devinjdangelo
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org