[ 
https://issues.apache.org/jira/browse/CALCITE-6149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17804500#comment-17804500
 ] 

Mihai Budiu commented on CALCITE-6149:
--------------------------------------

Fixed by commit 
https://github.com/apache/calcite/commit/7b97c4e4581094cc405d0f0fa4c16f462ef1166d

> ClickHouseSqlDialect should support cast to Nullable
> ----------------------------------------------------
>
>                 Key: CALCITE-6149
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6149
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.36.0
>            Reporter: ChenLuyang
>            Priority: Minor
>              Labels: dialect, pull-request-available
>             Fix For: 1.37.0
>
>
> In ClickHouse, there is an issue with RelDataType of Nullable type when 
> casting to a non-Nullable type. For example, {{SELECT CAST(NULL, 'Int32')}} 
> will throw an error. In such cases, we should use {{SELECT CAST(NULL, 
> 'Nullable(Int32)')}} instead.
>  
> related error messages.
> DB::Exception: Cannot convert NULL value to non-Nullable type



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to