diff --git a/src/array/utf8/mod.rs b/src/array/utf8/mod.rs index 69c5af6e8f0..67c6c9c3a39 100644 --- a/src/array/utf8/mod.rs +++ b/src/array/utf8/mod.rs @@ -590,3 +590,19 @@ unsafe impl GenericBinaryArray for Utf8Array { self.offsets() } } + +impl Default for Utf8Array { + fn default() -> Self { + let data_type = if O::IS_LARGE { + DataType::LargeUtf8 + } else { + DataType::Utf8 + }; + Utf8Array::new( + data_type, + vec![O::from_usize(0).unwrap()].into(), + Default::default(), + None, + ) + } +}