Github user JamesRTaylor commented on the pull request:

    https://github.com/apache/incubator-phoenix/pull/30#issuecomment-44477648
  
    I did a bit more research on first_value, last_value, and nth_value and it 
turns out they're not aggregate functions - they're only valid for non 
aggregate queries. They also use a slightly different syntax - FIRST_VALUE(col) 
OVER (ORDER BY other_col).
    
    So these functions in this pull *are* aggregate functions and there's no 
standard SQL equivalent I can find. Some SQL dialects that have a FIRST and 
LAST function - maybe we should rename these as FIRST,LAST,NTH? Or perhaps it's 
ok to keep as-is since it's using the WITHIN GROUP syntax which would be 
different for the analytics version of these with the same name.
    
    Any opinions?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to