MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / as_const_mut

Method as_const_mut

src/expr/src/relation.rs:1106–1117  ·  view source on GitHub ↗

If self is a constant, mutably return the value and the type, otherwise `None`. Looks behind `ArrangeBy`s.

(
        &mut self,
    )

Source from the content-addressed store, hash-verified

1104 /// If self is a constant, mutably return the value and the type, otherwise `None`.
1105 /// Looks behind `ArrangeBy`s.
1106 pub fn as_const_mut(
1107 &mut self,
1108 ) -> Option<(
1109 &mut Result<Vec<(Row, Diff)>, EvalError>,
1110 &mut ReprRelationType,
1111 )> {
1112 match self {
1113 MirRelationExpr::Constant { rows, typ } => Some((rows, typ)),
1114 MirRelationExpr::ArrangeBy { input, .. } => input.as_const_mut(),
1115 _ => None,
1116 }
1117 }
1118
1119 /// If self is a constant error, return the error, otherwise `None`.
1120 /// Looks behind `ArrangeBy`s.

Callers 1

actionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected