[ https://issues.apache.org/jira/browse/FLINK-28234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17558298#comment-17558298 ]
luoyuxia commented on FLINK-28234: ---------------------------------- I will fix 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 > Priority: Major > 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.7#820007)