Skip to content

Commit 83b9518

Browse files
committed
Skip unshredded fast-path when VariantType fields are present
1 parent ec8d92b commit 83b9518

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

parquet-variant-compute/src/variant_get.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,10 @@ fn shredded_get_path(
224224
// For shredded/partially-shredded targets (`typed_value` present), recurse into each field
225225
// separately to take advantage of deeper shredding in child fields.
226226
if let DataType::Struct(fields) = as_field.data_type() {
227-
if target.typed_value_field().is_none() {
227+
let has_variant_fields = fields
228+
.iter()
229+
.any(|f| f.try_extension_type::<VariantType>().is_ok());
230+
if target.typed_value_field().is_none() && !has_variant_fields {
228231
return shred_basic_variant(target, VariantPath::default(), Some(as_field));
229232
}
230233

0 commit comments

Comments
 (0)