Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update comments
  • Loading branch information
alamb committed Aug 6, 2025
commit 330a68d08268e004a286bb07ab3aacf5353b02e4
6 changes: 4 additions & 2 deletions parquet-variant-compute/src/cast_to_variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub fn cast_to_variant(input: &dyn Array) -> Result<VariantArray, ArrowError> {
let mut builder = VariantArrayBuilder::new(input.len());

let input_type = input.data_type();
// todo: use `downcast_primitive` to avoid the boilerplate and match more types
// todo: handle other types like Boolean, Strings, Date, Timestamp, etc.
match input_type {
DataType::Int8 => {
primitive_conversion!(Int8Type, input, builder);
Expand Down Expand Up @@ -107,7 +107,9 @@ pub fn cast_to_variant(input: &dyn Array) -> Result<VariantArray, ArrowError> {
Ok(builder.build())
}

// TODO add cast_with_options that allow specifying
// TODO do we need a cast_with_options to allow specifying conversion behavior,
// e.g. how to handle overflows, whether to convert to Variant::Null or return
// an error, etc. ?

#[cfg(test)]
mod tests {
Expand Down
Loading