Struct transform::reduction::FoldConstants [−][src]
Expand description
Replace operators on constant collections with constant collections.
Fields
limit: Option<usize>
An optional maximum size, after which optimization can cease.
The None
value here indicates no maximum size, but does not
currently guarantee that any constant expression will be reduced
to a MirRelationExpr::Constant
variant.
Implementations
pub fn action(
&self,
relation: &mut MirRelationExpr,
relation_type: &mut RelationType,
input_types: &[RelationType]
) -> Result<(), TransformError>
pub fn action(
&self,
relation: &mut MirRelationExpr,
relation_type: &mut RelationType,
input_types: &[RelationType]
) -> Result<(), TransformError>
Replace operators on constants collections with constant collections.
This transform will cease optimization if it encounters constant collections
that are larger than self.limit
, if that is set. It is not guaranteed that
a constant input within the limit will be reduced to a Constant
variant.
fn fold_reduce_constant(
group_key: &[MirScalarExpr],
aggregates: &[AggregateExpr],
rows: &[(Row, Diff)]
) -> Result<Vec<(Row, Diff)>, EvalError>
fn fold_topk_constant<'a>(
group_key: &[usize],
order_key: &[ColumnOrder],
limit: &Option<usize>,
offset: &usize,
rows: &'a mut [(Row, Diff)]
)
Trait Implementations
fn transform(
&self,
relation: &mut MirRelationExpr,
_: TransformArgs<'_>
) -> Result<(), TransformError>
fn transform(
&self,
relation: &mut MirRelationExpr,
_: TransformArgs<'_>
) -> Result<(), TransformError>
Transform a relation into a functionally equivalent relation.
Auto Trait Implementations
impl RefUnwindSafe for FoldConstants
impl Send for FoldConstants
impl Sync for FoldConstants
impl Unpin for FoldConstants
impl UnwindSafe for FoldConstants
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more