-
Notifications
You must be signed in to change notification settings - Fork 989
Convert RunEndEncoded field to Parquet #8069
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
base: main
Are you sure you want to change the base?
Conversation
ec40c7f
to
5a43f13
Compare
5a43f13
to
4bea341
Compare
DataType::RunEndEncoded(_, v) if is_leaf(v.data_type()) => { | ||
let levels = ArrayLevels::new(parent_ctx, is_nullable, array.clone()); | ||
Ok(Self::Primitive(levels)) | ||
} |
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.
Exactly same as Dictionary above:
arrow-rs/parquet/src/arrow/arrow_writer/levels.rs
Lines 157 to 160 in 04f217b
DataType::Dictionary(_, v) if is_leaf(v.as_ref()) => { | |
let levels = ArrayLevels::new(parent_ctx, is_nullable, array.clone()); | |
Ok(Self::Primitive(levels)) | |
} |
@@ -59,6 +59,28 @@ macro_rules! downcast_dict_op { | |||
}; | |||
} | |||
|
|||
macro_rules! downcast_ree_impl { |
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.
Mimicked downcast_dict
@@ -167,6 +168,7 @@ pub fn can_cast_types(from_type: &DataType, to_type: &DataType) -> bool { | |||
can_cast_types(from_key.data_type(), to_key.data_type()) && can_cast_types(from_value.data_type(), to_value.data_type()), | |||
_ => false | |||
}, | |||
// TODO: RunEndEncoded here? |
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 handled in #7713
4bea341
to
0931768
Compare
ArrowDataType::FixedSizeBinary(_) => out.push(bytes(leaves.next().unwrap())?), | ||
_ => out.push(col(leaves.next().unwrap())?), | ||
}, | ||
ArrowDataType::RunEndEncoded(_run_ends, value_type) => match value_type.data_type() { |
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've basically copied what Dictionary does. Not sure if correct!
Which issue does this PR close?
Rationale for this change
TODO
What changes are included in this PR?
TODO
Are these changes tested?
TODO
Are there any user-facing changes?
TODO