dylanhz opened a new pull request, #25291:
URL: https://github.com/apache/flink/pull/25291

   ## What is the purpose of the change
   
   Add the built-in function PERCENTILE.
   Examples:
   ```SQL
   > SELECT PERCENTILE(col, 0.3) FROM VALUES (0), (10), (10) AS tab(col);
    6.0
   
   > SELECT PERCENTILE(col, 0.3, freq) FROM VALUES (0, 1), (10, 2) AS tab(col, 
freq);
    6.0
   
   > SELECT PERCENTILE(col, array(0.25, 0.75)) FROM VALUES (0), (10) AS 
tab(col);
    [2.5,7.5]
   ```
   
   ## Brief change log
   
   - Add `ArgumentTypeStrategy` for percentage (array) value with literal value 
checking
   - Support validation error test for built-in agg functions
   - Support creating `AggregateInfo` through `BuiltInFunctionDefinition` 
directly to avoid an extra `SqlAggFunction` conversion
   - [FLINK-36123](https://issues.apache.org/jira/browse/FLINK-36123)
   
   ## Verifying this change
   
   For the two `ArgumentTypestrategy`: `InputTypeStrategiesTest`
   
   For the `PercentileTypestrategy`: `TypeStrategiesTest`
   
   For the function PERCENTILE:
   - `PercentileAggFunctionITCase`,
   - `WindowAggregateITCase#testPercentileOnEventTimeTumbleWindow()`
   - `sql/AggregateITCase#testSinglePercentile()`, 
`sql/AggregateITCase#testMultiPercentile()`
   - `table/AggregateITCase#testSinglePercentile()`, 
`table/AggregateITCase#testMultiPercentile()`
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (yes)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes)
     - If yes, how is the feature documented? (docs)
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to