#[repr(C)]pub struct FFI_AggregateUDF {Show 17 fields
pub name: String,
pub aliases: Vec<String>,
pub volatility: FFI_Volatility,
pub return_field: unsafe extern "C" fn(udaf: &Self, arg_fields: Vec<WrappedSchema>) -> FFI_Result<WrappedSchema>,
pub is_nullable: bool,
pub groups_accumulator_supported: unsafe extern "C" fn(udaf: &FFI_AggregateUDF, args: FFI_AccumulatorArgs) -> bool,
pub accumulator: unsafe extern "C" fn(udaf: &FFI_AggregateUDF, args: FFI_AccumulatorArgs) -> FFI_Result<FFI_Accumulator>,
pub create_sliding_accumulator: unsafe extern "C" fn(udaf: &FFI_AggregateUDF, args: FFI_AccumulatorArgs) -> FFI_Result<FFI_Accumulator>,
pub state_fields: unsafe extern "C" fn(udaf: &FFI_AggregateUDF, name: &Str<'_>, input_fields: Vec<WrappedSchema>, return_field: WrappedSchema, ordering_fields: Vec<Vec<u8>>, is_distinct: bool) -> FFI_Result<Vec<Vec<u8>>>,
pub create_groups_accumulator: unsafe extern "C" fn(udaf: &FFI_AggregateUDF, args: FFI_AccumulatorArgs) -> FFI_Result<FFI_GroupsAccumulator>,
pub with_beneficial_ordering: unsafe extern "C" fn(udaf: &FFI_AggregateUDF, beneficial_ordering: bool) -> FFI_Result<FFI_Option<FFI_AggregateUDF>>,
pub order_sensitivity: unsafe extern "C" fn(udaf: &FFI_AggregateUDF) -> FFI_AggregateOrderSensitivity,
pub coerce_types: unsafe extern "C" fn(udf: &Self, arg_types: Vec<WrappedSchema>) -> FFI_Result<Vec<WrappedSchema>>,
pub clone: unsafe extern "C" fn(udaf: &Self) -> Self,
pub release: unsafe extern "C" fn(udaf: &mut Self),
pub private_data: *mut c_void,
pub library_marker_id: extern "C" fn() -> usize,
}Expand description
A stable struct for sharing a AggregateUDF across FFI boundaries.
Fields§
§name: StringFFI equivalent to the name of a AggregateUDF
aliases: Vec<String>FFI equivalent to the aliases of a AggregateUDF
volatility: FFI_VolatilityFFI equivalent to the volatility of a AggregateUDF
return_field: unsafe extern "C" fn(udaf: &Self, arg_fields: Vec<WrappedSchema>) -> FFI_Result<WrappedSchema>Determines the return field of the underlying AggregateUDF based on the
argument fields.
is_nullable: boolFFI equivalent to the is_nullable of a AggregateUDF
groups_accumulator_supported: unsafe extern "C" fn(udaf: &FFI_AggregateUDF, args: FFI_AccumulatorArgs) -> boolFFI equivalent to AggregateUDF::groups_accumulator_supported
accumulator: unsafe extern "C" fn(udaf: &FFI_AggregateUDF, args: FFI_AccumulatorArgs) -> FFI_Result<FFI_Accumulator>FFI equivalent to AggregateUDF::accumulator
create_sliding_accumulator: unsafe extern "C" fn(udaf: &FFI_AggregateUDF, args: FFI_AccumulatorArgs) -> FFI_Result<FFI_Accumulator>FFI equivalent to AggregateUDF::create_sliding_accumulator
state_fields: unsafe extern "C" fn(udaf: &FFI_AggregateUDF, name: &Str<'_>, input_fields: Vec<WrappedSchema>, return_field: WrappedSchema, ordering_fields: Vec<Vec<u8>>, is_distinct: bool) -> FFI_Result<Vec<Vec<u8>>>FFI equivalent to AggregateUDF::state_fields
create_groups_accumulator: unsafe extern "C" fn(udaf: &FFI_AggregateUDF, args: FFI_AccumulatorArgs) -> FFI_Result<FFI_GroupsAccumulator>FFI equivalent to AggregateUDF::create_groups_accumulator
with_beneficial_ordering: unsafe extern "C" fn(udaf: &FFI_AggregateUDF, beneficial_ordering: bool) -> FFI_Result<FFI_Option<FFI_AggregateUDF>>FFI equivalent to AggregateUDF::with_beneficial_ordering
order_sensitivity: unsafe extern "C" fn(udaf: &FFI_AggregateUDF) -> FFI_AggregateOrderSensitivityFFI equivalent to AggregateUDF::order_sensitivity
coerce_types: unsafe extern "C" fn(udf: &Self, arg_types: Vec<WrappedSchema>) -> FFI_Result<Vec<WrappedSchema>>Performs type coercion. To simply this interface, all UDFs are treated as having
user defined signatures, which will in turn call coerce_types to be called. This
call should be transparent to most users as the internal function performs the
appropriate calls on the underlying AggregateUDF
clone: unsafe extern "C" fn(udaf: &Self) -> SelfUsed to create a clone on the provider of the udaf. This should only need to be called by the receiver of the udaf.
release: unsafe extern "C" fn(udaf: &mut Self)Release the memory of the private data when it is no longer being used.
private_data: *mut c_voidInternal data. This is only to be accessed by the provider of the udaf.
A ForeignAggregateUDF should never attempt to access this data.
library_marker_id: extern "C" fn() -> usizeUtility to identify when FFI objects are accessed locally through
the foreign interface. See crate::get_library_marker_id and
the crate’s README.md for more information.
Trait Implementations§
Source§impl Clone for FFI_AggregateUDF
impl Clone for FFI_AggregateUDF
Source§impl Debug for FFI_AggregateUDF
impl Debug for FFI_AggregateUDF
Source§impl Drop for FFI_AggregateUDF
impl Drop for FFI_AggregateUDF
Source§impl From<&FFI_AggregateUDF> for Arc<dyn AggregateUDFImpl>
impl From<&FFI_AggregateUDF> for Arc<dyn AggregateUDFImpl>
Source§fn from(udaf: &FFI_AggregateUDF) -> Self
fn from(udaf: &FFI_AggregateUDF) -> Self
Source§impl From<Arc<AggregateUDF>> for FFI_AggregateUDF
impl From<Arc<AggregateUDF>> for FFI_AggregateUDF
Source§fn from(udaf: Arc<AggregateUDF>) -> Self
fn from(udaf: Arc<AggregateUDF>) -> Self
impl Send for FFI_AggregateUDF
impl Sync for FFI_AggregateUDF
Auto Trait Implementations§
impl Freeze for FFI_AggregateUDF
impl RefUnwindSafe for FFI_AggregateUDF
impl Unpin for FFI_AggregateUDF
impl UnsafeUnpin for FFI_AggregateUDF
impl UnwindSafe for FFI_AggregateUDF
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more