siddharthteotia opened a new issue #6707: URL: https://github.com/apache/incubator-pinot/issues/6707
Naming can be discussed but here is what the functions should do An aggregation only query will return exactly one row and one column as the output of the aggregation function. So for example, we can do sum/min/max on a column and get the sum/min/max computed over the column values. When aggregations are used with GROUP BY, the output rows are going to contain GROUP BY columns along with 0 or more aggregation columns. However, there is currently no way to do the aggregation over one column by doing the computation min/max over the column values and return another column value corresponding to the minimum/maximum value in the aggregation column. Examples - For each unique member, return all columns where timestamp is maximum -- SELECT id, EXPR_MAX(timestamp, *) FROM Foo GROUP BY id. MAX will be done over timestamp column but all columns will be returned - For each unique product, find the cheapest supplier -- SELECT product, EXPR_MIN(price, supplier) FROM Foo GROUP BY product. MIN will be done over price column but supplier column will be returned along with product group by column Function will take two arguments - Name of column to minimize/maximize just like we do today with MIN() and MAX() - Names of column(s) (could be *) to return corresponding to minimized/maximized value -- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
