You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/03 17:12:35 UTC

[GitHub] [arrow-datafusion] yjshen commented on a diff in pull request #2405: `sum(distinct)` support

yjshen commented on code in PR #2405:
URL: https://github.com/apache/arrow-datafusion/pull/2405#discussion_r864001592


##########
datafusion/physical-expr/src/aggregate/sum.rs:
##########
@@ -297,6 +297,18 @@ pub(crate) fn sum(lhs: &ScalarValue, rhs: &ScalarValue) -> Result<ScalarValue> {
         (ScalarValue::Int64(lhs), ScalarValue::Int8(rhs)) => {
             typed_sum!(lhs, rhs, Int64, i64)
         }
+        (ScalarValue::Int64(lhs), ScalarValue::UInt64(rhs)) => {

Review Comment:
   Coercion u64 to i64 seems irrational to me. Why do we need this kind of coercion in sum distinct?



-- 
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