richardstartin commented on issue #8084:
URL: https://github.com/apache/pinot/issues/8084#issuecomment-1024272235


   > Pinot has two different `min` functions. There's the aggregation function 
that you mention, but there is also a scalar function defined here - 
https://github.com/apache/pinot/blob/master/pinot-common/src/main/java/org/apache/pinot/common/function/scalar/ArithmeticFunctions.java#L57
   > 
   > ```
   >   @ScalarFunction
   >   public static double min(double a, double b) {
   >     return Double.min(a, b);
   >   }
   > 
   >   @ScalarFunction
   >   public static double max(double a, double b) {
   >     return Double.max(a, b);
   >   }
   > ```
   > 
   > So I wanted to call this `min` function in my query, but it calls the 
other one. So is your suggestion that the scalar functions should have 
different names?
   
   I’m aware of the scalar arithmetic functions. In SQL this function, which 
operates on tuples, not sets, is called least, not min. min is an aggregation 
over a set. I experimented with adding least and greatest scalar functions, and 
it works, but I would prefer to implement this as a TransformFunction for 
efficiency reasons (vectorisation).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to