You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Ali Alsuliman (JIRA)" <ji...@apache.org> on 2019/05/15 08:23:00 UTC

[jira] [Resolved] (ASTERIXDB-2564) Too many objects created in min() and max()

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