Skip to main content

ResultToArrow

Trait ResultToArrow 

Source
pub trait ResultToArrow {
    // Required methods
    fn to_arrow_array(&self) -> Arc<dyn ArrowArray>;
    fn arrow_data_type(&self) -> DataType;
}
Expand description

Trait for converting aggregation results to Arrow arrays.

This preserves the native type (e.g., Float64 for AVG) and nullable semantics (empty windows produce null, not zero).

Required Methods§

Source

fn to_arrow_array(&self) -> Arc<dyn ArrowArray>

Converts the result to a single-element Arrow array.

Source

fn arrow_data_type(&self) -> DataType

Returns the Arrow [DataType] for this result.

Implementations on Foreign Types§

Source§

impl ResultToArrow for Option<f64>

Source§

fn to_arrow_array(&self) -> Arc<dyn ArrowArray>

Source§

fn arrow_data_type(&self) -> DataType

Source§

impl ResultToArrow for Option<i64>

Source§

fn to_arrow_array(&self) -> Arc<dyn ArrowArray>

Source§

fn arrow_data_type(&self) -> DataType

Source§

impl ResultToArrow for i64

Source§

fn to_arrow_array(&self) -> Arc<dyn ArrowArray>

Source§

fn arrow_data_type(&self) -> DataType

Source§

impl ResultToArrow for u64

Source§

fn to_arrow_array(&self) -> Arc<dyn ArrowArray>

Source§

fn arrow_data_type(&self) -> DataType

Implementors§