Crystrix commented on a change in pull request #10486:
URL: https://github.com/apache/arrow/pull/10486#discussion_r757835558
##########
File path: cpp/src/arrow/compute/exec.cc
##########
@@ -961,6 +961,14 @@ class ScalarAggExecutor : public
KernelExecutorImpl<ScalarAggregateKernel> {
return outputs[0];
}
+ Status CheckResultType(const Datum& out, const char* function_name) override
{
+ if (strcmp(function_name, "sum") == 0 &&
output_descr_.type->Equals(null())) {
+ // Skip CheckResultType for sum of null type, as it may return various
types
+ return Status::OK();
+ }
+ return KernelExecutorImpl::CheckResultType(out, function_name);
+ }
Review comment:
I am not sure how to return different types of data, so I just skip the
`CheckResultType` for `sum(null)`.
--
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]