Skip to content

Commit

Permalink
Document ClickHouse connector type mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr committed Jan 17, 2022
1 parent 86dc730 commit d648bb7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/src/main/sphinx/connector/clickhouse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,29 @@ in create table statement. ``ReplicatedMergeTree`` engine is not yet supported.
Type mapping
------------

The data type mappings are as follows:

================= =============== ===================================================================================================
ClickHouse Trino Notes
================= =============== ===================================================================================================
``Int8`` ``TINYINT`` ``TINYINT``, ``BOOL``, ``BOOLEAN`` and ``INT1`` are aliases of ``Int8``
``Int16`` ``SMALLINT`` ``SMALLINT`` and ``INT2`` are aliases of ``Int16``
``Int32`` ``INTEGER`` ``INT``, ``INT4`` and ``INTEGER`` are aliases of ``Int32``
``Int64`` ``INTEGER`` ``BIGINT`` is an alias of ``Int64``
``Float32`` ``REAL`` ``FLOAT`` is an alias of ``Float32``
``Float64`` ``DOUBLE`` ``DOUBLE`` is an alias of ``Float64``
``Decimal`` ``DECIMAL``
``FixedString`` ``VARBINARY`` Enabling ``clickhouse.map-string-as-varchar`` config property changes the mapping to ``VARCHAR``
``String`` ``VARBINARY`` Enabling ``clickhouse.map-string-as-varchar`` config property changes the mapping to ``VARCHAR``
``Date`` ``DATE``
``DateTime`` ``TIMESTAMP``
``IPv4`` ``VARCHAR``
``IPv6`` ``VARCHAR``
``Enum8`` ``VARCHAR``
``Enum16`` ``VARCHAR``
``UUID`` ``UUID``
================= =============== ===================================================================================================

.. include:: jdbc-type-mapping.fragment

.. _clickhouse-pushdown:
Expand Down

0 comments on commit d648bb7

Please sign in to comment.