You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "etseidl (via GitHub)" <gi...@apache.org> on 2025/05/28 18:03:52 UTC
[PR] Add references for defaults in `WriterProperties` [arrow-rs]
etseidl opened a new pull request, #7558:
URL: https://github.com/apache/arrow-rs/pull/7558
# Which issue does this PR close?
Follow-on to #7553
# Rationale for this change
@mbrobbel suggestion (https://github.com/apache/arrow-rs/pull/7553#discussion_r2111357463).
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
# What changes are included in this PR?
Provide references for default values. The values don't show up in docs, but they are at least visible in my IDE (which helps verify their accuracy).
I also took this opportunity to move a few global setters up with the rest of the globals...several were buried down with column specific setters.
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
# Are there any user-facing changes?
No
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!---
If there are any breaking changes to public APIs, please call them out.
-->
--
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
Re: [PR] Add references for defaults in `WriterPropertiesBuilder` [arrow-rs]
Posted by "mbrobbel (via GitHub)" <gi...@apache.org>.
mbrobbel commented on code in PR #7558:
URL: https://github.com/apache/arrow-rs/pull/7558#discussion_r2120491504
##########
parquet/src/file/properties.rs:
##########
@@ -614,6 +622,84 @@ impl WriterPropertiesBuilder {
self
}
+ /// Sets the max length of min/max value fields when writing the column
+ /// [`Index`] (defaults to `Some(64)` via [`DEFAULT_COLUMN_INDEX_TRUNCATE_LENGTH`]).
+ ///
+ /// This can be used to prevent columns with very long values (hundreds of
+ /// bytes long) from causing the parquet metadata to become huge.
+ ///
+ /// # Notes
+ ///
+ /// The column [`Index`] is written when [`Self::set_statistics_enabled`] is
+ /// set to [`EnabledStatistics::Page`].
+ ///
+ /// * If `Some`, must be greater than 0, otherwise will panic
Review Comment:
https://github.com/apache/arrow-rs/issues/7587
--
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
Re: [PR] Add references for defaults in `WriterPropertiesBuilder` [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #7558:
URL: https://github.com/apache/arrow-rs/pull/7558
--
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
Re: [PR] Add references for defaults in `WriterProperties` [arrow-rs]
Posted by "mbrobbel (via GitHub)" <gi...@apache.org>.
mbrobbel commented on code in PR #7558:
URL: https://github.com/apache/arrow-rs/pull/7558#discussion_r2113252581
##########
parquet/src/file/properties.rs:
##########
@@ -614,6 +622,84 @@ impl WriterPropertiesBuilder {
self
}
+ /// Sets the max length of min/max value fields when writing the column
+ /// [`Index`] (defaults to `Some(64)` via [`DEFAULT_COLUMN_INDEX_TRUNCATE_LENGTH`]).
+ ///
+ /// This can be used to prevent columns with very long values (hundreds of
+ /// bytes long) from causing the parquet metadata to become huge.
+ ///
+ /// # Notes
+ ///
+ /// The column [`Index`] is written when [`Self::set_statistics_enabled`] is
+ /// set to [`EnabledStatistics::Page`].
+ ///
+ /// * If `Some`, must be greater than 0, otherwise will panic
Review Comment:
Maybe at some point we could change this to use `NonZeroUsize`?
--
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
Re: [PR] Add references for defaults in `WriterProperties` [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #7558:
URL: https://github.com/apache/arrow-rs/pull/7558#discussion_r2114705752
##########
parquet/src/file/properties.rs:
##########
@@ -614,6 +622,84 @@ impl WriterPropertiesBuilder {
self
}
+ /// Sets the max length of min/max value fields when writing the column
+ /// [`Index`] (defaults to `Some(64)` via [`DEFAULT_COLUMN_INDEX_TRUNCATE_LENGTH`]).
+ ///
+ /// This can be used to prevent columns with very long values (hundreds of
+ /// bytes long) from causing the parquet metadata to become huge.
+ ///
+ /// # Notes
+ ///
+ /// The column [`Index`] is written when [`Self::set_statistics_enabled`] is
+ /// set to [`EnabledStatistics::Page`].
+ ///
+ /// * If `Some`, must be greater than 0, otherwise will panic
Review Comment:
Next major version release perhaps
--
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
Re: [PR] Add references for defaults in `WriterProperties` [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #7558:
URL: https://github.com/apache/arrow-rs/pull/7558#discussion_r2114706862
##########
parquet/src/file/properties.rs:
##########
@@ -614,6 +622,84 @@ impl WriterPropertiesBuilder {
self
}
+ /// Sets the max length of min/max value fields when writing the column
+ /// [`Index`] (defaults to `Some(64)` via [`DEFAULT_COLUMN_INDEX_TRUNCATE_LENGTH`]).
+ ///
+ /// This can be used to prevent columns with very long values (hundreds of
+ /// bytes long) from causing the parquet metadata to become huge.
+ ///
+ /// # Notes
+ ///
+ /// The column [`Index`] is written when [`Self::set_statistics_enabled`] is
+ /// set to [`EnabledStatistics::Page`].
+ ///
+ /// * If `Some`, must be greater than 0, otherwise will panic
Review Comment:
Next major version release perhaps
--
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
Re: [PR] Add references for defaults in `WriterPropertiesBuilder` [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7558:
URL: https://github.com/apache/arrow-rs/pull/7558#issuecomment-2925601842
Thanks again @etseidl and @mbrobbel
--
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