Oliver Lee created CALCITE-5557:
-----------------------------------

             Summary: Add SAFE_CAST (big BigQuery compatibility)
                 Key: CALCITE-5557
                 URL: https://issues.apache.org/jira/browse/CALCITE-5557
             Project: Calcite
          Issue Type: New Feature
            Reporter: Oliver Lee


Implement SAFE_CAST per BigQuery specifications
https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#safe_casting
 

Equivalent to CAST(), except it will return {{null}} instead of throwing an 
exception if the casting fails.


SAFE_CAST("1" as INT64) -> 1
SAFE_CAST("a" as INT64) -> null
SAFE_CAST("2022-12-12" as DATE) -> DATE('2022-12-12')



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

Reply via email to