From cc50b171c1051ab0e1d38a942d460aec94cd8bc1 Mon Sep 17 00:00:00 2001 From: Masha Basmanova Date: Tue, 16 May 2023 13:42:53 -0700 Subject: [PATCH] Delete unused UnsafeRowStaticParser (#4961) Summary: Pull Request resolved: https://github.com/facebookincubator/velox/pull/4961 Reviewed By: kevinwilfong Differential Revision: D45914154 Pulled By: mbasmanova fbshipit-source-id: d27bfdf2f1f5aa85fc235646af47f933ed86c7d0 --- velox/row/UnsafeRowParser.h | 49 ------------------------------------- 1 file changed, 49 deletions(-) diff --git a/velox/row/UnsafeRowParser.h b/velox/row/UnsafeRowParser.h index 885ed7090ed0..d3f92d75973d 100644 --- a/velox/row/UnsafeRowParser.h +++ b/velox/row/UnsafeRowParser.h @@ -65,55 +65,6 @@ struct UnsafeRowStaticUtilities { } }; -/** - * A templated UnsafeRow parser. - * @tparam SqlTypes The row schema. - */ -template -struct UnsafeRowStaticParser { - template - using type_at = - typename std::tuple_element>::type; - - /** - * The const UnsafeRow for parsing. - */ - const UnsafeRow row; - - UnsafeRowStaticParser(std::string_view data) - : row(UnsafeRow( - const_cast(data.data()), - std::tuple_size>::value)) {} - - /** - * - * @tparam idx - * @return - */ - template - const std::string_view dataAt() const { - using CurrentType = type_at; - - constexpr bool isFixedWidth = - UnsafeRowStaticUtilities::isFixedWidth(); - using NativeType = - typename TypeTraits()>::NativeType; - if constexpr (!std::is_same_v) { - return row.readDataAt(idx, isFixedWidth, sizeof(NativeType)); - } - return row.readDataAt(idx, isFixedWidth); - } - - /** - * @param idx - * @return whether the element is null at the given index - */ - bool isNullAt(size_t idx) const { - return row.isNullAt(idx); - } -}; - /** * A dynamic UnsafeRowParser that uses TypePtr. */