FearfulTomcat27 opened a new pull request, #16545: URL: https://github.com/apache/iotdb/pull/16545
This pull request introduces the new `percentile` aggregation function to the IoTDB relational query engine, providing support for calculating percentiles over numeric columns. The changes include the implementation of the core percentile calculation logic, integration into the accumulator factory, and comprehensive tests for both correct behavior and error handling. **Percentile Aggregation Support** * Added `PercentileAccumulator` and supporting `Percentile` class to implement percentile calculations for numeric types (`INT32`, `INT64`, `FLOAT`, `DOUBLE`, `TIMESTAMP`). [[1]](diffhunk://#diff-d5ce447da68119b3e78aab3d85a6c53bb6fef21a541e498068a1715b098f65a5R1-R226) [[2]](diffhunk://#diff-0608bfc07c93e9bb451375138e6dbcf8d582c933fa20156c48ff4aaf76f9a655R1-R164) * Integrated the new percentile accumulator into the `AccumulatorFactory`, enabling both grouped and non-grouped percentile aggregations. [[1]](diffhunk://#diff-a72623b1eb8bac3f674e3b12529635a4ebd66a0c5763e40878249d13bd6e6068R48) [[2]](diffhunk://#diff-a72623b1eb8bac3f674e3b12529635a4ebd66a0c5763e40878249d13bd6e6068R287-R288) [[3]](diffhunk://#diff-a72623b1eb8bac3f674e3b12529635a4ebd66a0c5763e40878249d13bd6e6068R373-R374) **Testing and Validation** * Added new integration tests to `IoTDBTableAggregationIT.java` for verifying percentile queries and their results, including grouped queries. * Extended exception tests to cover invalid usages of the `percentile` function, such as wrong argument count, invalid percentage values, and unsupported data types. -- 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]
