53 [[nodiscard]]
reference dereference() const;
58 [[nodiscard]]
bool equal(const
self_type& rhs) const;
59 [[nodiscard]]
bool less_than(const
self_type& rhs) const;
94 template <input_metadata_container METADATA_RANGE = std::vector<metadata_pair>>
97 std::optional<std::string_view>
name = std::nullopt,
98 std::optional<METADATA_RANGE>
metadata = std::nullopt
134 template <input_metadata_container METADATA_RANGE = std::vector<metadata_pair>>
136 create_proxy(
size_t length, std::optional<std::string_view>
name, std::optional<METADATA_RANGE>
metadata);
162 auto empty_iterator<T>::dereference() const ->
reference
168 void empty_iterator<T>::increment()
188 return rhs.m_index - m_index;
194 return m_index == rhs.m_index;
200 return m_index < rhs.m_index;
203 template <input_metadata_container METADATA_RANGE>
205 null_array::create_proxy(
size_t length, std::optional<std::string_view> name, std::optional<METADATA_RANGE> metadata)
207 using namespace std::literals;
208 static const std::optional<std::unordered_set<sparrow::ArrowFlag>> flags{{
ArrowFlag::NULLABLE}};
215 repeat_view<bool>(
false, 0),
220 using buffer_type = sparrow::buffer<std::uint8_t>;
221 std::vector<buffer_type> arr_buffs = {};
224 static_cast<int64_t
>(length),
225 static_cast<int64_t
>(length),
227 std::move(arr_buffs),
229 repeat_view<bool>(
false, 0),
233 return arrow_proxy{std::move(arr), std::move(schema)};
237#if defined(__cpp_lib_format)
242 constexpr auto parse(std::format_parse_context& ctx)
247 auto format(
const sparrow::null_array& ar, std::format_context& ctx)
const
249 return std::format_to(ctx.out(),
"Null array [{}]", ar.
size());
253inline std::ostream&
operator<<(std::ostream& os,
const sparrow::null_array& value)
255 os << std::format(
"{}", value);
Proxy class over ArrowArray and ArrowSchema.
empty_iterator< T > self_type
typename base_type::reference reference
iterator_base< self_type, T, std::contiguous_iterator_tag, T > base_type
friend class iterator_access
typename base_type::difference_type difference_type
empty_iterator(difference_type index=difference_type()) noexcept
SPARROW_API const_reference back() const
SPARROW_API iterator begin()
SPARROW_API iterator end()
SPARROW_API std::optional< std::string_view > name() const
iterator::reference reference
null_type inner_value_type
empty_iterator< value_type > const_iterator
empty_iterator< int > const_value_iterator
SPARROW_API reference back()
SPARROW_API size_type size() const
SPARROW_API const_bitmap_range bitmap() const
SPARROW_API const_iterator cend() const
SPARROW_API const_reference front() const
SPARROW_API const_iterator end() const
std::ranges::subrange< const_bitmap_iterator > const_bitmap_range
empty_iterator< bool > const_bitmap_iterator
SPARROW_API const_reference operator[](size_type i) const
empty_iterator< value_type > iterator
nullable< inner_value_type > value_type
SPARROW_API std::optional< key_value_view > metadata() const
SPARROW_API null_array(arrow_proxy)
std::random_access_iterator_tag iterator_tag
std::ranges::subrange< const_value_iterator > const_value_range
SPARROW_API const_iterator begin() const
iterator::difference_type difference_type
null_array(size_t length, std::optional< std::string_view > name=std::nullopt, std::optional< METADATA_RANGE > metadata=std::nullopt)
const_iterator::reference const_reference
SPARROW_API const_value_range values() const
SPARROW_API reference front()
SPARROW_API reference operator[](size_type i)
SPARROW_API const_iterator cbegin() const
The nullable class models a value or a reference that can be "null", or missing, like values traditio...
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 int64_t ssize(const T &value)
Get the size of a range, a tuple or an optional.
SPARROW_API bool operator==(const array &lhs, const array &rhs)
Compares the content of two arrays.
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.
constexpr bool is_null_array_v
Checks whether T is a null_array type.
std::ostream & operator<<(std::ostream &os, const sparrow::nullval_t &)