v.21.6New Feature

Add Postgres-like cast operator (::) for type conversion

Add Postgres-like cast operator (::). E.g.: [1, 2]::Array(UInt8), 0.1::Decimal(4, 4), number::UInt16. #23871 (Anton Popov).
Introduces a Postgres-like cast operator :: in ClickHouse for concise type casting expressions.

Why it matters

This feature provides a more familiar and succinct syntax for type casting in ClickHouse queries, improving readability and easing the transition for users coming from PostgreSQL or similar databases.

How to use it

Use the :: operator to cast expressions to a desired type. For example:

[1, 2]::Array(UInt8)
0.1::Decimal(4, 4)
number::UInt16