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

Julian Hyde commented on CALCITE-5827:
--------------------------------------

We can't mark this 'done' until infinity and NaN are supported DOUBLE values. 
Can you investigate related cases CALCITE-2067 and CALCITE-4589? Maybe they are 
fixed. If so, please add test cases for them to the PR.

If you pass a REAL (32-bit floating point) value to these functions, the result 
should be the same as for a 64 bit infinity or nan. Add tests accordingly.

> 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