52 [[nodiscard]]
reference dereference() const;
57 [[nodiscard]]
bool equal(const
self_type& rhs) const;
58 [[nodiscard]]
bool less_than(const
self_type& rhs) const;
93 template <input_metadata_container METADATA_RANGE = std::vector<metadata_pair>>
96 std::optional<std::string_view>
name = std::nullopt,
97 std::optional<METADATA_RANGE>
metadata = std::nullopt
133 template <input_metadata_container METADATA_RANGE = std::vector<metadata_pair>>
135 create_proxy(
size_t length, std::optional<std::string_view>
name, std::optional<METADATA_RANGE>
metadata);
161 auto empty_iterator<T>::dereference() const ->
reference
167 void empty_iterator<T>::increment()
187 return rhs.m_index - m_index;
193 return m_index == rhs.m_index;
199 return m_index < rhs.m_index;
202 template <input_metadata_container METADATA_RANGE>
204 null_array::create_proxy(
size_t length, std::optional<std::string_view> name, std::optional<METADATA_RANGE> metadata)
206 using namespace std::literals;
213 repeat_view<bool>(
false, 0),
218 using buffer_type = sparrow::buffer<std::uint8_t>;
219 std::vector<buffer_type> arr_buffs = {};
222 static_cast<int64_t
>(length),
223 static_cast<int64_t
>(length),
225 std::move(arr_buffs),
227 repeat_view<bool>(
false, 0),
231 return arrow_proxy{std::move(arr), std::move(schema)};
235#if defined(__cpp_lib_format)
240 constexpr auto parse(std::format_parse_context& ctx)
245 auto format(
const sparrow::null_array& ar, std::format_context& ctx)
const
247 return std::format_to(ctx.out(),
"Null array [{}]", ar.
size());
251inline std::ostream&
operator<<(std::ostream& os,
const sparrow::null_array& value)
253 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 &stream, T n)