You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Flink Jira Bot (Jira)" <ji...@apache.org> on 2022/07/28 22:38:00 UTC

[jira] [Updated] (FLINK-28234) Infinite or NaN exception for power(-1, 0.5)

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

Flink Jira Bot updated FLINK-28234:
-----------------------------------
    Labels: pull-request-available stale-assigned  (was: pull-request-available)

I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help the community manage its development. I see this issue is assigned but has not received an update in 30 days, so it has been labeled "stale-assigned".
If you are still working on the issue, please remove the label and add a comment updating the community on your progress.  If this issue is waiting on feedback, please consider this a reminder to the committer/reviewer. Flink is a very active project, and so we appreciate your patience.
If you are no longer working on the issue, please unassign yourself so someone else may work on it.


>  Infinite or NaN exception for power(-1, 0.5)
> ---------------------------------------------
>
>                 Key: FLINK-28234
>                 URL: https://issues.apache.org/jira/browse/FLINK-28234
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / Planner
>            Reporter: luoyuxia
>            Assignee: luoyuxia
>            Priority: Major
>              Labels: pull-request-available, stale-assigned
>             Fix For: 1.16.0
>
>
> When using the follwiing sql  , it will throw the "java.lang.NumberFormatException: Infinite or NaN"
>  
> {code:java}
> SELECT power(-1, 0.5) {code}
> It happen in ExpressionReducer, and power(-1, 0.5)  is NaN, which can't be used to construct BigDecimal, so the exception throws.
> But for the sql,
>  
> {code:java}
> create table src(key int);
> insert into src values (-1);
> SELECT power(key, 0.5) from src;{code}
>  
> it will run normally.
> I think we  should keep same behavror for these two case, instead of throw exception for one case, and run normally for another case.
>  
>  



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