You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Caican Cai (Jira)" <ji...@apache.org> on 2024/02/23 17:06:00 UTC
[jira] [Created] (CALCITE-6279) Use Null to replace the results of some Math functions that return NaN.
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)