Skip to content

Commit

Permalink
[CALCITE-6572] Add more tests for NULL arguments to TO_CHAR functions
Browse files Browse the repository at this point in the history
* Added a test for first argument NULL without a cast
* Added a test for both arguments NULL without a cast
  • Loading branch information
normanj-bitquill committed Sep 13, 2024
1 parent 890f9ad commit 279e37a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4893,7 +4893,8 @@ void testBitGetFunc(SqlOperatorFixture f, String functionName) {
f.checkNull("to_char(timestamp '2022-06-03 12:15:48.678', NULL)");
f.checkNull("to_char(cast(NULL as timestamp), NULL)");
f.checkNull("to_char(cast(NULL as timestamp), 'Day')");
};
f.checkNull("to_char(NULL, 'Day')");
f.checkNull("to_char(NULL, NULL)"); };
final List<SqlLibrary> libraries =
list(SqlLibrary.MYSQL, SqlLibrary.ORACLE, SqlLibrary.REDSHIFT);
f0.forEachLibrary(libraries, consumer);
Expand Down Expand Up @@ -5161,6 +5162,8 @@ void testBitGetFunc(SqlOperatorFixture f, String functionName) {
f.checkNull("to_char(timestamp '2022-06-03 12:15:48.678', NULL)");
f.checkNull("to_char(cast(NULL as timestamp), NULL)");
f.checkNull("to_char(cast(NULL as timestamp), 'Day')");
f.checkNull("to_char(NULL, 'Day')");
f.checkNull("to_char(NULL, NULL)");
} finally {
Locale.setDefault(originalLocale);
}
Expand Down

0 comments on commit 279e37a

Please sign in to comment.