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

Method constant

src/expr/src/relation.rs:1069–1072  ·  view source on GitHub ↗

Constructs a constant collection from specific rows and schema, where each row will have a multiplicity of one.

(rows: Vec<Vec<Datum>>, typ: ReprRelationType)

Source from the content-addressed store, hash-verified

1067 /// Constructs a constant collection from specific rows and schema, where
1068 /// each row will have a multiplicity of one.
1069 pub fn constant(rows: Vec<Vec<Datum>>, typ: ReprRelationType) -> Self {
1070 let rows = rows.into_iter().map(|row| (row, Diff::ONE)).collect();
1071 MirRelationExpr::constant_diff(rows, typ)
1072 }
1073
1074 /// Constructs a constant collection from specific rows and schema, where
1075 /// each row can have an arbitrary multiplicity.

Callers

nothing calls this directly

Calls 3

collectMethod · 0.45
mapMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected