You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/05/13 18:08:00 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16838768#comment-16838768 ] 

ASF subversion and git services commented on ASTERIXDB-2564:
------------------------------------------------------------

Commit d088dacbfd7601e41ff2cf4b0ed96cdefa3363fd in asterixdb's branch refs/heads/master from Ali Alsuliman
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=d088dac ]

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

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
During min() and max() aggregation, the functions keep track of
the aggregation type in order to handle heterogeneous  lists.
It promotes the aggregation type if needed (e.g. encountered double).
Don't switch to new aggregation type and create a new comparator
when the new input value type is the same as the previously
aggregated values. That is because canPromote(agg_type, new_val_type)
will always return true for same types.

Change-Id: I0bb9f0715985ae555de00bbf3173c80371d8968b
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3391
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Dmitry Lychagin <dm...@couchbase.com>


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