MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / build

Method build

nodedb-array/src/tile/mbr.rs:131–164  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

129 }
130
131 pub fn build(self) -> TileMBR {
132 let dim_mins = self.dim_mins.iter().map(coord_to_bound).collect();
133 let dim_maxs = self.dim_maxs.iter().map(coord_to_bound).collect();
134 let mut attr_stats = Vec::with_capacity(self.n_attrs);
135 for i in 0..self.n_attrs {
136 let s = if self.attr_total[i] == self.attr_nulls[i] {
137 AttrStats::AllNull {
138 null_count: self.attr_nulls[i],
139 }
140 } else if self.attr_is_categorical[i] {
141 AttrStats::Categorical {
142 distinct: self.attr_distinct[i].len() as u32,
143 null_count: self.attr_nulls[i],
144 }
145 } else {
146 // Numeric branch is reached only when at least one
147 // non-null numeric cell was folded (the if/else above
148 // excludes all-null and categorical), so attr_min /
149 // attr_max are populated.
150 AttrStats::Numeric {
151 min: self.attr_min[i].expect("numeric branch implies min is set"),
152 max: self.attr_max[i].expect("numeric branch implies max is set"),
153 null_count: self.attr_nulls[i],
154 }
155 };
156 attr_stats.push(s);
157 }
158 TileMBR {
159 dim_mins,
160 dim_maxs,
161 nnz: self.nnz,
162 attr_stats,
163 }
164 }
165}
166
167fn coord_lt(a: &CoordValue, b: &CoordValue) -> bool {

Callers 15

submit_and_wait_writeMethod · 0.45
submit_and_wait_fsyncMethod · 0.45
lindera_segmentFunction · 0.45
schemaFunction · 0.45
make_tileFunction · 0.45
schemaFunction · 0.45
make_tileFunction · 0.45
tombstone_rows_roundtripFunction · 0.45
slice_sparseFunction · 0.45
schemaFunction · 0.45

Calls 5

collectMethod · 0.80
iterMethod · 0.45
lenMethod · 0.45
expectMethod · 0.45
pushMethod · 0.45