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

Tanner Clary commented on CALCITE-5766:
---------------------------------------

[~julianhyde] Your point still remains either way, I'll do some more research 
and add more overflow checks/tests.

> Implement SAFE_NEGATE function (enabled for BigQuery)
> -----------------------------------------------------
>
>                 Key: CALCITE-5766
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5766
>             Project: Calcite
>          Issue Type: Sub-task
>            Reporter: Tanner Clary
>            Assignee: Tanner Clary
>            Priority: Major
>              Labels: pull-request-available
>
> Add support for SAFE_NEGATE in BigQuery.
> SAFE_NEGATE: Equivalent to the unary minus operator (-), but returns NULL if 
> overflow occurs.
> Example #1: {{SELECT SAFE_NEGATE(3)}} would return {{-3}}.
> Example #2: {{SELECT SAFE_NEGATE(-9223372036854775808)}} would return 
> {{NULL}} because of overflow.



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

Reply via email to