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

Function parse_relation

src/transform/tests/test_runner.rs:109–120  ·  view source on GitHub ↗

Converts string to MirRelationExpr. `args[in]` specifies which input format is being used.

(
        s: &str,
        cat: &TestCatalog,
        args: &HashMap<String, Vec<String>>,
    )

Source from the content-addressed store, hash-verified

107 // Converts string to MirRelationExpr. `args[in]` specifies which input
108 // format is being used.
109 fn parse_relation(
110 s: &str,
111 cat: &TestCatalog,
112 args: &HashMap<String, Vec<String>>,
113 ) -> Result<MirRelationExpr, Error> {
114 if let Some(input_format) = args.get(IN) {
115 if input_format.iter().any(|s| s == JSON) {
116 return serde_json::from_str::<MirRelationExpr>(s).map_err(|e| anyhow!(e));
117 }
118 }
119 build_rel(s, cat).map_err(|e| anyhow!(e))
120 }
121
122 /// Converts MirRelationExpr to `format_type`.
123 fn convert_rel_to_string(

Callers 1

run_single_view_testcaseFunction · 0.85

Calls 4

build_relFunction · 0.85
anyMethod · 0.80
getMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected