[
https://issues.apache.org/jira/browse/CALCITE-6771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
xiaochen.zhou updated CALCITE-6771:
-----------------------------------
Description:
Since FLOAT type is not supported in Presto
According to the documentation:
[https://prestodb.io/docs/current/language/types.html#real]
!image-2025-01-09-06-24-40-939.png|width=307,height=209!
Using {{CAST(xxxx AS FLOAT)}} will result in an error:
```
{{SELECT CAST(message_count AS FLOAT) FROM
applydata_bigdata.kafka_topic_cluster_user_dept_month_one_day_msg_info }}
{{WHERE ymd = 20250105}}
{{```}}
!https://note3.oss-cn-hangzhou.aliyuncs.com/source/image-20250109061448068.png!
It should be converted to the REAL type instead.
> Convert Type from FLOAT to REAL in Presto Dialect
> -------------------------------------------------
>
> Key: CALCITE-6771
> URL: https://issues.apache.org/jira/browse/CALCITE-6771
> Project: Calcite
> Issue Type: Improvement
> Reporter: xiaochen.zhou
> Priority: Major
> Attachments: image-2025-01-09-06-24-40-939.png
>
>
> Since FLOAT type is not supported in Presto
> According to the documentation:
> [https://prestodb.io/docs/current/language/types.html#real]
> !image-2025-01-09-06-24-40-939.png|width=307,height=209!
> Using {{CAST(xxxx AS FLOAT)}} will result in an error:
> ```
> {{SELECT CAST(message_count AS FLOAT) FROM
> applydata_bigdata.kafka_topic_cluster_user_dept_month_one_day_msg_info }}
> {{WHERE ymd = 20250105}}
> {{```}}
> !https://note3.oss-cn-hangzhou.aliyuncs.com/source/image-20250109061448068.png!
> It should be converted to the REAL type instead.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)