sdf-jkl commented on code in PR #12246:
URL: https://github.com/apache/arrow-rs/pull/12246#discussion_r4570639137
##########
parquet-variant-compute/src/cast_to_variant.rs:
##########
@@ -1143,6 +1143,58 @@ mod tests {
}
}
+ #[test]
+ fn test_cast_to_variant_duration_or_interval_errors_empty_or_all_null() {
Review Comment:
This test repeats the type list and error assertion of
`test_cast_to_variant_duration_or_interval_errors`. That test only missed the
bug because all its arrays contain a value. I'd fold the new cases into it,
generating the empty, all-null, list, struct and union cases from each array's
`data_type()`, so there is one list of unsupported types
##########
parquet-variant-compute/src/cast_to_variant.rs:
##########
@@ -45,16 +45,16 @@ pub fn cast_to_variant_with_options(
input: &dyn Array,
options: &CastOptions,
) -> Result<VariantArray, ArrowError> {
+ // Create row builder for the input array type
Review Comment:
Could this say why it has to come before the fast path, so it doesn't get
moved back for performance later?
```suggestion
// Build before the all-null fast path so unsupported types fail
regardless of contents.
```
--
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]