Skip to main content

Module df_udaf_plugin

Module df_udaf_plugin 

Source
Expand description

DataFusion adapter for uni_plugin::traits::aggregate::AggregatePluginFn.

Bridges plugin-registered aggregates (AggregatePluginFn) into the DataFusion AggregateUDFImpl surface so the Cypher planner can invoke RETURN myAgg(x) against any registry entry, not just the handful of built-ins hard-coded in df_planner.rs::translate_aggregates.

M9 ships this in support of uni.plugin.declareAggregate (see uni-plugin-custom::DeclaredAggregateFn). The adapter is generic across any AggregatePluginFn source — it does not assume the declared shape.

§State model

Plugin aggregates’ AggSignature.state_fields declares the schema of partial state for distributed aggregation. The M9 declared aggregates ship with state_fields: vec![] and supports_partial: false; the adapter respects whatever the registry entry declares.

Structs§

PluginAggregateUdaf
DataFusion AggregateUDFImpl wrapping a plugin-registered aggregate looked up by QName in the shared PluginRegistry.