-
Notifications
You must be signed in to change notification settings - Fork 828
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
Append Row to Rows (#4466) #4470
Conversation
@@ -832,14 +871,25 @@ struct RowConfig { | |||
#[derive(Debug)] | |||
pub struct Rows { | |||
/// Underlying row bytes | |||
buffer: Box<[u8]>, | |||
buffer: Vec<u8>, |
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 need to double-check this doesn't result in a performance regression, it shouldn't but stranger things have happened
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.
Thank you ❤️
Arc::ptr_eq(&row.config.fields, &self.config.fields), | ||
"row was not produced by this RowConverter" | ||
); | ||
self.config.validate_utf8 |= row.config.validate_utf8; |
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.
Why doesn't this just assert that the values of validate_utf8
are the same?
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.
This is consistent with the logic elsewhere, and is ultimately harmless
/// # use arrow_row::{Row, RowConverter, SortField}; | ||
/// # use arrow_schema::DataType; | ||
/// # | ||
/// let mut converter = RowConverter::new(vec![SortField::new(DataType::Utf8)]).unwrap(); |
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.
/// let mut converter = RowConverter::new(vec![SortField::new(DataType::Utf8)]).unwrap(); | |
/// // This example shows how to buffer only the Row values | |
/// let mut converter = RowConverter::new(vec![SortField::new(DataType::Utf8)]).unwrap(); |
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.
Unfortunately this does appear to regress performance, in some cases quite dramatically... |
There is a fair bit of noise, but I'm happy this doesn't drastically regress the performance anymore
|
Which issue does this PR close?
Closes #4466
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?