You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Martijn Visser (Jira)" <ji...@apache.org> on 2022/11/30 13:03:00 UTC

[jira] [Comment Edited] (FLINK-30221) Fix the bug of sum(try_cast(string as bigint)) return null when partial elements can't convert to bigint

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

Martijn Visser edited comment on FLINK-30221 at 11/30/22 1:02 PM:
------------------------------------------------------------------

[~lsy] No, the result should not be 12 from your example. From the documentation example it even states {{TRY_CAST(’non-number’ AS INT) returns NULL}}. This is intended behaviour. Failure in this TRY_CAST should result in the returning of a NULL value. 


was (Author: martijnvisser):
[~lsy] No, the result should not be 12 from your example. From the documentation example it even states {{TRY_CAST(’non-number’ AS INT) returns NULL}}. This is intended behaviour. Any failure in a TRY_CAST should result in the returning of a NULL value. 

> Fix the bug of sum(try_cast(string as bigint)) return null when partial elements can't convert to bigint
> --------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-30221
>                 URL: https://issues.apache.org/jira/browse/FLINK-30221
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / API, Table SQL / Runtime
>    Affects Versions: 1.17.0
>            Reporter: dalongliu
>            Priority: Major
>




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