ArrayReduceRule

Trait ArrayReduceRule 

Source
pub trait ArrayReduceRule<V: VTable>:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn reduce(&self, array: &V::Array) -> VortexResult<Option<ArrayRef>>;
}
Expand description

A rewrite rule that transforms arrays based on their own content

Required Methods§

Source

fn reduce(&self, array: &V::Array) -> VortexResult<Option<ArrayRef>>

Attempt to rewrite this array.

Returns:

  • Ok(Some(new_array)) if the rule applied successfully
  • Ok(None) if the rule doesn’t apply
  • Err(e) if an error occurred

Implementors§