23 requires(not std::is_lvalue_reference_v<A>)
47 template <layout_or_array A>
53 template <layout_or_array A>
59 template <layout_or_array A>
65 template <layout_or_array A>
71 template <layout_or_array A>
75 return std::make_pair(&(proxy.
array()), &(proxy.
schema()));
78 template <layout_or_array A>
84 template <layout_or_array A>
90 template <layout_or_array A>
98#if defined(__cpp_lib_format)
101struct std::formatter<
sparrow::array>
103 constexpr auto parse(std::format_parse_context& ctx)
108 auto format(
const sparrow::array& ar, std::format_context& ctx)
const
111 [&ctx](
const auto& layout)
113 return std::format_to(ctx.out(),
"{}", layout);
121 os << std::format(
"{}", value);
Dynamically typed array encapsulating an Arrow layout.
std::invoke_result_t< F, null_array > visit_result_t
array()=default
Constructs an empty array.
visit_result_t< F > visit(F &&func) const
Returns the result of calling the given functor func on the layout internally hold by the array.
Proxy class over ArrowArray and ArrowSchema.
SPARROW_API ArrowArray extract_array()
SPARROW_API ArrowSchema & schema()
SPARROW_API bool owns_schema() const
SPARROW_API ArrowArray & array()
SPARROW_API bool owns_array() const
SPARROW_API ArrowSchema extract_schema()
static const sparrow::arrow_proxy & get_arrow_proxy(const ARRAY &array)
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 ArrowArrays and ArrowSchema structures from the given array or typed layout.
std::ostream & operator<<(std::ostream &stream, T n)
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.
visit_result_t< F > visit(F &&func, const array_wrapper &ar)
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.