drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandre Beche (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (DRILL-67) Add Min, Max, avg and others Aggregated function
Date Fri, 07 Jun 2013 07:48:19 GMT

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

Alexandre Beche edited comment on DRILL-67 at 6/7/13 7:46 AM:
--------------------------------------------------------------

Modified version of the patch including ben's comments.

Thanks a lot for your comments here the modification I did:
For min and max you suggest in the eval function to return:
return l > d ? new ScalarValues.LongScalar(l) : new ScalarValues.DoubleScalar(d);

Which can't work, l and d being setup to the constant MAX_VALUE, I put the following condition
instead:
(inputHasFloat) ? new ScalarValues.DoubleScalar(d) : new ScalarValues.LongScalar(l);

Does it makes sence?

Regarding the average function, I always get the input value as Double to keep the precision
in the division.

Thanks a lot for your feedback.
Cheers,
Alex



                
      was (Author: alexandre beche):
    Modified version of the patch including ben's comments
                  
> Add Min, Max, avg and others Aggregated function
> ------------------------------------------------
>
>                 Key: DRILL-67
>                 URL: https://issues.apache.org/jira/browse/DRILL-67
>             Project: Apache Drill
>          Issue Type: Improvement
>            Reporter: Alexandre Beche
>            Priority: Trivial
>              Labels: patch
>         Attachments: DRILL-67.patch.txt, DRILL-70-1.patch.txt, DRILL-70-feedback.diff,
DRILL-70.patch.txt
>
>
> This proposed improvement is to add the MIN(), MAX() and AVG() function to the list of
the aggregated function.
> SumAggregator will be used as an example.
> Others function could be added

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message