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 std::move(vbitmap).extract_storage(),
926 std::move(offsets).extract_storage(),
927 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),
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),
1035 nullable ? std::make_optional<validity_bitmap>(
nullptr, size) : std::nullopt,
1041 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1042 template <mpl::
char_like C, input_metadata_container METADATA_RANGE>
1043 [[nodiscard]]
arrow_proxy variable_size_binary_array_impl<T, CR, OT, Ext>::create_proxy_impl(
1045 offset_buffer_type&& list_offsets,
1046 std::optional<validity_bitmap>&& bitmap,
1047 std::optional<std::string_view> name,
1048 std::optional<METADATA_RANGE> metadata
1051 const auto size = list_offsets.size() - 1;
1052 const auto null_count = bitmap.has_value() ? bitmap->null_count() : 0;
1054 const std::optional<std::unordered_set<sparrow::ArrowFlag>>
1055 flags = bitmap.has_value()
1062 std::move(metadata),
1070 std::vector<buffer<std::uint8_t>> arr_buffs = {
1072 std::move(list_offsets).extract_storage(),
1073 std::move(data_buffer).extract_storage()
1077 static_cast<std::int64_t
>(size),
1078 static_cast<int64_t
>(null_count),
1080 std::move(arr_buffs),
1086 arrow_proxy proxy{std::move(arr), std::move(schema)};
1091 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1092 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::data(size_type i) -> data_iterator
1096 return proxy.buffers()[DATA_BUFFER_INDEX].template data<data_value_type>() + i;
1099 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1100 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::data(size_type i)
const
1101 -> const_data_iterator
1103 const arrow_proxy& proxy = this->get_arrow_proxy();
1105 return proxy.buffers()[DATA_BUFFER_INDEX].template data<const data_value_type>() + i;
1108 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1109 template <std::ranges::sized_range U>
1111 constexpr void variable_size_binary_array_impl<T, CR, OT, Ext>::assign(U&& rhs, size_type index)
1114 const auto offset_beg = *offset(index);
1115 const auto offset_end = *offset(index + 1);
1116 const auto initial_value_length = offset_end - offset_beg;
1117 const auto new_value_length =
static_cast<OT
>(std::ranges::size(rhs));
1118 const OT shift_byte_count = new_value_length - initial_value_length;
1119 auto& data_buffer = this->get_arrow_proxy().get_array_private_data()->buffers()[DATA_BUFFER_INDEX];
1120 if (shift_byte_count != 0)
1123 if (shift_byte_count > 0)
1125 const offset_type last_offset = *offset(
size());
1126 check_offset_overflow(last_offset, shift_byte_count);
1129 const auto shift_val_abs =
static_cast<size_t>(std::abs(shift_byte_count));
1130 const auto new_data_buffer_size = shift_byte_count < 0 ? data_buffer.size() - shift_val_abs
1131 : data_buffer.size() + shift_val_abs;
1133 if (shift_byte_count > 0)
1135 data_buffer.resize(new_data_buffer_size);
1148 sparrow::next(data_buffer.begin(), offset_end + shift_byte_count)
1150 data_buffer.resize(new_data_buffer_size);
1156 [shift_byte_count](
auto& offset)
1158 offset += shift_byte_count;
1162 auto tmp = std::views::transform(
1166 return static_cast<std::uint8_t
>(val);
1170 std::copy(std::ranges::begin(tmp), std::ranges::end(tmp),
sparrow::next(data_buffer.begin(), offset_beg));
1173 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1174 constexpr void variable_size_binary_array_impl<T, CR, OT, Ext>::check_offset_overflow(
1175 offset_type current_offset,
1176 offset_type size_to_add
1179 constexpr offset_type max_offset = std::numeric_limits<offset_type>::max();
1180 if (current_offset > max_offset - size_to_add)
1182 throw std::overflow_error(
"Offset overflow: adding elements would exceed maximum offset value");
1186 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1187 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::offset(size_type i) -> offset_iterator
1190 return get_arrow_proxy().buffers()[OFFSET_BUFFER_INDEX].template data<OT>()
1191 +
static_cast<size_type
>(this->get_arrow_proxy().offset()) + i;
1194 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1195 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::offset(size_type i)
const
1196 -> const_offset_iterator
1199 return this->get_arrow_proxy().buffers()[OFFSET_BUFFER_INDEX].template data<OT>()
1200 +
static_cast<size_type
>(this->get_arrow_proxy().offset()) + i;
1203 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1204 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::offsets_begin() -> offset_iterator
1209 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1210 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::offsets_cbegin() const
1211 -> const_offset_iterator
1216 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1217 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::offsets_end() -> offset_iterator
1219 return offset(
size() + 1);
1222 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1223 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::offsets_cend() const
1224 -> const_offset_iterator
1226 return offset(
size() + 1);
1229 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1236 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1241 const OT offset_begin = *offset(i);
1243 const OT offset_end = *offset(i + 1);
1250 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1251 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::value_begin() -> value_iterator
1253 return value_iterator{
this, 0};
1256 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1257 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::value_end() -> value_iterator
1262 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1263 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::value_cbegin() const -> const_value_iterator
1265 return const_value_iterator{
this, 0};
1268 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1269 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::value_cend() const -> const_value_iterator
1274 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1275 template <std::ranges::sized_range U>
1277 constexpr void variable_size_binary_array_impl<T, CR, OT, Ext>::resize_values(size_type new_length, U value)
1279 const size_t new_size = new_length +
static_cast<size_t>(this->get_arrow_proxy().offset());
1280 auto& buffers = this->get_arrow_proxy().get_array_private_data()->buffers();
1281 if (new_length <
size())
1283 const auto offset_begin =
static_cast<size_t>(*offset(new_length));
1284 auto& data_buffer = buffers[DATA_BUFFER_INDEX];
1285 data_buffer.resize(offset_begin);
1286 auto& offset_buffer = buffers[OFFSET_BUFFER_INDEX];
1288 offset_buffer_adaptor.resize(new_size + 1);
1290 else if (new_length >
size())
1292 insert_value(value_cend(), value, new_length -
size());
1296 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1297 template <std::ranges::sized_range U>
1303 const auto idx =
static_cast<size_t>(std::distance(value_cbegin(), pos));
1304 const OT offset_begin = *offset(idx);
1305 const std::vector<uint8_t> casted_value{
value.cbegin(),
value.cend()};
1307 const auto joined_repeated_value_range = std::ranges::views::join(my_repeat_view);
1308 auto& data_buffer = this->get_arrow_proxy().get_array_private_data()->buffers()[DATA_BUFFER_INDEX];
1309 const auto pos_to_insert =
sparrow::next(data_buffer.cbegin(), offset_begin);
1310 data_buffer.insert(pos_to_insert, joined_repeated_value_range.begin(), joined_repeated_value_range.end());
1311 insert_offset(offsets_cbegin() + idx + 1,
static_cast<offset_type>(
value.size()), count);
1315 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1316 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::insert_offset(
1317 const_offset_iterator pos,
1318 offset_type value_size,
1320 ) -> offset_iterator
1322 auto& offset_buffer = get_arrow_proxy().get_array_private_data()->buffers()[OFFSET_BUFFER_INDEX];
1323 const auto idx =
static_cast<size_t>(std::distance(offsets_cbegin(), pos));
1325 const offset_type cumulative_size = value_size *
static_cast<offset_type
>(count);
1328 if (!offset_buffer_adaptor.empty())
1330 const offset_type last_offset = offset_buffer_adaptor.back();
1331 check_offset_overflow(last_offset, cumulative_size);
1337 offset_buffer_adaptor.end(),
1338 [cumulative_size](
auto& offset)
1340 offset += cumulative_size;
1343 offset_buffer_adaptor.insert(
sparrow::next(offset_buffer_adaptor.cbegin(), idx + 1), count, 0);
1345 for (
size_t i = idx + 1; i < idx + 1 + count; ++i)
1347 offset_buffer_adaptor[i] = offset_buffer_adaptor[i - 1] + value_size;
1349 return offsets_begin() + idx;
1352 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1353 template <mpl::iterator_of_type<T> InputIt>
1354 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::insert_values(
1360 auto& data_buffer = get_arrow_proxy().get_array_private_data()->buffers()[DATA_BUFFER_INDEX];
1362 auto values = std::ranges::subrange(first, last);
1363 const size_t cumulative_sizes = std::accumulate(
1367 [](
size_t acc,
const T&
value)
1369 return acc + value.size();
1372 data_buffer_adaptor.resize(data_buffer_adaptor.size() + cumulative_sizes);
1373 const auto idx =
static_cast<size_t>(std::distance(value_cbegin(), pos));
1374 const OT offset_begin = *offset(idx);
1375 auto insert_pos =
sparrow::next(data_buffer_adaptor.begin(), offset_begin);
1381 data_buffer_adaptor.end()
1384 for (
const T&
value : values)
1386 std::copy(
value.begin(),
value.end(), insert_pos);
1387 std::advance(insert_pos,
value.size());
1390 const auto sizes_of_each_value = std::ranges::views::transform(
1397 insert_offsets(offset(idx + 1), sizes_of_each_value.begin(), sizes_of_each_value.end());
1401 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1402 template <mpl::iterator_of_type<OT> InputIt>
1403 constexpr auto variable_size_binary_array_impl<T, CR, OT, Ext>::insert_offsets(
1405 InputIt first_sizes,
1412 auto& offset_buffer = get_arrow_proxy().get_array_private_data()->buffers()[OFFSET_BUFFER_INDEX];
1414 const auto idx = std::distance(offsets_cbegin(), pos);
1415 const OT cumulative_sizes = std::reduce(first_sizes, last_sizes, OT(0));
1418 if (!offset_buffer_adaptor.empty())
1420 const offset_type last_offset = offset_buffer_adaptor.back();
1421 check_offset_overflow(last_offset, cumulative_sizes);
1424 const auto sizes_count = std::distance(first_sizes, last_sizes);
1425 offset_buffer_adaptor.resize(offset_buffer_adaptor.size() +
static_cast<size_t>(sizes_count));
1428 offset_buffer_adaptor.begin() + idx,
1429 offset_buffer_adaptor.end() - sizes_count,
1430 offset_buffer_adaptor.end()
1434 offset_buffer_adaptor.begin() + idx + sizes_count,
1435 offset_buffer_adaptor.end(),
1436 [cumulative_sizes](
auto& offset)
1438 offset += cumulative_sizes;
1442 InputIt it = first_sizes;
1443 for (
size_t i =
static_cast<size_t>(idx + 1); i < static_cast<size_t>(idx + sizes_count + 1); ++i)
1445 offset_buffer_adaptor[i] = offset_buffer_adaptor[i - 1] + *it;
1448 return offset(
static_cast<size_t>(idx));
1451 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1453 variable_size_binary_array_impl<T, CR, OT, Ext>::erase_values(const_value_iterator pos, size_type count)
1458 const size_t index =
static_cast<size_t>(std::distance(value_cbegin(), pos));
1463 auto& data_buffer = get_arrow_proxy().get_array_private_data()->buffers()[DATA_BUFFER_INDEX];
1464 const auto offset_begin = *offset(index);
1465 const auto offset_end = *offset(index + count);
1466 const size_t difference =
static_cast<size_t>(offset_end - offset_begin);
1468 std::move(data_buffer.begin() + offset_end, data_buffer.end(), data_buffer.begin() + offset_begin);
1469 data_buffer.resize(data_buffer.size() - difference);
1471 erase_offsets(offset(index), count);
1475 template <std::ranges::sized_range T,
class CR, layout_offset OT,
typename Ext>
1477 variable_size_binary_array_impl<T, CR, OT, Ext>::erase_offsets(const_offset_iterator pos, size_type count)
1482 const size_t index =
static_cast<size_t>(std::distance(offsets_cbegin(), pos));
1485 return offset(index);
1487 auto& offset_buffer = get_arrow_proxy().get_array_private_data()->buffers()[OFFSET_BUFFER_INDEX];
1489 const OT offset_start_value = *offset(index);
1490 const OT offset_end_value = *offset(index + count);
1491 const OT difference = offset_end_value - offset_start_value;
1494 sparrow::next(offset_buffer_adaptor.begin(), index + count + 1),
1495 offset_buffer_adaptor.end(),
1498 offset_buffer_adaptor.resize(offset_buffer_adaptor.size() - count);
1502 offset_buffer_adaptor.end(),
1503 [difference](OT& offset)
1505 offset -= difference;
1508 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, false > iterator
constexpr size_type null_count() const noexcept
Returns the number of bits set to false (null/invalid).
bitset_iterator< self_type, true > const_iterator
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, json_extension > 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.
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.