[
https://issues.apache.org/jira/browse/HIVE-18105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16259225#comment-16259225
]
Zoltan Haindrich commented on HIVE-18105:
-----------------------------------------
now that this "bug" have been fixed. all the {{count(1)}} aggregations are
returning {{1}} for empty sets; since the constant is now passed correctly in
the parameters....
I see no reason to call the {{aggregate}} method in case we have 0 rows...I
think the "{{AggregationBuffer}} should be initialized as a valid buffer to
represent the empty aggregation.
#2)
* remove the callsite which enforced that UDAF implementations to handle
all-null parameters as a non-existent row
* removed my new test :(
* ...will see if this trick was really in use...
> Aggregation of an empty set doesn't pass constants to the UDAF
> --------------------------------------------------------------
>
> Key: HIVE-18105
> URL: https://issues.apache.org/jira/browse/HIVE-18105
> Project: Hive
> Issue Type: Sub-task
> Reporter: Zoltan Haindrich
> Assignee: Zoltan Haindrich
> Attachments: HIVE-18105.01.patch
>
>
> the groupbyoperator's logic for firstrow passes {{null}} for all parameters.
> see
> [here|https://github.com/apache/hive/blob/39d46e8af5a3794f7395060b890f94ddc84516e7/ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java#L1116].
> this could obstruct {{compute_stats}} operations because it has a constant
> argument.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)