[ 
https://issues.apache.org/jira/browse/CALCITE-6035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oliver Lee updated CALCITE-6035:
--------------------------------
    Description: 
In Big Query SQL, the {{percentile_cont}} 
[function|https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#percentile_cont]
 uses the keyword {{OVER}} instead of WITHIN GROUP. 

This is not to be confused with ISO SQL OVER, which is used in windowed 
aggregate functions. (percentile_cont is not a window function) 

 

Requirements: 

{{select percentile_cont(0.5) within group (order by x)}}  in ISO SQL should be 
unparsed as {{select percentile_cont(0.5) over (order by x)}} if the target 
dialect is Big Query

  was:
In Big Query SQL, the {{percentile_cont}} 
[function|https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#percentile_cont]
 uses the keyword {{OVER}} instead of WITHIN GROUP. 

This is not to be confused with ISO SQL OVER, which is used in windowed 
aggregate functions. (percentile_cont is not a window function) 

 

Requirements: 

{{select percentile_cont(0.5) within group (order by x)}}  in ISO SQL should be 
unparsed as {{select percentile_cont(0.5) over (order by x)}} in Big Query SQL


> Correctly unparse WITHIN GROUP for Big Query dialect
> ----------------------------------------------------
>
>                 Key: CALCITE-6035
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6035
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Oliver Lee
>            Assignee: Oliver Lee
>            Priority: Major
>
> In Big Query SQL, the {{percentile_cont}} 
> [function|https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#percentile_cont]
>  uses the keyword {{OVER}} instead of WITHIN GROUP. 
> This is not to be confused with ISO SQL OVER, which is used in windowed 
> aggregate functions. (percentile_cont is not a window function) 
>  
> Requirements: 
> {{select percentile_cont(0.5) within group (order by x)}}  in ISO SQL should 
> be unparsed as {{select percentile_cont(0.5) over (order by x)}} if the 
> target dialect is Big Query



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

Reply via email to