Tanner Clary created CALCITE-6196:
-------------------------------------

             Summary: Remove OVER requirement for BigQuery PERCENTILE_CONT/DISC
                 Key: CALCITE-6196
                 URL: https://issues.apache.org/jira/browse/CALCITE-6196
             Project: Calcite
          Issue Type: Improvement
            Reporter: Tanner Clary
            Assignee: Tanner Clary


When I added parsing/validation for PERCENTILE_CONT/DISC in CALCITE-5564, I 
required an {{OVER}} clause to be used, because this is what BigQuery currently 
allows. However I think it would be nice if Calcite extended what these 
functions are capable of by allowing them as either window functions *or* 
aggregate functions.

The change itself would be simple enough, I have a draft commit I can put up 
after this.

As an example, the below query is current invalid (because it is missing an 
OVER()), but would be valid after my change.

{{SELECT PERCENTILE_CONT(age, .5) FROM users}} (this would return a single row 
instead of a row for each row in the table.)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to