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

Function decoded_to_f64

nodedb/src/engine/timeseries/columnar_bridge.rs:255–266  ·  view source on GitHub ↗

Extract f64 values and validity from a DecodedColumn.

(col: DecodedColumn)

Source from the content-addressed store, hash-verified

253
254/// Extract f64 values and validity from a DecodedColumn.
255fn decoded_to_f64(col: DecodedColumn) -> (Vec<f64>, Vec<bool>) {
256 match col {
257 DecodedColumn::Float64 { values, valid } => (values, valid),
258 DecodedColumn::Int64 { values, valid } => {
259 (values.into_iter().map(|i| i as f64).collect(), valid)
260 }
261 DecodedColumn::Timestamp { values, valid } => {
262 (values.into_iter().map(|i| i as f64).collect(), valid)
263 }
264 _ => (Vec::new(), Vec::new()),
265 }
266}
267
268#[cfg(test)]
269mod tests {

Callers 1

scan_shared_segmentFunction · 0.85

Calls 1

collectMethod · 0.80

Tested by

no test coverage detected