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

Method next

src/expr/src/relation.rs:4215–4477  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

4213 type Item = (&'a MirRelationExpr, &'a MirRelationExpr);
4214
4215 fn next(&mut self) -> Option<Self::Item> {
4216 while let Some((expr1, expr2)) = self.todo.pop() {
4217 match (expr1, expr2) {
4218 (
4219 MirRelationExpr::Constant {
4220 rows: rows1,
4221 typ: typ1,
4222 },
4223 MirRelationExpr::Constant {
4224 rows: rows2,
4225 typ: typ2,
4226 },
4227 ) => {
4228 if rows1 != rows2 || typ1 != typ2 {
4229 return Some((expr1, expr2));
4230 }
4231 }
4232 (
4233 MirRelationExpr::Get {
4234 id: id1,
4235 typ: typ1,
4236 access_strategy: as1,
4237 },
4238 MirRelationExpr::Get {
4239 id: id2,
4240 typ: typ2,
4241 access_strategy: as2,
4242 },
4243 ) => {
4244 if id1 != id2 || typ1 != typ2 || as1 != as2 {
4245 return Some((expr1, expr2));
4246 }
4247 }
4248 (
4249 MirRelationExpr::Let {
4250 id: id1,
4251 body: body1,
4252 value: value1,
4253 },
4254 MirRelationExpr::Let {
4255 id: id2,
4256 body: body2,
4257 value: value2,
4258 },
4259 ) => {
4260 if id1 != id2 {
4261 return Some((expr1, expr2));
4262 } else {
4263 self.todo.push((body1, body2));
4264 self.todo.push((value1, value2));
4265 }
4266 }
4267 (
4268 MirRelationExpr::LetRec {
4269 ids: ids1,
4270 body: body1,
4271 values: values1,
4272 limits: limits1,

Callers 15

build_case_literalFunction · 0.45
eqMethod · 0.45
keys_with_input_keysMethod · 0.45
enforce_linear_chainsFunction · 0.45
test_mfpFunction · 0.45
build_literal_if_ableMethod · 0.45
override_syntaxMethod · 0.45
build_constantMethod · 0.45
build_letMethod · 0.45

Calls 5

popMethod · 0.45
pushMethod · 0.45
lenMethod · 0.45
extendMethod · 0.45
iterMethod · 0.45

Tested by 6

test_mfpFunction · 0.36
test_partial_readFunction · 0.36