1717#include " sparrow/utils/extension.hpp"
1818#include " sparrow/variable_size_binary_array.hpp"
1919#include " sparrow/variable_size_binary_view_array.hpp"
20- #include " sparrow_extensions/config/config.hpp"
2120
22- namespace sparrow
21+ namespace sparrow_extensions
2322{
2423
25- using json_extension = simple_extension<" arrow.json" >;
24+ using json_extension = sparrow:: simple_extension<" arrow.json" >;
2625 /* *
2726 * @brief JSON array with 32-bit offsets.
2827 *
@@ -41,9 +40,9 @@ namespace sparrow
4140 * @see big_json_array for larger datasets requiring 64-bit offsets
4241 * @see json_view_array for view-based storage
4342 */
44- using json_array = variable_size_binary_array_impl<
45- arrow_traits<std::string>::value_type,
46- arrow_traits<std::string>::const_reference,
43+ using json_array = sparrow:: variable_size_binary_array_impl<
44+ sparrow:: arrow_traits<std::string>::value_type,
45+ sparrow:: arrow_traits<std::string>::const_reference,
4746 std::int32_t ,
4847 json_extension>;
4948
@@ -64,9 +63,9 @@ namespace sparrow
6463 * @see json_array for smaller datasets with 32-bit offsets
6564 * @see json_view_array for view-based storage
6665 */
67- using big_json_array = variable_size_binary_array_impl<
68- arrow_traits<std::string>::value_type,
69- arrow_traits<std::string>::const_reference,
66+ using big_json_array = sparrow:: variable_size_binary_array_impl<
67+ sparrow:: arrow_traits<std::string>::value_type,
68+ sparrow:: arrow_traits<std::string>::const_reference,
7069 std::int64_t ,
7170 json_extension>;
7271
@@ -88,38 +87,38 @@ namespace sparrow
8887 * @see json_array for offset-based storage with 32-bit offsets
8988 * @see big_json_array for offset-based storage with 64-bit offsets
9089 */
91- using json_view_array = variable_size_binary_view_array_impl<
92- arrow_traits<std::string>::value_type,
93- arrow_traits<std::string>::const_reference,
90+ using json_view_array = sparrow:: variable_size_binary_view_array_impl<
91+ sparrow:: arrow_traits<std::string>::value_type,
92+ sparrow:: arrow_traits<std::string>::const_reference,
9493 json_extension>;
94+ }
9595
96- namespace detail
96+ namespace sparrow ::detail
97+ {
98+ template <>
99+ struct get_data_type_from_array <sparrow_extensions::json_array>
97100 {
98- template <>
99- struct get_data_type_from_array <sparrow::json_array>
101+ [[nodiscard]] static constexpr sparrow::data_type get ()
100102 {
101- [[nodiscard]] static constexpr sparrow::data_type get ()
102- {
103- return sparrow::data_type::STRING;
104- }
105- };
103+ return sparrow::data_type::STRING;
104+ }
105+ };
106106
107- template <>
108- struct get_data_type_from_array <sparrow::big_json_array>
107+ template <>
108+ struct get_data_type_from_array <sparrow_extensions::big_json_array>
109+ {
110+ [[nodiscard]] static constexpr sparrow::data_type get ()
109111 {
110- [[nodiscard]] static constexpr sparrow::data_type get ()
111- {
112- return sparrow::data_type::LARGE_STRING;
113- }
114- };
112+ return sparrow::data_type::LARGE_STRING;
113+ }
114+ };
115115
116- template <>
117- struct get_data_type_from_array <sparrow::json_view_array>
116+ template <>
117+ struct get_data_type_from_array <sparrow_extensions::json_view_array>
118+ {
119+ [[nodiscard]] static constexpr sparrow::data_type get ()
118120 {
119- [[nodiscard]] static constexpr sparrow::data_type get ()
120- {
121- return sparrow::data_type::STRING_VIEW;
122- }
123- };
124- }
125- }
121+ return sparrow::data_type::STRING_VIEW;
122+ }
123+ };
124+ }
0 commit comments