You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Dandandan (via GitHub)" <gi...@apache.org> on 2023/07/24 20:06:09 UTC
[GitHub] [arrow-datafusion] Dandandan commented on a diff in pull request #7048: Add Decimal256 to `ScalarValue`
Dandandan commented on code in PR #7048:
URL: https://github.com/apache/arrow-datafusion/pull/7048#discussion_r1272700588
##########
datafusion/expr/src/type_coercion/aggregates.rs:
##########
@@ -441,6 +455,11 @@ pub fn avg_sum_type(arg_type: &DataType) -> Result<DataType> {
let new_precision = DECIMAL128_MAX_PRECISION.min(*precision + 10);
Ok(DataType::Decimal128(new_precision, *scale))
}
+ DataType::Decimal256(precision, scale) => {
+ // in the spark, the sum type of avg is DECIMAL(min(38,precision+10), s)
Review Comment:
```suggestion
// in Spark the sum type of avg is DECIMAL(min(38,precision+10), s)
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org