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

ASF GitHub Bot commented on METRON-1461:
----------------------------------------

Github user nickwallen commented on the issue:

    https://github.com/apache/metron/pull/942
  
    The first point here is around semantics.  I am assuming the semantics of 
this would be a "max of maxes".  So if I have a list of stats objects, I 
compare the max of each one.  Whichever max is the greatest, that stats object 
gets returned.  The MIN function would just be a "min of mins".
    
    Does that match your use case?  Is this the right approach?
    
    Given those semantics, I think the 'Comparable' approach could work, but 
with a twist.  You can't just make the Stats objects Comparable.  Because how 
do you compare them?  By the average, median, min or max?  There is not one way 
to do it that is broadly applicable.
    
    The means of comparison for the MAX function should use the max of a stats 
object.  The means of comparison for the MIN function should use the min of the 
stats object. 
    
    One way is to create a class that wraps a Stats object and implements the 
Comparable interface.  In the case of MAX, the wrapper will compare using the 
max of the underlying stats object.  In the case of MIN function, the wrapper 
will compare using the min of the underlying stats object. 
    
    



> MIN MAX stellar function should take a stats or list object and return min/max
> ------------------------------------------------------------------------------
>
>                 Key: METRON-1461
>                 URL: https://issues.apache.org/jira/browse/METRON-1461
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Mohan
>            Assignee: Mohan
>            Priority: Minor
>
> Currently the MIN and MAX stellar function accepts only the list  as input 
> and the list may only contain objects that are mutually comparable / ordinal. 
> Modify the method to take a stats or list object and return min/max.
>  * [|https://hortonworks.jira.com/secure/AddComment!default.jspa?id=163485]



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

Reply via email to