Caican Cai created CALCITE-6279:
-----------------------------------

             Summary: 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
             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)

Reply via email to