You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Yu Xu (Jira)" <ji...@apache.org> on 2025/04/01 06:09:00 UTC
[jira] [Commented] (CALCITE-6926) ClickHouse Float type should not be converted to Double type
[ https://issues.apache.org/jira/browse/CALCITE-6926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17939921#comment-17939921 ]
Yu Xu commented on CALCITE-6926:
--------------------------------
[~mbudiu] Hi, thanks for your reply, the method getCastSpec is cast from Calcite Dialect to ClickHouse Dialect, it can would transform float and double both to doulbe which is not suitable,so the related PR fix it (according actual ClickHouse usage) with Float to Float32 and Double to Float64, this changes could be refer to :
* {{Float32}} — {{{}float{}}}.
* {{Float64}} — {{{}double{}}}.
> ClickHouse Float type should not be converted to Double type
> ------------------------------------------------------------
>
> Key: CALCITE-6926
> URL: https://issues.apache.org/jira/browse/CALCITE-6926
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.39.0
> Reporter: Yu Xu
> Assignee: Yu Xu
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.40.0
>
>
> In ClickHouse float should to be Float32, double to be Float64, this can refer to document:
> [https://clickhouse.com/docs/sql-reference/data-types/float]
>
> The equivalent types in ClickHouse and in C are given below:
> * {{Float32}} — {{{}float{}}}.
> * {{Float64}} — {{{}double{}}}.
>
> Float types in ClickHouse have the following aliases:
> * {{Float32}} — {{{}FLOAT{}}}, {{{}REAL{}}}, {{{}SINGLE{}}}.
> * {{Float64}} — {{{}DOUBLE{}}}, {{{}DOUBLE PRECISION{}}}.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)