Skip to content

Commit c077799

Browse files
committed
fmt
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
1 parent 06d02fe commit c077799

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

  • encodings/parquet-variant/src

encodings/parquet-variant/src/lib.rs

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,10 @@ fn parquet_variant_to_scalar(variant: PqVariant<'_, '_>) -> VortexResult<Scalar>
561561
))));
562562
}
563563
let fields = StructFields::new(FieldNames::from(names), dtypes);
564-
Scalar::try_new(DType::Struct(fields, nn), Some(ScalarValue::List(field_values)))?
564+
Scalar::try_new(
565+
DType::Struct(fields, nn),
566+
Some(ScalarValue::List(field_values)),
567+
)?
565568
}
566569
})
567570
}
@@ -592,10 +595,7 @@ impl OperationsVTable<ParquetVariant> for ParquetVariant {
592595
.value()
593596
.cloned()
594597
.vortex_expect("non-null value row must have binary value");
595-
parquet_variant_to_scalar(PqVariant::try_new(
596-
metadata.as_ref(),
597-
value.as_ref(),
598-
)?)?
598+
parquet_variant_to_scalar(PqVariant::try_new(metadata.as_ref(), value.as_ref())?)?
599599
} else {
600600
Scalar::null(DType::Null)
601601
};
@@ -697,7 +697,10 @@ mod tests {
697697
let vortex_arr = ParquetVariantArray::from_arrow_variant(&arrow_variant)?;
698698

699699
assert_eq!(vortex_arr.len(), 3);
700-
assert_eq!(vortex_arr.dtype(), &DType::Variant(Nullability::NonNullable));
700+
assert_eq!(
701+
vortex_arr.dtype(),
702+
&DType::Variant(Nullability::NonNullable)
703+
);
701704

702705
Ok(())
703706
}
@@ -728,14 +731,14 @@ mod tests {
728731

729732
let vortex_arr = ParquetVariantArray::from_arrow_variant(&arrow_variant)?;
730733
assert_eq!(vortex_arr.len(), 3);
731-
assert_eq!(vortex_arr.dtype(), &DType::Variant(Nullability::NonNullable));
734+
assert_eq!(
735+
vortex_arr.dtype(),
736+
&DType::Variant(Nullability::NonNullable)
737+
);
732738

733739
// Verify typed_value is present by downcasting through the layers
734740
let variant_arr = vortex_arr.as_opt::<Variant>().unwrap();
735-
let inner = variant_arr
736-
.child()
737-
.as_opt::<ParquetVariant>()
738-
.unwrap();
741+
let inner = variant_arr.child().as_opt::<ParquetVariant>().unwrap();
739742
assert!(inner.typed_value_array().is_some());
740743

741744
Ok(())

0 commit comments

Comments
 (0)