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

Method is_constant_singleton

src/expr/src/relation.rs:1130–1136  ·  view source on GitHub ↗

Checks if `self` is the single element collection with no columns.

(&self)

Source from the content-addressed store, hash-verified

1128
1129 /// Checks if `self` is the single element collection with no columns.
1130 pub fn is_constant_singleton(&self) -> bool {
1131 if let Some((Ok(rows), typ)) = self.as_const() {
1132 rows.len() == 1 && typ.column_types.len() == 0 && rows[0].1 == Diff::ONE
1133 } else {
1134 false
1135 }
1136 }
1137
1138 /// Constructs the expression for getting a local collection.
1139 pub fn local_get(id: LocalId, typ: ReprRelationType) -> Self {

Callers 3

productMethod · 0.80
join_scalarsMethod · 0.80
actionMethod · 0.80

Calls 2

as_constMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected