v.20.1New Feature

Add bankerRound function for banker's rounding

Add function bankerRound which performs banker's rounding. #8112 (hcz)
Introduces the bankerRound function to perform banker's rounding in ClickHouse.

Why it matters

Banker's rounding (also known as round half to even) provides a statistically unbiased rounding method, reducing cumulative rounding errors compared to traditional rounding. This is especially useful in financial and statistical calculations to improve accuracy.

How to use it

Use the bankerRound function in your SQL queries to round numbers following banker's rounding rules. For example:

SELECT bankerRound(your_column) FROM your_table;