apache / datafusion-comet

Apache DataFusion Comet Spark Accelerator
https://datafusion.apache.org/comet
Apache License 2.0
447 stars 100 forks source link

feat: Supports Stddev #348

Closed huaxingao closed 1 week ago

huaxingao commented 2 weeks ago

Which issue does this PR close?

Closes #.

Rationale for this change

Supports STDDEV_SAMP and STDDEV_POP The implementation mostly is the same as the DataFusion's implementation. The reason we have our own implementation is that DataFusion has UInt64 for state_field count, while Spark has Double for count. Also adding null_on_divide_by_zero to be consistent with Spark's implementation.

What changes are included in this PR?

How are these changes tested?

viirya commented 1 week ago

Some minor comments.

viirya commented 1 week ago

Merged. Thanks @huaxingao @kazuyukitanimura @andygrove

huaxingao commented 1 week ago

Thanks, everyone!