pub trait AggregateFnPlugin:
'static
+ Send
+ Sync {
// Required methods
fn id(&self) -> AggregateFnId;
fn deserialize(
&self,
metadata: &[u8],
session: &VortexSession,
) -> VortexResult<AggregateFnRef>;
// Provided method
fn zone_stat_default(&self, _input_dtype: &DType) -> Option<AggregateFnRef> { ... }
}Expand description
Registry trait for ID-based deserialization of aggregate functions.
Plugins are registered in the session by their AggregateFnId. When a serialized aggregate
function is encountered, the session resolves the ID to the plugin and calls deserialize
to reconstruct the value as an AggregateFnRef.
Required Methods§
Sourcefn id(&self) -> AggregateFnId
fn id(&self) -> AggregateFnId
Returns the ID for this aggregate function.
Sourcefn deserialize(
&self,
metadata: &[u8],
session: &VortexSession,
) -> VortexResult<AggregateFnRef>
fn deserialize( &self, metadata: &[u8], session: &VortexSession, ) -> VortexResult<AggregateFnRef>
Deserialize an aggregate function from serialized metadata.
Provided Methods§
Sourcefn zone_stat_default(&self, _input_dtype: &DType) -> Option<AggregateFnRef>
fn zone_stat_default(&self, _input_dtype: &DType) -> Option<AggregateFnRef>
The default zone statistic (per-chunk) for a column of input_dtype, or None if the
dtype is not supported (or this aggregate is not a zone statistic at all).
This is how a registered aggregate volunteers itself as a per-chunk statistic: when a
zoned layout writer opens a column, it collects every plugin’s default via
AggregateFnSession::zone_stat_defaults, so new statistics can be added without the
writer knowing about them.
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".