60 requires(not std::is_lvalue_reference_v<A>)
61 constexpr explicit array(A&& a);
72 constexpr explicit array(A* a);
83 constexpr explicit array(std::shared_ptr<A> a);
175 template <input_metadata_container R = std::vector<metadata_pair>>
312 template <layout_or_array A>
324 template <layout_or_array A>
335 template <layout_or_array A>
346 template <layout_or_array A>
357 template <layout_or_array A>
371 template <layout_or_array A>
385 template <layout_or_array A>
400 template <layout_or_array A>
405 template <input_metadata_container R>
408 get_arrow_proxy().set_metadata(
metadata);
Dynamically typed array encapsulating an Arrow layout.
SPARROW_API const_reference at(size_type index) const
std::invoke_result_t< F, null_array > visit_result_t
constexpr visit_result_t< F > visit(F &&func) const
Returns the result of calling the given functor func on the layout internally held by the array.
array & operator=(const array &rhs)=default
Overwrites the content of the array with a deep copy of the given array, even if it does not have the...
array & operator=(array &&rhs)=default
The move assignment operator.
SPARROW_API array(ArrowArray &&array, ArrowSchema *schema)
Constructs an Array from the given Arrow C structures.
array(array &&rhs)=default
The move constructor.
SPARROW_API bool empty() const
Checks if the array has no element, i.e.
SPARROW_API std::optional< key_value_view > metadata() const
SPARROW_API std::optional< std::string_view > name() const
SPARROW_API const_reference back() const
Returns a constant reference to the last element in the container.
SPARROW_API const_reference front() const
Returns a constant reference to the first element in the container.
SPARROW_API size_type size() const
array()=default
Constructs an empty array.
constexpr void set_metadata(std::optional< R > metadata)
Sets the metadata of the array to metadata.
array_traits::const_reference const_reference
SPARROW_API const_reference operator[](size_type index) const
SPARROW_API array(ArrowArray &&array, ArrowSchema &&schema)
Constructs an Array from the given Arrow C structures, whose ownership is transferred to the Array.
SPARROW_API array slice(size_type start, size_type end) const
Slices the array to keep only the elements between the given start and end.
SPARROW_API enum data_type data_type() const
SPARROW_API void set_name(std::optional< std::string_view > name)
Sets the name of the array to name.
SPARROW_API array(ArrowArray *array, ArrowSchema *schema)
Constructs an array from the given Arrow C structures.
array_traits::value_type value_type
constexpr array(const array &rhs)=default
Performs a deep copy of the given array, even if it does not have the ownership of its internal data.
SPARROW_API array slice_view(size_type start, size_type end) const
Slices the array to keep only the elements between the given start and end.
Smart pointer behaving like a copiable std::unique_ptr.
SPARROW_API bool operator==(const array &lhs, const array &rhs)
Compares the content of two arrays.
ArrowArray extract_arrow_array(A &&a)
Extracts the internal ArrowArray structure from the given Array or typed layout.
std::pair< ArrowArray, ArrowSchema > extract_arrow_structures(A &&a)
Extracts the internal ArrowArray and ArrowSchema structures from the given array or typed layout.
ArrowSchema extract_arrow_schema(A &&a)
Extracts the internal ArrowSchema structure from the given array or typed layout.
ArrowSchema * get_arrow_schema(A &a)
Returns a pointer to the internal ArrowSchema of the given array or layout.
bool owns_arrow_schema(const A &a)
Returns true if the given layout or array has ownership of its internal ArrowSchema.
bool owns_arrow_array(const A &a)
Returns true if the given layout or array has ownership of its internal ArrowArray.
std::pair< ArrowArray *, ArrowSchema * > get_arrow_structures(A &a)
Returns pointers to the internal ArrowArray and ArrowSchema of the given Array or layout.
ArrowArray * get_arrow_array(A &a)
Returns a pointer to the internal ArrowArray of the given array or layout.
mpl::rename< mpl::unique< mpl::transform< detail::array_const_reference_t, all_base_types_t > >, nullable_variant > const_reference
mpl::rename< mpl::transform< detail::array_value_type_t, all_base_types_t >, nullable_variant > value_type