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

Method distinct_by

src/expr/src/relation.rs:1386–1388  ·  view source on GitHub ↗

Removes all but the first occurrence of each key. Columns not included in the `group_key` are discarded.

(self, group_key: Vec<usize>)

Source from the content-addressed store, hash-verified

1384 /// Removes all but the first occurrence of each key. Columns not included
1385 /// in the `group_key` are discarded.
1386 pub fn distinct_by(self, group_key: Vec<usize>) -> Self {
1387 self.reduce(group_key, vec![], None)
1388 }
1389
1390 /// Discards rows with a negative frequency.
1391 pub fn threshold(self) -> Self {

Callers 3

distinctMethod · 0.80
branchFunction · 0.80

Calls 1

reduceMethod · 0.45

Tested by

no test coverage detected