[
https://issues.apache.org/jira/browse/CALCITE-5564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17753029#comment-17753029
]
Ran Tao commented on CALCITE-5564:
----------------------------------
[~tanclary] hi, tanner, what do you think about PERCENTILE_CONT/PERCENTILE_DISC
to be NonReservedKeywords in CALCITE-5564 in your patch or you did it on
purpose? (I have checked it, PERCENTILE_CONT/PERCENTILE_DISC are reserved
keywords from sql-2008)
If it's wrong, I will open a ticket to solve it, and then can fix CALCITE-5909.
> Add parsing and validation for PERCENTILE_CONT/PERCENTILE_DISC functions
> (enabled in BigQuery)
> ----------------------------------------------------------------------------------------------
>
> Key: CALCITE-5564
> URL: https://issues.apache.org/jira/browse/CALCITE-5564
> Project: Calcite
> Issue Type: Improvement
> Reporter: Tanner Clary
> Assignee: Tanner Clary
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.35.0
>
>
> Calcite currently has implementations for the {{PERCENTILE_CONT}} and
> {{PERCENTILE_DISC}} functions. Their syntax may be found
> [here|https://learn.microsoft.com/en-us/sql/t-sql/functions/percentile-cont-transact-sql?view=sql-server-ver16].
>
> BigQuery offers these functions as well, but the syntax is slightly
> different, and may be found
> [here|https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#percentile_cont].
> The main difference is that instead of using a {{WITHIN GROUP}} clause, the
> array is passed in directly as the first argument to the function.
> BigQuery Syntax Example: {{SELECT PERCENTILE_CONT(x, .5) OVER() FROM
> UNNEST([1,2,3,4]) as x;}} would return the median, 2.5.
> Standard Syntax Example: {{SELECT PERCENTILE_CONT(.5) WITHIN GROUP (ORDER BY
> [some column])}}
> Parsing and validation for the standard functions was added in CALCITE-4644.
> The actual implementation for both the standard and BigQuery forms is covered
> under CALCITE-4666.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)