apache / datafusion-comet

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

SumDecimal always returns nullable=true #961

Open andygrove opened 1 month ago

andygrove commented 1 month ago

Describe the bug

SumDecimal currently hardcodes nullable=true, and this is correct when ANSI mode is not enabled, because overflows cause null values. However, in ANSI mode, overflows cause exceptions. If the input is non-nullable then SumDecimal should probably also be non-nullable. The same is true for AvgDecimal.

Steps to reproduce

No response

Expected behavior

No response

Additional context

No response

vaibhawvipul commented 1 month ago

I will be working on this.