[
https://issues.apache.org/jira/browse/ASTERIXDB-2564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ali Alsuliman resolved ASTERIXDB-2564.
--------------------------------------
Resolution: Fixed
> Too many objects created in min() and max()
> -------------------------------------------
>
> Key: ASTERIXDB-2564
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2564
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: RT - Runtime
> Affects Versions: 0.9.4
> Reporter: Ali Alsuliman
> Assignee: Ali Alsuliman
> Priority: Major
> Fix For: 0.9.5
>
>
> min() and max() functions create a new comparator when switching to new
> aggregation type. That is when they encounter a double and the previous input
> values were int. The logic checks if the promotion is possible and then
> switch. By definition, double -> double promotion is always possible (calling
> canPromote(double, double) will always return true). This will lead to
> "switching" aggregation type and creating a new comparator with every tuple
> even though switching here is not necessary since double and double are the
> same types.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)