You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "rubenada (via GitHub)" <gi...@apache.org> on 2023/06/05 13:59:26 UTC

[GitHub] [calcite] rubenada commented on a diff in pull request #3241: [CALCITE-5745] CONCAT2 function(enabled in Oracle library) gets wrong result when one of the argument is NULL

rubenada commented on code in PR #3241:
URL: https://github.com/apache/calcite/pull/3241#discussion_r1218117008


##########
core/src/test/resources/sql/functions.iq:
##########
@@ -549,4 +549,47 @@ limit 3;
 
 !ok
 
+# -----------------------------------------------------------------------------
+# [CALCITE-5745] CONCAT2 function(enabled in Oracle library) gets wrong result when one of the argument is NULL
+!use oraclefunc
+select concat('a', 'b');
++--------+
+| EXPR$0 |
++--------+
+| ab     |
++--------+
+(1 row)
+
+!ok
+
+select concat('a', null);
++--------+
+| EXPR$0 |
++--------+
+| a      |
++--------+
+(1 row)
+
+!ok
+
+select concat('a', cast(null as varchar));

Review Comment:
   Nitpick: for the sake of completeness, I think we should add also the test scenarios of `null` as first parameter, and `non-null` as second.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org