[ https://issues.apache.org/jira/browse/CALCITE-6279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17820166#comment-17820166 ]
Julian Hyde commented on CALCITE-6279: -------------------------------------- Also, do not talk about what Java does. Calcite users do not care what language it is implemented in. Distinguishing specification from implementation is a key skill for an engineer. > Use Null to replace the results of some Math functions that return NaN. > ----------------------------------------------------------------------- > > Key: CALCITE-6279 > URL: https://issues.apache.org/jira/browse/CALCITE-6279 > Project: Calcite > Issue Type: Improvement > Components: core > Affects Versions: 1.36.0 > Reporter: Caican Cai > Priority: Minor > Fix For: 1.37.0 > > > Among Calcite's Math functions, there are some functions that return double > types. They are calculated using Java's Math method in SqlFunctions, so when > the result is empty, NaN will be returned, but according to SQL rules, NULL > should be returned. > e.g > {code:java} > f.checkScalarApprox("sqrt(-1)", "DOUBLE NOT NULL", > "NaN"); {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)