From a8480012259f8b63afe6e8412fc4255ec55f54ac Mon Sep 17 00:00:00 2001 From: Raphael Taylor-Davies Date: Fri, 15 Sep 2023 10:08:33 +0100 Subject: [PATCH] Stateless Row Format (#4811) --- arrow-row/src/variable.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/arrow-row/src/variable.rs b/arrow-row/src/variable.rs index e9f6160bf43c..4367cbe7ff52 100644 --- a/arrow-row/src/variable.rs +++ b/arrow-row/src/variable.rs @@ -224,20 +224,8 @@ pub fn decode_binary( pub unsafe fn decode_string( rows: &mut [&[u8]], options: SortOptions, - validate_utf8: bool, + _validate_utf8: bool, ) -> GenericStringArray { let decoded = decode_binary::(rows, options); - - if validate_utf8 { - return GenericStringArray::from(decoded); - } - - let builder = decoded - .into_data() - .into_builder() - .data_type(GenericStringArray::::DATA_TYPE); - - // SAFETY: - // Row data must have come from a valid UTF-8 array - GenericStringArray::from(builder.build_unchecked()) + return GenericStringArray::from(decoded); }