amrishlal commented on issue #6707:
URL: 
https://github.com/apache/incubator-pinot/issues/6707#issuecomment-812247390


   Looks useful, but we would probably need to hash out the edge cases and put 
it in a generic form. For example:
      `SELECT id AS myid, EXPR_MAX(timestamp, *) AS mydata FROM Foo GROUP BY id`
   in case of scalar or aggregate function "AS" will rename the projected 
column. We would need to hash out how AS will work in this case (and how it may 
feed into a higher-level query from a subquery using this function).
   
   This will work well for MAX and MIN, but if we consider SUM or AVG etc, then 
we can have something like:
      `SELECT id, EXPR_SUM(account_balance, name, email, *) FROM Foo GROUP BY 
id`
   In this case, the first value of the output is the sum of the group, but how 
would the value of "name", and "email" be set?
   
   It looks somewhat similar to a "Table Function", which are mainly used in 
the FROM clause:
       SELECT name, max(b) FROM mytransform(mytable) as X GROUP BY X.name;
   


-- 
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]

Reply via email to