-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor: name some constant values in arrow writer, parquet writer #8642
Conversation
LGTM. I believe the parallel parquet writer has the same two constants as well. |
@@ -193,6 +193,13 @@ impl DisplayAs for ArrowFileSink { | |||
} | |||
} | |||
|
|||
/// Initial writing buffer size. Note this is just a size hint for efficiency. It | |||
/// will grow beyond the set value if needed. | |||
const INITIAL_BUFFER_BYTES: usize = 1048576; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for documenting that, yesterday was pondering what those values exactly mean
there are more to go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed follow on PR #8656
Update: since this PR wasn't yet approved, I'll just push commits here
@@ -75,6 +75,17 @@ use crate::physical_plan::{ | |||
Statistics, | |||
}; | |||
|
|||
/// Size of the buffer for [`AsyncArrowWriter`]. | |||
const PARQUET_WRITER_BUFFER_SIZE: usize = 10485760; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why these values are (slightly) different, but I figured we could start by keeping them the same and then could unify them as a follow on if needed
Thank you @andygrove |
…che#8642) * Minor: name some constant values in arrow writer * Add constants to parquet.rs, update doc comments * fix
Which issue does this PR close?
Follow on to #8608
Rationale for this change
The presence of numbers in the source code was not immediately obvious to me and I think it is clearer when there are comments to guide understanding. See #8608 (comment)
What changes are included in this PR?
Give two constants a name and add some docstrings to explain what they do
Are these changes tested?
Are there any user-facing changes?