You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "sadfdddd (Jira)" <ji...@apache.org> on 2020/12/05 10:19:00 UTC

[jira] [Updated] (FLINK-20471) flink1.10SQL Precision overflow return null when using decimal

     [ https://issues.apache.org/jira/browse/FLINK-20471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

sadfdddd updated FLINK-20471:
-----------------------------
    Description: 
h2. flink1.10SQL Precision overflow return null when using decimal

this is my code

!image-2020-12-03-21-47-31-755.png|width=835,height=435!

!image-2020-12-03-21-48-44-901.png!

The calculation result is null

Dubug discovery

{color:#de350b}in codegen code this method is called{color}

!image-2020-12-03-21-49-40-529.png!

{color:#de350b}in this method{color}

!image-2020-12-03-21-50-11-117.png!

will get a 39 precision decimal result,  

So null is returned

My idea of modification is to cut the precision here or provide the configuration entry of precision

Maybe you can consider assigning it to me to fix it

 

  was:
h2. *在使用flink1.10sql发现decimal精度溢出返回null的问题*

这是我的代码

!image-2020-12-03-21-47-31-755.png|width=835,height=435!

!image-2020-12-03-21-48-44-901.png!

计算结果为null

{color:#de350b}定位源码发现{color}

{color:#de350b}codegen的代码中调用了{color}

!image-2020-12-03-21-49-40-529.png!

{color:#de350b}其中这个方法{color}

!image-2020-12-03-21-50-11-117.png!

会出现得到一个39位的溢出就会直接返回null,导致计算结果错误为null

我的思路是在此截断精度,或者能提供精度的配置入口

可以考虑指派给我修复这个问题

 

        Summary: flink1.10SQL Precision overflow return null when using decimal  (was: flink1.10SQL中decimal精度溢出返回null的问题)

> flink1.10SQL Precision overflow return null when using decimal
> --------------------------------------------------------------
>
>                 Key: FLINK-20471
>                 URL: https://issues.apache.org/jira/browse/FLINK-20471
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / API, Table SQL / Runtime
>    Affects Versions: 1.10.1
>            Reporter: sadfdddd
>            Priority: Major
>         Attachments: image-2020-12-03-21-47-31-755.png, image-2020-12-03-21-48-44-901.png, image-2020-12-03-21-49-40-529.png, image-2020-12-03-21-50-11-117.png
>
>
> h2. flink1.10SQL Precision overflow return null when using decimal
> this is my code
> !image-2020-12-03-21-47-31-755.png|width=835,height=435!
> !image-2020-12-03-21-48-44-901.png!
> The calculation result is null
> Dubug discovery
> {color:#de350b}in codegen code this method is called{color}
> !image-2020-12-03-21-49-40-529.png!
> {color:#de350b}in this method{color}
> !image-2020-12-03-21-50-11-117.png!
> will get a 39 precision decimal result,  
> So null is returned
> My idea of modification is to cut the precision here or provide the configuration entry of precision
> Maybe you can consider assigning it to me to fix it
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)