41 template <
class T,
class OT>
81 template <std::ranges::sized_range T,
class CR, layout_offset OT>
82 class variable_size_binary_array_impl;
84 template <layout_offset OT>
90 template <layout_offset OT>
215 template <std::ranges::sized_range T,
class CR, layout_offset OT>
271 template <std::ranges::sized_range T,
class CR, layout_offset OT>
278 sizeof(std::ranges::range_value_t<T>) ==
sizeof(std::uint8_t),
279 "Only sequences of types with the same size as uint8_t are supported"
352 template <
class... ARGS>
355 :
self_type(create_proxy(std::forward<ARGS>(args)...))
359 using base_type::get_arrow_proxy;
360 using base_type::size;
409 template <std::ranges::range SIZES_RANGE>
442 std::optional<std::string_view> name = std::nullopt,
443 std::optional<METADATA_RANGE> metadata = std::nullopt
465 std::ranges::input_range R,
469 std::ranges::input_range<std::ranges::range_value_t<R>>
475 std::optional<std::string_view> name = std::nullopt,
476 std::optional<METADATA_RANGE> metadata = std::nullopt
496 template <std::ranges::input_range R, input_metadata_container METADATA_RANGE = std::vector<metadata_pair>>
498 std::ranges::input_range<std::ranges::range_value_t<R>>
499 && mpl::char_like<std::ranges::range_value_t<std::ranges::range_value_t<R>>>
501 [[nodiscard]]
static arrow_proxy create_proxy(
504 std::optional<std::string_view> name = std::nullopt,
505 std::optional<METADATA_RANGE> metadata = std::nullopt
522 template <std::ranges::input_range R, input_metadata_container METADATA_RANGE = std::vector<metadata_pair>>
523 requires std::is_same_v<std::ranges::range_value_t<R>, nullable<T>>
524 [[nodiscard]]
static arrow_proxy create_proxy(
526 std::optional<std::string_view> name = std::nullopt,
527 std::optional<METADATA_RANGE> metadata = std::nullopt
547 template <mpl::
char_like C, input_metadata_container METADATA_RANGE = std::vector<metadata_pair>>
548 [[nodiscard]]
static arrow_proxy create_proxy_impl(
549 u8_buffer<C>&& data_buffer,
551 std::optional<validity_bitmap>&&,
552 std::optional<std::string_view> name = std::nullopt,
553 std::optional<METADATA_RANGE> metadata = std::nullopt
556 static constexpr size_t OFFSET_BUFFER_INDEX = 1;
557 static constexpr size_t DATA_BUFFER_INDEX = 2;
610 [[nodiscard]]
constexpr value_iterator value_begin();
619 [[nodiscard]]
constexpr value_iterator value_end();
697 template <std::ranges::sized_range U>
698 requires mpl::convertible_ranges<U, T>
699 constexpr void resize_values(size_type new_length, U
value);
710 constexpr void resize_offsets(size_type new_length,
offset_type offset_value);
727 template <std::ranges::sized_range U>
728 requires mpl::convertible_ranges<U, T>
761 template <mpl::iterator_of_type<T> InputIt>
784 template <mpl::iterator_of_type<OT> InputIt>
840 template <std::ranges::sized_range U>
841 requires mpl::convertible_ranges<U, T>
855 template <std::ranges::sized_range T,
class CR, layout_offset OT>
859 const auto type = this->get_arrow_proxy().data_type();
867 && std::same_as<OT, int64_t>) )
871 template <std::ranges::sized_range T,
class CR, layout_offset OT>
872 template <std::ranges::range SIZES_RANGE>
877 std::forward<SIZES_RANGE>(sizes)
881 template <std::ranges::sized_range T,
class CR, layout_offset OT>
882 template <mpl::
char_like C, val
idity_bitmap_input VB, input_metadata_container METADATA_RANGE>
883 arrow_proxy variable_size_binary_array_impl<T, CR, OT>::create_proxy(
885 offset_buffer_type&& offsets,
887 std::optional<std::string_view> name,
888 std::optional<METADATA_RANGE> metadata
891 const auto size = offsets.size() - 1;
901 repeat_view<bool>(
true, 0),
906 std::vector<buffer<std::uint8_t>> arr_buffs = {
907 std::move(vbitmap).extract_storage(),
908 std::move(offsets).extract_storage(),
909 std::move(data_buffer).extract_storage()
913 static_cast<std::int64_t
>(size),
914 static_cast<int64_t
>(null_count),
916 std::move(arr_buffs),
922 return arrow_proxy{std::move(arr), std::move(schema)};
925 template <std::ranges::sized_range T,
class CR, layout_offset OT>
926 template <std::ranges::input_range R, val
idity_bitmap_input VB, input_metadata_container METADATA_RANGE>
928 std::ranges::input_range<std::ranges::range_value_t<R>> &&
932 arrow_proxy variable_size_binary_array_impl<T, CR, OT>::create_proxy(
935 std::optional<std::string_view> name,
936 std::optional<METADATA_RANGE> metadata
939 using values_inner_value_type = std::ranges::range_value_t<std::ranges::range_value_t<R>>;
941 auto size_range = values
942 | std::views::transform(
945 return std::ranges::size(v);
948 auto offset_buffer = offset_from_sizes(size_range);
951 std::move(data_buffer),
952 std::move(offset_buffer),
953 std::forward<VB>(validity_input),
954 std::forward<std::optional<std::string_view>>(name),
955 std::forward<std::optional<METADATA_RANGE>>(metadata)
959 template <std::ranges::sized_range T,
class CR, layout_offset OT>
960 template <std::ranges::input_range R, input_metadata_container METADATA_RANGE>
961 requires std::is_same_v<std::ranges::range_value_t<R>,
nullable<T>>
962 arrow_proxy variable_size_binary_array_impl<T, CR, OT>::create_proxy(
964 std::optional<std::string_view> name,
965 std::optional<METADATA_RANGE> metadata
969 const auto values = range
970 | std::views::transform(
976 const auto is_non_null = range
977 | std::views::transform(
980 return v.has_value();
983 return self_type::create_proxy(values, is_non_null, std::move(name), std::move(metadata));
986 template <std::ranges::sized_range T,
class CR, layout_offset OT>
988 std::ranges::input_range R,
991 std::ranges::input_range<std::ranges::range_value_t<R>> &&
996 [[nodiscard]]
arrow_proxy variable_size_binary_array_impl<T, CR, OT>::create_proxy(
999 std::optional<std::string_view> name,
1000 std::optional<METADATA_RANGE> metadata
1003 using values_inner_value_type = std::ranges::range_value_t<std::ranges::range_value_t<R>>;
1004 const size_t size = std::ranges::size(values);
1006 auto size_range = values
1007 | std::views::transform(
1010 return std::ranges::size(v);
1013 auto offset_buffer = offset_from_sizes(size_range);
1014 return create_proxy_impl(
1015 std::move(data_buffer),
1016 std::move(offset_buffer),
1017 nullable ? std::make_optional<validity_bitmap>(
nullptr, size) : std::nullopt,
1023 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1024 template <mpl::
char_like C, input_metadata_container METADATA_RANGE>
1025 [[nodiscard]]
arrow_proxy variable_size_binary_array_impl<T, CR, OT>::create_proxy_impl(
1027 offset_buffer_type&& list_offsets,
1028 std::optional<validity_bitmap>&& bitmap,
1029 std::optional<std::string_view> name,
1030 std::optional<METADATA_RANGE> metadata
1033 const auto size = list_offsets.size() - 1;
1034 const auto null_count = bitmap.has_value() ? bitmap->null_count() : 0;
1036 const std::optional<std::unordered_set<sparrow::ArrowFlag>>
1037 flags = bitmap.has_value()
1044 std::move(metadata),
1052 std::vector<buffer<std::uint8_t>> arr_buffs = {
1054 std::move(list_offsets).extract_storage(),
1055 std::move(data_buffer).extract_storage()
1059 static_cast<std::int64_t
>(size),
1060 static_cast<int64_t
>(null_count),
1062 std::move(arr_buffs),
1068 return arrow_proxy{std::move(arr), std::move(schema)};
1071 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1072 constexpr auto variable_size_binary_array_impl<T, CR, OT>::data(size_type i) -> data_iterator
1076 return proxy.buffers()[DATA_BUFFER_INDEX].template data<data_value_type>() + i;
1079 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1080 constexpr auto variable_size_binary_array_impl<T, CR, OT>::data(size_type i)
const -> const_data_iterator
1082 const arrow_proxy& proxy = this->get_arrow_proxy();
1084 return proxy.buffers()[DATA_BUFFER_INDEX].template data<const data_value_type>() + i;
1087 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1088 template <std::ranges::sized_range U>
1090 constexpr void variable_size_binary_array_impl<T, CR, OT>::assign(U&& rhs, size_type index)
1093 const auto offset_beg = *offset(index);
1094 const auto offset_end = *offset(index + 1);
1095 const auto initial_value_length = offset_end - offset_beg;
1096 const auto new_value_length =
static_cast<OT
>(std::ranges::size(rhs));
1097 const OT shift_byte_count = new_value_length - initial_value_length;
1098 auto& data_buffer = this->get_arrow_proxy().get_array_private_data()->buffers()[DATA_BUFFER_INDEX];
1099 if (shift_byte_count != 0)
1101 const auto shift_val_abs =
static_cast<size_t>(std::abs(shift_byte_count));
1102 const auto new_data_buffer_size = shift_byte_count < 0 ? data_buffer.size() - shift_val_abs
1103 : data_buffer.size() + shift_val_abs;
1105 if (shift_byte_count > 0)
1107 data_buffer.resize(new_data_buffer_size);
1120 sparrow::next(data_buffer.begin(), offset_end + shift_byte_count)
1122 data_buffer.resize(new_data_buffer_size);
1128 [shift_byte_count](
auto& offset)
1130 offset += shift_byte_count;
1134 auto tmp = std::views::transform(
1138 return static_cast<std::uint8_t
>(val);
1142 std::copy(std::ranges::begin(tmp), std::ranges::end(tmp),
sparrow::next(data_buffer.begin(), offset_beg));
1145 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1146 constexpr auto variable_size_binary_array_impl<T, CR, OT>::offset(size_type i) -> offset_iterator
1149 return get_arrow_proxy().buffers()[OFFSET_BUFFER_INDEX].template data<OT>()
1150 +
static_cast<size_type
>(this->get_arrow_proxy().offset()) + i;
1153 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1154 constexpr auto variable_size_binary_array_impl<T, CR, OT>::offset(size_type i)
const
1155 -> const_offset_iterator
1158 return this->get_arrow_proxy().buffers()[OFFSET_BUFFER_INDEX].template data<OT>()
1159 +
static_cast<size_type
>(this->get_arrow_proxy().offset()) + i;
1162 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1163 constexpr auto variable_size_binary_array_impl<T, CR, OT>::offsets_begin() -> offset_iterator
1168 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1169 constexpr auto variable_size_binary_array_impl<T, CR, OT>::offsets_cbegin() const -> const_offset_iterator
1174 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1175 constexpr auto variable_size_binary_array_impl<T, CR, OT>::offsets_end() -> offset_iterator
1177 return offset(
size() + 1);
1180 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1181 constexpr auto variable_size_binary_array_impl<T, CR, OT>::offsets_cend() const -> const_offset_iterator
1183 return offset(
size() + 1);
1186 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1193 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1197 const OT offset_begin = *offset(i);
1199 const OT offset_end = *offset(i + 1);
1206 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1207 constexpr auto variable_size_binary_array_impl<T, CR, OT>::value_begin() -> value_iterator
1209 return value_iterator{
this, 0};
1212 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1213 constexpr auto variable_size_binary_array_impl<T, CR, OT>::value_end() -> value_iterator
1218 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1219 constexpr auto variable_size_binary_array_impl<T, CR, OT>::value_cbegin() const -> const_value_iterator
1221 return const_value_iterator{
this, 0};
1224 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1225 constexpr auto variable_size_binary_array_impl<T, CR, OT>::value_cend() const -> const_value_iterator
1230 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1231 template <std::ranges::sized_range U>
1233 constexpr void variable_size_binary_array_impl<T, CR, OT>::resize_values(size_type new_length, U value)
1235 const size_t new_size = new_length +
static_cast<size_t>(this->get_arrow_proxy().offset());
1236 auto& buffers = this->get_arrow_proxy().get_array_private_data()->buffers();
1237 if (new_length <
size())
1239 const auto offset_begin =
static_cast<size_t>(*offset(new_length));
1240 auto& data_buffer = buffers[DATA_BUFFER_INDEX];
1241 data_buffer.resize(offset_begin);
1242 auto& offset_buffer = buffers[OFFSET_BUFFER_INDEX];
1244 offset_buffer_adaptor.resize(new_size + 1);
1246 else if (new_length >
size())
1248 insert_value(value_cend(), value, new_length -
size());
1252 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1253 template <std::ranges::sized_range U>
1259 const auto idx =
static_cast<size_t>(std::distance(value_cbegin(), pos));
1260 const OT offset_begin = *offset(idx);
1261 const std::vector<uint8_t> casted_value{
value.cbegin(),
value.cend()};
1263 const auto joined_repeated_value_range = std::ranges::views::join(my_repeat_view);
1264 auto& data_buffer = this->get_arrow_proxy().get_array_private_data()->buffers()[DATA_BUFFER_INDEX];
1265 const auto pos_to_insert =
sparrow::next(data_buffer.cbegin(), offset_begin);
1266 data_buffer.insert(pos_to_insert, joined_repeated_value_range.begin(), joined_repeated_value_range.end());
1267 insert_offset(offsets_cbegin() + idx + 1,
static_cast<offset_type>(
value.size()), count);
1271 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1272 constexpr auto variable_size_binary_array_impl<T, CR, OT>::insert_offset(
1273 const_offset_iterator pos,
1274 offset_type value_size,
1276 ) -> offset_iterator
1278 auto& offset_buffer = get_arrow_proxy().get_array_private_data()->buffers()[OFFSET_BUFFER_INDEX];
1279 const auto idx =
static_cast<size_t>(std::distance(offsets_cbegin(), pos));
1281 const offset_type cumulative_size = value_size *
static_cast<offset_type
>(count);
1285 offset_buffer_adaptor.end(),
1286 [cumulative_size](
auto& offset)
1288 offset += cumulative_size;
1291 offset_buffer_adaptor.insert(
sparrow::next(offset_buffer_adaptor.cbegin(), idx + 1), count, 0);
1293 for (
size_t i = idx + 1; i < idx + 1 + count; ++i)
1295 offset_buffer_adaptor[i] = offset_buffer_adaptor[i - 1] + value_size;
1297 return offsets_begin() + idx;
1300 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1301 template <mpl::iterator_of_type<T> InputIt>
1306 auto& data_buffer = get_arrow_proxy().get_array_private_data()->buffers()[DATA_BUFFER_INDEX];
1308 auto values = std::ranges::subrange(first, last);
1309 const size_t cumulative_sizes = std::accumulate(
1313 [](
size_t acc,
const T&
value)
1315 return acc + value.size();
1318 data_buffer_adaptor.resize(data_buffer_adaptor.size() + cumulative_sizes);
1319 const auto idx =
static_cast<size_t>(std::distance(value_cbegin(), pos));
1320 const OT offset_begin = *offset(idx);
1321 auto insert_pos =
sparrow::next(data_buffer_adaptor.begin(), offset_begin);
1327 data_buffer_adaptor.end()
1330 for (
const T&
value : values)
1332 std::copy(
value.begin(),
value.end(), insert_pos);
1333 std::advance(insert_pos,
value.size());
1336 const auto sizes_of_each_value = std::ranges::views::transform(
1343 insert_offsets(offset(idx + 1), sizes_of_each_value.begin(), sizes_of_each_value.end());
1347 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1348 template <mpl::iterator_of_type<OT> InputIt>
1349 constexpr auto variable_size_binary_array_impl<T, CR, OT>::insert_offsets(
1351 InputIt first_sizes,
1358 auto& offset_buffer = get_arrow_proxy().get_array_private_data()->buffers()[OFFSET_BUFFER_INDEX];
1360 const auto idx = std::distance(offsets_cbegin(), pos);
1361 const OT cumulative_sizes = std::reduce(first_sizes, last_sizes, OT(0));
1362 const auto sizes_count = std::distance(first_sizes, last_sizes);
1363 offset_buffer_adaptor.resize(offset_buffer_adaptor.size() +
static_cast<size_t>(sizes_count));
1366 offset_buffer_adaptor.begin() + idx,
1367 offset_buffer_adaptor.end() - sizes_count,
1368 offset_buffer_adaptor.end()
1372 offset_buffer_adaptor.begin() + idx + sizes_count,
1373 offset_buffer_adaptor.end(),
1374 [cumulative_sizes](
auto& offset)
1376 offset += cumulative_sizes;
1380 InputIt it = first_sizes;
1381 for (
size_t i =
static_cast<size_t>(idx + 1); i < static_cast<size_t>(idx + sizes_count + 1); ++i)
1383 offset_buffer_adaptor[i] = offset_buffer_adaptor[i - 1] + *it;
1386 return offset(
static_cast<size_t>(idx));
1389 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1391 variable_size_binary_array_impl<T, CR, OT>::erase_values(const_value_iterator pos, size_type count)
1396 const size_t index =
static_cast<size_t>(std::distance(value_cbegin(), pos));
1401 auto& data_buffer = get_arrow_proxy().get_array_private_data()->buffers()[DATA_BUFFER_INDEX];
1402 const auto offset_begin = *offset(index);
1403 const auto offset_end = *offset(index + count);
1404 const size_t difference =
static_cast<size_t>(offset_end - offset_begin);
1406 std::move(data_buffer.begin() + offset_end, data_buffer.end(), data_buffer.begin() + offset_begin);
1407 data_buffer.resize(data_buffer.size() - difference);
1409 erase_offsets(offset(index), count);
1413 template <std::ranges::sized_range T,
class CR, layout_offset OT>
1415 variable_size_binary_array_impl<T, CR, OT>::erase_offsets(const_offset_iterator pos, size_type count)
1420 const size_t index =
static_cast<size_t>(std::distance(offsets_cbegin(), pos));
1423 return offset(index);
1425 auto& offset_buffer = get_arrow_proxy().get_array_private_data()->buffers()[OFFSET_BUFFER_INDEX];
1427 const OT offset_start_value = *offset(index);
1428 const OT offset_end_value = *offset(index + count);
1429 const OT difference = offset_end_value - offset_start_value;
1432 sparrow::next(offset_buffer_adaptor.begin(), index + count + 1),
1433 offset_buffer_adaptor.end(),
1436 offset_buffer_adaptor.resize(offset_buffer_adaptor.size() - count);
1440 offset_buffer_adaptor.end(),
1441 [difference](OT& offset)
1443 offset -= difference;
1446 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 base_type::bitmap_type bitmap_type
typename inner_types::const_value_iterator const_value_iterator
typename inner_types::const_offset_iterator const_offset_iterator
typename base_type::bitmap_reference bitmap_reference
mutable_array_bitmap_base< self_type > base_type
typename inner_types::inner_value_type inner_value_type
typename base_type::const_bitmap_range const_bitmap_range
typename inner_types::offset_type offset_type
typename inner_types::offset_iterator offset_iterator
typename inner_types::const_data_iterator const_data_iterator
u8_buffer< char > char_buffer_type
typename base_type::iterator_tag iterator_tag
array_inner_types< self_type > inner_types
typename inner_types::inner_reference inner_reference
typename base_type::size_type size_type
constexpr inner_const_reference value(size_type i) const
Gets const reference to element at specified index.
typename base_type::difference_type difference_type
nullable< inner_reference, bitmap_reference > reference
variable_size_binary_array_impl(ARGS &&... args)
Generic constructor for creating array from various inputs.
u8_buffer< std::byte > byte_buffer_type
typename inner_types::value_iterator value_iterator
u8_buffer< std::uint8_t > uint8_buffer_type
variable_size_binary_array_impl< T, arrow_traits< std::string >::const_reference, OT > self_type
nullable< inner_const_reference, bitmap_const_reference > const_reference
variable_size_binary_array_impl(arrow_proxy)
Constructs array from Arrow proxy.
constexpr inner_reference value(size_type i)
Gets mutable reference to element at specified index.
typename base_type::bitmap_const_reference bitmap_const_reference
typename inner_types::data_iterator data_iterator
static constexpr auto offset_from_sizes(SIZES_RANGE &&sizes) -> offset_buffer_type
Creates offset buffer from a range of sizes.
typename inner_types::data_value_type data_value_type
u8_buffer< std::remove_const_t< offset_type > > offset_buffer_type
typename inner_types::inner_const_reference inner_const_reference
nullable< inner_value_type > value_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.
variable_size_binary_array_impl< arrow_traits< std::vector< byte_t > >::value_type, arrow_traits< std::vector< byte_t > >::const_reference, OT > binary_array_impl
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::string >::value_type, arrow_traits< std::string >::const_reference, OT > string_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.
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.
array_inner_types< variable_size_binary_array_impl< T, CR, OT > >::iterator_tag iterator_tag
const_data_iterator value_iterator
inner_value_type value_type
inner_const_reference reference
const_bitmap_iterator bitmap_iterator
bitmap_type::iterator bitmap_iterator
array_inner_types< variable_size_binary_array_impl< T, CR, OT > >::iterator_tag iterator_tag
inner_value_type value_type
data_iterator value_iterator
inner_reference reference
variable_size_binary_reference< array_type > inner_reference
variable_size_binary_array_impl< T, CR, OT > array_type
std::random_access_iterator_tag iterator_tag
variable_size_binary_value_iterator< array_type, iterator_types > value_iterator
bitmap_type::const_iterator const_bitmap_iterator
const data_value_type * const_data_iterator
data_value_type * data_iterator
const OT * const_offset_iterator
typename T::value_type data_value_type
variable_size_binary_value_iterator< array_type, const_iterator_types > const_value_iterator
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.