MCPcopy Create free account
hub / github.com/apache/datafusion / num_distinct

Method num_distinct

benchmarks/src/dict.rs:85–91  ·  view source on GitHub ↗
(self, size: usize)

Source from the content-addressed store, hash-verified

83
84impl Cardinality {
85 pub fn num_distinct(self, size: usize) -> usize {
86 match self {
87 Cardinality::Five => (size / 20).max(1),
88 Cardinality::Ten => (size / 10).max(1),
89 Cardinality::TwentyFive => (size / 4).max(1),
90 }
91 }
92}
93
94/// `generate_dict` arguments for one dictionary column.

Callers 1

generate_dictFunction · 0.80

Calls 1

maxMethod · 0.45

Tested by

no test coverage detected