From efa6fb72bf4c790450d00a926d7bd809dade5902 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Wed, 3 Jul 2024 08:34:16 -0400 Subject: [PATCH] fix(clickhouse): support `Date32` database type (#9509) Add missing support for ClickHouse Date32 type. --- ibis/backends/clickhouse/tests/test_datatypes.py | 1 + ibis/backends/sql/datatypes.py | 1 + 2 files changed, 2 insertions(+) diff --git a/ibis/backends/clickhouse/tests/test_datatypes.py b/ibis/backends/clickhouse/tests/test_datatypes.py index 103f32aa64d6..3319128b9f72 100644 --- a/ibis/backends/clickhouse/tests/test_datatypes.py +++ b/ibis/backends/clickhouse/tests/test_datatypes.py @@ -244,6 +244,7 @@ def test_array_discovery_clickhouse(con): ), id="nested", ), + param("Date32", dt.Date(nullable=False), id="date32"), param("DateTime", dt.Timestamp(scale=0, nullable=False), id="datetime"), param( "DateTime('Europe/Budapest')", diff --git a/ibis/backends/sql/datatypes.py b/ibis/backends/sql/datatypes.py index 30932a65ffbb..432642fa1060 100644 --- a/ibis/backends/sql/datatypes.py +++ b/ibis/backends/sql/datatypes.py @@ -20,6 +20,7 @@ typecode.BOOLEAN: dt.Boolean, typecode.CHAR: dt.String, typecode.DATE: dt.Date, + typecode.DATE32: dt.Date, typecode.DOUBLE: dt.Float64, typecode.ENUM: dt.String, typecode.ENUM8: dt.String,