You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Variant] Enforce shredded-type validation in shred_variant (#8796)
# Which issue does this PR close?
- Closes#8795.
# Rationale for this change
Mentioned in the issue
# What changes are included in this PR?
Add validation in `shred_variant` to allow spec-approved types only.
# Are these changes tested?
Yes
# Are there any user-facing changes?
returnErr(ArrowError::InvalidArgumentError(format!("{data_type} is not a valid variant shredding type. Only FixedSizeBinary(16) for UUID is supported.")))
155
+
}
156
+
_ => {
157
+
returnErr(ArrowError::InvalidArgumentError(format!("{data_type} is not a valid variant shredding type")))
158
+
}
133
159
};
134
160
Ok(builder)
135
161
}
@@ -327,7 +353,7 @@ mod tests {
327
353
usesuper::*;
328
354
usecrate::VariantArrayBuilder;
329
355
use arrow::array::{Array,FixedSizeBinaryArray,Float64Array,Int64Array};
330
-
use arrow::datatypes::{DataType,Field,Fields};
356
+
use arrow::datatypes::{DataType,Field,Fields,TimeUnit,UnionFields,UnionMode};
331
357
use parquet_variant::{ObjectBuilder,ReadOnlyMetadataBuilder,Variant,VariantBuilder};
0 commit comments