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

Function gen_expr_data

src/expr/src/interpret.rs:1514–1527  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1512 }
1513
1514 fn gen_expr_data() -> impl Strategy<Value = ExpressionData> {
1515 let columns = prop::collection::vec(gen_column(), 1..10);
1516 columns.prop_flat_map(|data| {
1517 let (columns, datums, specs): (Vec<_>, Vec<_>, Vec<_>) = data.into_iter().multiunzip();
1518 let relation = ReprRelationType::new(columns);
1519 let row = Row::pack_slice(&datums);
1520 gen_expr_for_relation(&relation).prop_map(move |(expr, _)| ExpressionData {
1521 relation_type: relation.clone(),
1522 specs: specs.clone(),
1523 rows: vec![row.clone()],
1524 expr,
1525 })
1526 })
1527 }
1528
1529 #[mz_ore::test]
1530 #[cfg_attr(miri, ignore)] // error: unsupported operation: can't call foreign function `decContextDefault` on OS `linux`

Callers

nothing calls this directly

Calls 4

gen_columnFunction · 0.85
gen_expr_for_relationFunction · 0.85
into_iterMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected