v.22.11New Feature

Add ascii function similar to Apache Spark in ClickHouse

Add function ascii like in Apache Spark: https://spark.apache.org/docs/latest/api/sql/#ascii. #42670 (李扬).
Added the ascii function in ClickHouse, similar to the function available in Apache Spark.

Why it matters

The ascii function returns the ASCII code of the leftmost character of a given string, enabling easy extraction of character codes for data processing and analysis, similar to functionality available in Apache Spark SQL.

How to use it

Use the ascii function by passing a string expression as its argument. For example:

SELECT ascii('A');

This will return the ASCII code of the character 'A'.