v.21.9New Feature
Add Date32 Datatype and toDate32 Function to ClickHouse
Add a new datatypeDate32(store data as Int32), support date range same withDateTime64support load parquet date32 to ClickHouseDate32Add new functiontoDate32liketoDate. #25774 (LiuNeng).
Why it matters
TheDate32 data type addresses the limitation of the existing Date type by enabling storage of dates with a larger range, allowing for easier handling of dates outside the standard Date range. This is particularly valuable for users importing data from formats like Parquet with date32 fields. It enhances compatibility and flexibility in date processing within ClickHouse.How to use it
Users can create table columns with theDate32 type directly, and convert values to this type using the new function toDate32, similar to how toDate is used. Parquet files containing date32 fields can now be loaded natively into ClickHouse Date32 columns.