alamb commented on a change in pull request #1582:
URL: https://github.com/apache/arrow-datafusion/pull/1582#discussion_r785439224



##########
File path: datafusion-examples/examples/simple_udaf.rs
##########
@@ -124,6 +124,34 @@ impl Accumulator for GeometricMean {
     // Optimization hint: this trait also supports `update_batch` and 
`merge_batch`,
     // that can be used to perform these operations on arrays instead of 
single values.
     // By default, these methods call `update` and `merge` row by row

Review comment:
       I suggest we update this example (I can do it as a follow on PR) to not 
use ScalarValue at all
   
   ```suggestion
       // DataFusion calls this function to update the accumulator's state for 
a batch 
       // of inputs rows. In this case the product is updated with values from 
the first column
       // and the count is updated based on the row count
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to