44 template <
class T,
class OT>
85 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext = empty_extension>
86 class variable_size_binary_array_impl;
88 template <layout_offset OT,
typename Ext = empty_extension>
95 template <layout_offset OT,
typename Ext = empty_extension>
221 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
277 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
285 sizeof(std::ranges::range_value_t<T>) ==
sizeof(std::uint8_t),
286 "Only sequences of types with the same size as uint8_t are supported"
359 template <
class... ARGS>
362 :
self_type(create_proxy(std::forward<ARGS>(args)...))
366 using base_type::get_arrow_proxy;
367 using base_type::size;
416 template <std::ranges::range SIZES_RANGE>
449 std::optional<std::string_view> name = std::nullopt,
450 std::optional<METADATA_RANGE> metadata = std::nullopt
472 std::ranges::input_range R,
476 std::ranges::input_range<std::ranges::range_value_t<R>>
482 std::optional<std::string_view> name = std::nullopt,
483 std::optional<METADATA_RANGE> metadata = std::nullopt
503 template <std::ranges::input_range R, input_metadata_container METADATA_RANGE = std::vector<metadata_pair>>
505 std::ranges::input_range<std::ranges::range_value_t<R>>
506 && mpl::char_like<std::ranges::range_value_t<std::ranges::range_value_t<R>>>
508 [[nodiscard]]
static arrow_proxy create_proxy(
511 std::optional<std::string_view> name = std::nullopt,
512 std::optional<METADATA_RANGE> metadata = std::nullopt
529 template <std::ranges::input_range R, input_metadata_container METADATA_RANGE = std::vector<metadata_pair>>
530 requires std::is_same_v<std::ranges::range_value_t<R>, nullable<T>>
531 [[nodiscard]]
static arrow_proxy create_proxy(
533 std::optional<std::string_view> name = std::nullopt,
534 std::optional<METADATA_RANGE> metadata = std::nullopt
554 template <mpl::
char_like C, input_metadata_container METADATA_RANGE = std::vector<metadata_pair>>
555 [[nodiscard]]
static arrow_proxy create_proxy_impl(
556 u8_buffer<C>&& data_buffer,
558 std::optional<validity_bitmap>&&,
559 std::optional<std::string_view> name = std::nullopt,
560 std::optional<METADATA_RANGE> metadata = std::nullopt
563 static constexpr size_t OFFSET_BUFFER_INDEX = 1;
564 static constexpr size_t DATA_BUFFER_INDEX = 2;
617 [[nodiscard]]
constexpr value_iterator value_begin();
626 [[nodiscard]]
constexpr value_iterator value_end();
704 template <std::ranges::sized_range U>
705 requires mpl::convertible_ranges<U, T>
706 constexpr void resize_values(size_type new_length, U
value);
717 constexpr void resize_offsets(size_type new_length,
offset_type offset_value);
734 template <std::ranges::sized_range U>
735 requires mpl::convertible_ranges<U, T>
768 template <mpl::iterator_of_type<T> InputIt>
791 template <mpl::iterator_of_type<OT> InputIt>
847 template <std::ranges::sized_range U>
848 requires mpl::convertible_ranges<U, T>
849 constexpr void assign(U&& rhs, size_type index);
873 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
877 const auto type = this->get_arrow_proxy().data_type();
885 && std::same_as<OT, int64_t>) )
889 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
890 template <std::ranges::range SIZES_RANGE>
895 std::forward<SIZES_RANGE>(sizes)
899 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
900 template <mpl::
char_like C, val
idity_bitmap_input VB, input_metadata_container METADATA_RANGE>
901 arrow_proxy variable_size_binary_array_impl<T, CR, OT, Ext>::create_proxy(
903 offset_buffer_type&& offsets,
905 std::optional<std::string_view> name,
906 std::optional<METADATA_RANGE> metadata
909 const auto size = offsets.size() - 1;
919 repeat_view<bool>(
true, 0),
924 std::vector<buffer<std::uint8_t>> arr_buffs;
925 arr_buffs.reserve(3);
926 arr_buffs.emplace_back(std::move(vbitmap).extract_storage());
927 arr_buffs.emplace_back(std::move(offsets).extract_storage());
928 arr_buffs.emplace_back(std::move(data_buffer).extract_storage());
931 static_cast<std::int64_t
>(size),
932 static_cast<int64_t
>(null_count),
934 std::move(arr_buffs),
936 repeat_view<bool>(
true, 0),
940 return arrow_proxy{std::move(arr), std::move(schema)};
943 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
944 template <std::ranges::input_range R, val
idity_bitmap_input VB, input_metadata_container METADATA_RANGE>
946 std::ranges::input_range<std::ranges::range_value_t<R>> &&
950 arrow_proxy variable_size_binary_array_impl<T, CR, OT, Ext>::create_proxy(
953 std::optional<std::string_view> name,
954 std::optional<METADATA_RANGE> metadata
957 using values_inner_value_type = std::ranges::range_value_t<std::ranges::range_value_t<R>>;
959 auto size_range = values
960 | std::views::transform(
963 return std::ranges::size(v);
966 auto offset_buffer = offset_from_sizes(size_range);
969 std::move(data_buffer),
970 std::move(offset_buffer),
971 std::forward<VB>(validity_input),
972 std::forward<std::optional<std::string_view>>(name),
973 std::forward<std::optional<METADATA_RANGE>>(metadata)
977 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
978 template <std::ranges::input_range R, input_metadata_container METADATA_RANGE>
979 requires std::is_same_v<std::ranges::range_value_t<R>,
nullable<T>>
980 arrow_proxy variable_size_binary_array_impl<T, CR, OT, Ext>::create_proxy(
982 std::optional<std::string_view> name,
983 std::optional<METADATA_RANGE> metadata
987 const auto values = range
988 | std::views::transform(
994 const auto is_non_null = range
995 | std::views::transform(
998 return v.has_value();
1001 return self_type::create_proxy(values, is_non_null, std::move(name), std::move(metadata));
1004 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1006 std::ranges::input_range R,
1009 std::ranges::input_range<std::ranges::range_value_t<R>> &&
1014 [[nodiscard]]
arrow_proxy variable_size_binary_array_impl<T, CR, OT, Ext>::create_proxy(
1017 std::optional<std::string_view> name,
1018 std::optional<METADATA_RANGE> metadata
1021 using values_inner_value_type = std::ranges::range_value_t<std::ranges::range_value_t<R>>;
1022 const size_t size = std::ranges::size(values);
1024 auto size_range = values
1025 | std::views::transform(
1028 return std::ranges::size(v);
1031 auto offset_buffer = offset_from_sizes(size_range);
1032 return create_proxy_impl(
1033 std::move(data_buffer),
1034 std::move(offset_buffer),
1042 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1043 template <mpl::
char_like C, input_metadata_container METADATA_RANGE>
1044 [[nodiscard]]
arrow_proxy variable_size_binary_array_impl<T, CR, OT, Ext>::create_proxy_impl(
1046 offset_buffer_type&& list_offsets,
1047 std::optional<validity_bitmap>&& bitmap,
1048 std::optional<std::string_view> name,
1049 std::optional<METADATA_RANGE> metadata
1052 const auto size = list_offsets.size() - 1;
1053 const auto null_count = bitmap.has_value() ? bitmap->null_count() : 0;
1055 const std::optional<std::unordered_set<sparrow::ArrowFlag>>
1056 flags = bitmap.has_value()
1063 std::move(metadata),
1071 std::vector<buffer<std::uint8_t>> arr_buffs;
1072 arr_buffs.reserve(3);
1073 arr_buffs.emplace_back(
1074 bitmap.has_value() ? std::move(*bitmap).extract_storage()
1077 arr_buffs.emplace_back(std::move(list_offsets).extract_storage());
1078 arr_buffs.emplace_back(std::move(data_buffer).extract_storage());
1081 static_cast<std::int64_t
>(size),
1082 static_cast<int64_t
>(null_count),
1084 std::move(arr_buffs),
1090 arrow_proxy proxy{std::move(arr), std::move(schema)};
1095 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1096 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::data(size_type i) -> data_iterator
1100 return proxy.buffers()[DATA_BUFFER_INDEX].template data<data_value_type>() + i;
1103 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1104 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::data(size_type i)
const
1105 -> const_data_iterator
1107 const arrow_proxy& proxy = this->get_arrow_proxy();
1109 return proxy.buffers()[DATA_BUFFER_INDEX].template data<const data_value_type>() + i;
1112 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1113 template <std::ranges::sized_range U>
1115 constexpr void variable_size_binary_array_impl<T, CR, OT, Ext>::assign(U&& rhs, size_type index)
1118 const auto offset_beg = *offset(index);
1119 const auto offset_end = *offset(index + 1);
1120 const auto initial_value_length = offset_end - offset_beg;
1121 const auto new_value_length =
static_cast<OT
>(std::ranges::size(rhs));
1122 const OT shift_byte_count = new_value_length - initial_value_length;
1123 auto& data_buffer = this->get_arrow_proxy().get_array_private_data()->buffers()[DATA_BUFFER_INDEX];
1124 if (shift_byte_count != 0)
1127 if (shift_byte_count > 0)
1129 const offset_type last_offset = *offset(
size());
1130 check_offset_overflow(last_offset, shift_byte_count);
1133 const auto shift_val_abs =
static_cast<size_t>(std::abs(shift_byte_count));
1134 const auto new_data_buffer_size = shift_byte_count < 0 ? data_buffer.size() - shift_val_abs
1135 : data_buffer.size() + shift_val_abs;
1137 if (shift_byte_count > 0)
1139 data_buffer.resize(new_data_buffer_size);
1152 sparrow::next(data_buffer.begin(), offset_end + shift_byte_count)
1154 data_buffer.resize(new_data_buffer_size);
1160 [shift_byte_count](
auto& offset)
1162 offset += shift_byte_count;
1166 auto tmp = std::views::transform(
1170 return static_cast<std::uint8_t
>(val);
1174 std::copy(std::ranges::begin(tmp), std::ranges::end(tmp),
sparrow::next(data_buffer.begin(), offset_beg));
1177 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1178 constexpr void variable_size_binary_array_impl<T, CR, OT, Ext>::check_offset_overflow(
1179 offset_type current_offset,
1180 offset_type size_to_add
1183 constexpr offset_type max_offset = std::numeric_limits<offset_type>::max();
1184 if (current_offset > max_offset - size_to_add)
1186 throw std::overflow_error(
"Offset overflow: adding elements would exceed maximum offset value");
1190 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1191 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::offset(size_type i) -> offset_iterator
1194 return get_arrow_proxy().buffers()[OFFSET_BUFFER_INDEX].template data<OT>()
1195 +
static_cast<size_type
>(this->get_arrow_proxy().offset()) + i;
1198 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1199 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::offset(size_type i)
const
1200 -> const_offset_iterator
1203 return this->get_arrow_proxy().buffers()[OFFSET_BUFFER_INDEX].template data<OT>()
1204 +
static_cast<size_type
>(this->get_arrow_proxy().offset()) + i;
1207 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1208 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::offsets_begin() -> offset_iterator
1213 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1214 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::offsets_cbegin() const
1215 -> const_offset_iterator
1220 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1221 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::offsets_end() -> offset_iterator
1223 return offset(
size() + 1);
1226 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1227 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::offsets_cend() const
1228 -> const_offset_iterator
1230 return offset(
size() + 1);
1233 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1240 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1245 const OT offset_begin = *offset(i);
1247 const OT offset_end = *offset(i + 1);
1254 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1255 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::value_begin() -> value_iterator
1257 return value_iterator{
this, 0};
1260 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1261 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::value_end() -> value_iterator
1266 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1267 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::value_cbegin() const -> const_value_iterator
1269 return const_value_iterator{
this, 0};
1272 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1273 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::value_cend() const -> const_value_iterator
1278 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1279 template <std::ranges::sized_range U>
1281 constexpr void variable_size_binary_array_impl<T, CR, OT, Ext>::resize_values(size_type new_length, U value)
1283 const size_t new_size = new_length +
static_cast<size_t>(this->get_arrow_proxy().offset());
1284 auto& buffers = this->get_arrow_proxy().get_array_private_data()->buffers();
1285 if (new_length <
size())
1287 const auto offset_begin =
static_cast<size_t>(*offset(new_length));
1288 auto& data_buffer = buffers[DATA_BUFFER_INDEX];
1289 data_buffer.resize(offset_begin);
1290 auto& offset_buffer = buffers[OFFSET_BUFFER_INDEX];
1292 offset_buffer_adaptor.resize(new_size + 1);
1294 else if (new_length >
size())
1296 insert_value(value_cend(), value, new_length -
size());
1300 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1301 template <std::ranges::sized_range U>
1307 const auto idx =
static_cast<size_t>(std::distance(value_cbegin(), pos));
1308 const OT offset_begin = *offset(idx);
1309 const std::vector<uint8_t> casted_value{
value.cbegin(),
value.cend()};
1311 const auto joined_repeated_value_range = std::ranges::views::join(my_repeat_view);
1312 auto& data_buffer = this->get_arrow_proxy().get_array_private_data()->buffers()[DATA_BUFFER_INDEX];
1313 const auto pos_to_insert =
sparrow::next(data_buffer.cbegin(), offset_begin);
1314 data_buffer.insert(pos_to_insert, joined_repeated_value_range.begin(), joined_repeated_value_range.end());
1315 insert_offset(offsets_cbegin() + idx + 1,
static_cast<offset_type>(
value.size()), count);
1319 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1320 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::insert_offset(
1321 const_offset_iterator pos,
1322 offset_type value_size,
1324 ) -> offset_iterator
1326 auto& offset_buffer = get_arrow_proxy().get_array_private_data()->buffers()[OFFSET_BUFFER_INDEX];
1327 const auto idx =
static_cast<size_t>(std::distance(offsets_cbegin(), pos));
1329 const offset_type cumulative_size = value_size *
static_cast<offset_type
>(count);
1332 if (!offset_buffer_adaptor.empty())
1334 const offset_type last_offset = offset_buffer_adaptor.back();
1335 check_offset_overflow(last_offset, cumulative_size);
1341 offset_buffer_adaptor.end(),
1342 [cumulative_size](
auto& offset)
1344 offset += cumulative_size;
1347 offset_buffer_adaptor.insert(
sparrow::next(offset_buffer_adaptor.cbegin(), idx + 1), count, 0);
1349 for (
size_t i = idx + 1; i < idx + 1 + count; ++i)
1351 offset_buffer_adaptor[i] = offset_buffer_adaptor[i - 1] + value_size;
1353 return offsets_begin() + idx;
1356 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1357 template <mpl::iterator_of_type<T> InputIt>
1358 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::insert_values(
1364 auto& data_buffer = get_arrow_proxy().get_array_private_data()->buffers()[DATA_BUFFER_INDEX];
1366 auto values = std::ranges::subrange(first, last);
1367 const size_t cumulative_sizes = std::accumulate(
1371 [](
size_t acc,
const T&
value)
1373 return acc + value.size();
1376 data_buffer_adaptor.resize(data_buffer_adaptor.size() + cumulative_sizes);
1377 const auto idx =
static_cast<size_t>(std::distance(value_cbegin(), pos));
1378 const OT offset_begin = *offset(idx);
1379 auto insert_pos =
sparrow::next(data_buffer_adaptor.begin(), offset_begin);
1385 data_buffer_adaptor.end()
1388 for (
const T&
value : values)
1390 std::copy(
value.begin(),
value.end(), insert_pos);
1391 std::advance(insert_pos,
value.size());
1394 const auto sizes_of_each_value = std::ranges::views::transform(
1401 insert_offsets(offset(idx + 1), sizes_of_each_value.begin(), sizes_of_each_value.end());
1405 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1406 template <mpl::iterator_of_type<OT> InputIt>
1407 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::insert_offsets(
1409 InputIt first_sizes,
1416 auto& offset_buffer = get_arrow_proxy().get_array_private_data()->buffers()[OFFSET_BUFFER_INDEX];
1418 const auto idx = std::distance(offsets_cbegin(), pos);
1419 const OT cumulative_sizes = std::reduce(first_sizes, last_sizes, OT(0));
1422 if (!offset_buffer_adaptor.empty())
1424 const offset_type last_offset = offset_buffer_adaptor.back();
1425 check_offset_overflow(last_offset, cumulative_sizes);
1428 const auto sizes_count = std::distance(first_sizes, last_sizes);
1429 offset_buffer_adaptor.resize(offset_buffer_adaptor.size() +
static_cast<size_t>(sizes_count));
1432 offset_buffer_adaptor.begin() + idx,
1433 offset_buffer_adaptor.end() - sizes_count,
1434 offset_buffer_adaptor.end()
1438 offset_buffer_adaptor.begin() + idx + sizes_count,
1439 offset_buffer_adaptor.end(),
1440 [cumulative_sizes](
auto& offset)
1442 offset += cumulative_sizes;
1446 InputIt it = first_sizes;
1447 for (
size_t i =
static_cast<size_t>(idx + 1); i < static_cast<size_t>(idx + sizes_count + 1); ++i)
1449 offset_buffer_adaptor[i] = offset_buffer_adaptor[i - 1] + *it;
1452 return offset(
static_cast<size_t>(idx));
1455 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1457 variable_size_binary_array_impl<T, CR, OT, Ext>::erase_values(const_value_iterator pos, size_type count)
1462 const size_t index =
static_cast<size_t>(std::distance(value_cbegin(), pos));
1467 auto& data_buffer = get_arrow_proxy().get_array_private_data()->buffers()[DATA_BUFFER_INDEX];
1468 const auto offset_begin = *offset(index);
1469 const auto offset_end = *offset(index + count);
1470 const size_t difference =
static_cast<size_t>(offset_end - offset_begin);
1472 std::move(data_buffer.begin() + offset_end, data_buffer.end(), data_buffer.begin() + offset_begin);
1473 data_buffer.resize(data_buffer.size() - difference);
1475 erase_offsets(offset(index), count);
1479 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1481 variable_size_binary_array_impl<T, CR, OT, Ext>::erase_offsets(const_offset_iterator pos, size_type count)
1486 const size_t index =
static_cast<size_t>(std::distance(offsets_cbegin(), pos));
1489 return offset(index);
1491 auto& offset_buffer = get_arrow_proxy().get_array_private_data()->buffers()[OFFSET_BUFFER_INDEX];
1493 const OT offset_start_value = *offset(index);
1494 const OT offset_end_value = *offset(index + count);
1495 const OT difference = offset_end_value - offset_start_value;
1498 sparrow::next(offset_buffer_adaptor.begin(), index + count + 1),
1499 offset_buffer_adaptor.end(),
1502 offset_buffer_adaptor.resize(offset_buffer_adaptor.size() - count);
1506 offset_buffer_adaptor.end(),
1507 [difference](OT& offset)
1509 offset -= difference;
1512 return offset(index);
typename base_type::const_bitmap_range const_bitmap_range
typename base_type::iterator_tag iterator_tag
std::conditional_t< is_mutable, mutable_array_base< D >, array_crtp_base< D > > base_type
typename base_type::bitmap_const_reference bitmap_const_reference
typename base_type::bitmap_type bitmap_type
typename base_type::difference_type difference_type
Object that owns a piece of contiguous memory.
bitset_iterator< self_type, true > const_iterator
bitset_iterator< self_type, false > iterator
constexpr size_type null_count() const noexcept
Returns the number of bits set to false (null/invalid).
typename storage_type::default_allocator default_allocator
A view that repeats a value a given number of times.
This buffer class is used as storage buffer for all sparrow arrays.
A variable-size binary array.
typename inner_types::offset_iterator offset_iterator
typename base_type::difference_type difference_type
typename inner_types::data_iterator data_iterator
u8_buffer< char > char_buffer_type
static constexpr auto offset_from_sizes(SIZES_RANGE &&sizes) -> offset_buffer_type
Creates offset buffer from a range of sizes.
typename base_type::iterator_tag iterator_tag
u8_buffer< std::uint8_t > uint8_buffer_type
constexpr inner_reference value(size_type i)
Gets mutable reference to element at specified index.
typename base_type::bitmap_reference bitmap_reference
nullable< inner_reference, bitmap_reference > reference
typename inner_types::data_value_type data_value_type
mutable_array_bitmap_base< self_type > base_type
variable_size_binary_array_impl< T, arrow_traits< std::string >::const_reference, OT, Ext > self_type
array_inner_types< self_type > inner_types
typename inner_types::inner_value_type inner_value_type
typename inner_types::const_data_iterator const_data_iterator
nullable< inner_const_reference, bitmap_const_reference > const_reference
typename base_type::bitmap_const_reference bitmap_const_reference
nullable< inner_value_type > value_type
typename inner_types::value_iterator value_iterator
variable_size_binary_array_impl(ARGS &&... args)
Generic constructor for creating array from various inputs.
constexpr inner_const_reference value(size_type i) const
Gets const reference to element at specified index.
typename base_type::bitmap_type bitmap_type
variable_size_binary_array_impl(arrow_proxy)
Constructs array from Arrow proxy.
u8_buffer< std::byte > byte_buffer_type
typename inner_types::inner_const_reference inner_const_reference
typename inner_types::inner_reference inner_reference
typename base_type::size_type size_type
typename base_type::const_bitmap_range const_bitmap_range
typename inner_types::const_offset_iterator const_offset_iterator
typename inner_types::offset_type offset_type
typename inner_types::const_value_iterator const_value_iterator
u8_buffer< std::remove_const_t< offset_type > > offset_buffer_type
Iterator over the data values of a variable size binary layout.
Concept for iterator types.
Concept for character-like types.
Concept for convertible range types.
#define SPARROW_CONSTEXPR_GCC_11
#define SPARROW_ASSERT_TRUE(expr__)
constexpr sparrow::u8_buffer< OFFSET_TYPE > offset_buffer_from_sizes(SIZES_RANGE &&sizes)
constexpr std::size_t size(typelist< T... >={})
Gets the count of types contained in a typelist.
constexpr bool excludes_copy_and_move_ctor_v
Convenience variable template for excludes_copy_and_move_ctor.
binary_array_impl< std::int64_t > big_binary_array
Type alias for variable-size binary arrays with 64-bit offsets.
array_bitmap_base_impl< D, true > mutable_array_bitmap_base
Convenient alias for arrays with mutable validity bitmaps.
ArrowSchema make_arrow_schema(F format, N name, std::optional< M > metadata, std::optional< std::unordered_set< ArrowFlag > > flags, ArrowSchema **children, const CHILDREN_OWNERSHIP &children_ownership, ArrowSchema *dictionary, bool dictionary_ownership)
Creates an ArrowSchema owned by a unique_ptr and holding the provided data.
constexpr bool is_big_string_array_v
Checks whether T is a big_string_array type.
constexpr bool is_string_array_v
Checks whether T is a string_array type.
variable_size_binary_array_impl< arrow_traits< std::vector< byte_t > >::value_type, arrow_traits< std::vector< byte_t > >::const_reference, OT, Ext > binary_array_impl
constexpr InputIt next(InputIt it, Distance n)
string_array_impl< std::int64_t > big_string_array
Type alias for variable-size string arrays with 64-bit offsets.
string_array_impl< std::int32_t > string_array
Type alias for variable-size string arrays with 32-bit offsets.
constexpr bool is_big_binary_array_v
Checks whether T is a big_binary_array type.
ArrowArray make_arrow_array(int64_t length, int64_t null_count, int64_t offset, B buffers, ArrowArray **children, const CHILDREN_OWNERSHIP &children_ownership, ArrowArray *dictionary, bool dictionary_ownership)
Creates an ArrowArray.
dynamic_bitset< std::uint8_t > validity_bitmap
Type alias for a validity bitmap using 8-bit storage blocks.
variable_size_binary_array_impl< arrow_traits< std::string >::value_type, arrow_traits< std::string >::const_reference, OT, Ext > string_array_impl
constexpr bool is_binary_array_v
Checks whether T is a binary_array type.
binary_array_impl< std::int32_t > binary_array
Type alias for variable-size binary arrays with 32-bit offsets.
auto make_buffer_adaptor(FromBufferRef &buf)
validity_bitmap ensure_validity_bitmap(std::size_t size, R &&validity_input)
Ensures a validity bitmap of the specified size from various input types.
data_type
Runtime identifier of arrow data types, usually associated with raw bytes with the associated value.
Extensions to the C++ standard library.
data_iterator value_iterator
bitmap_type::iterator bitmap_iterator
inner_value_type value_type
array_inner_types< variable_size_binary_array_impl< T, CR, OT > >::iterator_tag iterator_tag
inner_reference reference
array_inner_types< variable_size_binary_array_impl< T, CR, OT > >::iterator_tag iterator_tag
inner_value_type value_type
const_bitmap_iterator bitmap_iterator
inner_const_reference reference
const_data_iterator value_iterator
const OT * const_offset_iterator
variable_size_binary_array_impl< T, CR, OT, Ext > array_type
const data_value_type * const_data_iterator
bitmap_type::const_iterator const_bitmap_iterator
data_value_type * data_iterator
variable_size_binary_value_iterator< array_type, iterator_types > value_iterator
std::random_access_iterator_tag iterator_tag
variable_size_binary_value_iterator< array_type, const_iterator_types > const_value_iterator
variable_size_binary_reference< array_type > inner_reference
typename T::value_type data_value_type
Base class for array_inner_types specializations.
Traits class that must be specialized by array implementations.
Provides compile-time information about Arrow data types.
static constexpr sparrow::data_type get() noexcept
static constexpr sparrow::data_type get() noexcept
static constexpr sparrow::data_type get() noexcept
static constexpr sparrow::data_type get() noexcept
Metafunction for retrieving the data_type of a typed array.