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

Method evaluate

datafusion/functions-aggregate/src/stddev.rs:285–292  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

283 }
284
285 fn evaluate(&mut self) -> Result<ScalarValue> {
286 let variance = self.variance.evaluate()?;
287 match variance {
288 ScalarValue::Float64(None) => Ok(ScalarValue::Float64(None)),
289 ScalarValue::Float64(Some(f)) => Ok(ScalarValue::Float64(Some(f.sqrt()))),
290 _ => internal_err!("Variance should be f64"),
291 }
292 }
293
294 fn size(&self) -> usize {
295 align_of_val(self) - align_of_val(&self.variance) + self.variance.size()

Callers 1

mergeFunction · 0.45

Calls 3

newFunction · 0.85
varianceMethod · 0.45
intoMethod · 0.45

Tested by

no test coverage detected