[
https://issues.apache.org/jira/browse/CALCITE-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17881124#comment-17881124
]
Julian Hyde edited comment on CALCITE-6572 at 9/13/24 12:45 AM:
----------------------------------------------------------------
There are quite a few tests in
[SqlOperatorTest|https://github.com/apache/calcite/blob/890f9adb4b9fa99e4cca144997c7392acc52389b/testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java#L4909].
I'll add another test for when the first argument is *NULL* without a cast.
was (Author: njordan):
There are quite a few tests here.
[https://github.com/apache/calcite/blob/main/testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java#L4909]
I'll add another test for when the first argument is *NULL* without a cast.
> Add more tests for NULL arguments to TO_CHAR functions
> ------------------------------------------------------
>
> Key: CALCITE-6572
> URL: https://issues.apache.org/jira/browse/CALCITE-6572
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.37.0
> Reporter: Claude Brisson
> Assignee: Norman Jordan
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.38.0
>
>
> When the argument to the {{TO_CHAR(<date or timestamp>, <format>)}} function
> is nullable, the return type should be nullable, because a NULL value to
> either argument will return a NULL result. But currently the type is derived
> as NOT NULL.
> *Update*: The type derivation was solved in CALCITE-6358, but there are still
> no unit tests. The remaining task is to add tests for both the TO_CHAR
> function in the Oracle/Redshift/MySQL libraries and the TO_CHAR function in
> the Postgres library.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)