[ 
https://issues.apache.org/jira/browse/CALCITE-5827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17742113#comment-17742113
 ] 

Tanner Clary edited comment on CALCITE-5827 at 7/11/23 5:28 PM:
----------------------------------------------------------------

[~julianhyde] I think they are fixed. All the tests I've written for these 
functions, NaN and Infinity have worked just fine as DOUBLE values. I'll add 
some tests specifically for those issues. I added some entries (and tests) to 
handle REAL because it wasn't working with my original fix. I will push these 
changes soon and you can see if you think it's enough to mark those linked 
cases as fixed.


was (Author: JIRAUSER298151):
I think they are fixed. All the tests I've written for these functions, NaN and 
Infinity have worked just fine as DOUBLE values. I'll add some tests 
specifically for those issues. I added some entries (and tests) to handle REAL 
because it wasn't working with my original fix. I will push these changes soon 
and you can see if you think it's enough to mark those linked cases as fixed.

> Add IS_INF and IS_NAN functions (enabled in BigQuery library)
> -------------------------------------------------------------
>
>                 Key: CALCITE-5827
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5827
>             Project: Calcite
>          Issue Type: New Feature
>            Reporter: Tanner Clary
>            Assignee: Tanner Clary
>            Priority: Major
>              Labels: pull-request-available
>
> BigQuery offers the 
> [IS_INF|https://cloud.google.com/bigquery/docs/reference/standard-sql/mathematical_functions#is_inf]
>  and 
> [IS_NAN|https://cloud.google.com/bigquery/docs/reference/standard-sql/mathematical_functions#is_nan]
>  functions. The first returns whether the specified value is infinite, the 
> second returns whether the specified value is {{NaN}}.
> Example 1: {{SELECT IS_INF(3)}} would return {{FALSE}}.
> Example 2: {{SELECT IS_INF(CAST('Infinity` AS DOUBLE))}} would return 
> {{TRUE}}.
> Example 3: {{SELECT IS_NAN(3)}} would return {{FALSE}}.
> Example 4: {{SELECT IS_INF(CAST('NaN' AS DOUBLE))}} would return {{TRUE}}.



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

Reply via email to