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

Function build_rel

src/expr-test-util/src/lib.rs:42–48  ·  view source on GitHub ↗

Builds a [MirRelationExpr] from a string. See [mz_lowertest::to_json] for the syntax.

(s: &str, catalog: &TestCatalog)

Source from the content-addressed store, hash-verified

40///
41/// See [mz_lowertest::to_json] for the syntax.
42pub fn build_rel(s: &str, catalog: &TestCatalog) -> Result<MirRelationExpr, String> {
43 deserialize(
44 &mut tokenize(s)?.into_iter(),
45 "MirRelationExpr",
46 &mut MirRelationExprDeserializeContext::new(catalog),
47 )
48}
49
50/// Turns the json version of a [MirRelationExpr] into the [mz_lowertest::to_json]
51/// syntax.

Callers 3

roundtrip_with_catalogFunction · 0.85
run_roundtrip_testsFunction · 0.85
parse_relationFunction · 0.85

Calls 3

deserializeFunction · 0.50
tokenizeFunction · 0.50
into_iterMethod · 0.45

Tested by 3

roundtrip_with_catalogFunction · 0.68
run_roundtrip_testsFunction · 0.68
parse_relationFunction · 0.68