[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16862213#comment-16862213
 ] 

Ali Alsuliman commented on ASTERIXDB-2574:
------------------------------------------

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

COMP] Fix min/max functions with group by
 - user model changes: no
 - storage format changes: no
 - interface changes: no

Details:
In a sort-group-by operator, an aggregate function has a merging
aggregate function that will be used when merging the run files
if they were generated. The merging aggregate function of the local
min/max aggregate function should be different from the merging
aggregate function of the global min/max. For local min/max, the
merging aggregate function should propagate system_null if the
aggregation is system_null. Also, the global min/max should handle
finishPartial() different from finish(). finishPartial()
should not output NULL if the aggregation is system_null since the
aggregation is still going on.
 - added functions to be intermediate steps for local aggregation.
 - implemented logic for finishPartial()
 - added test cases for strict_min/max with group by

Change-Id: Ie0551b091b9adbbbd51158dbd36124a7184bdce0
Reviewed-on: [https://asterix-gerrit.ics.uci.edu/3434]
Contrib: Jenkins <[email protected]>
Sonar-Qube: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: Ali Alsuliman <[email protected]>
Reviewed-by: Dmitry Lychagin <[email protected]>

> Inconsistency in min() and max() with respect to arrays/records
> ---------------------------------------------------------------
>
>                 Key: ASTERIXDB-2574
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2574
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: FUN - Functions
>    Affects Versions: 0.9.4.1
>            Reporter: Ali Alsuliman
>            Assignee: Ali Alsuliman
>            Priority: Major
>
> min() and max() functions used on record/array fields sometimes throw an 
> exception and other times process input. That's because if the field type is 
> known the compiler will validate and check the field is numeric, string or 
> datetime. If the field type is not known (ANY), it would pass and the 
> function runtime would process the input data.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to