alamb commented on code in PR #8365:
URL: https://github.com/apache/arrow-rs/pull/8365#discussion_r2363799256
##########
parquet-variant-compute/src/variant_get.rs:
##########
@@ -242,19 +243,15 @@ fn shredded_get_path(
/// quickly become annoying (and inefficient) to call `variant_get` for each
leaf value in a struct or
/// list and then try to assemble the results.
pub fn variant_get(input: &ArrayRef, options: GetOptions) -> Result<ArrayRef> {
- let variant_array: &VariantArray =
input.as_any().downcast_ref().ok_or_else(|| {
- ArrowError::InvalidArgumentError(
- "expected a VariantArray as the input for variant_get".to_owned(),
- )
- })?;
+ let variant_array = VariantArray::try_new(&input)?;
Review Comment:
Yes, excellent eyes. Fixed in https://github.com/apache/arrow-rs/pull/8392
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]