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

Method state

datafusion-examples/examples/udf/simple_udaf.rs:76–81  ·  view source on GitHub ↗

This function serializes our state to `ScalarValue`, which DataFusion uses to pass this state between execution stages. Note that this can be arbitrary data.

(&mut self)

Source from the content-addressed store, hash-verified

74 // to pass this state between execution stages.
75 // Note that this can be arbitrary data.
76 fn state(&mut self) -> Result<Vec<ScalarValue>> {
77 Ok(vec![
78 ScalarValue::from(self.prod),
79 ScalarValue::from(self.n),
80 ])
81 }
82
83 // DataFusion expects this function to return the final value of this aggregator.
84 // in this case, this is the formula of the geometric mean

Callers 15

catalogFunction · 0.45
remote_catalogFunction · 0.45
json_shreddingFunction · 0.45
get_schemaMethod · 0.45
adapter_serializationFunction · 0.45
custom_file_castsFunction · 0.45
search_accountsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected