wenhuitang commented on a change in pull request #1862: [CALCITE-3864] Add 
Implementation for SqlLibraryOperators.CONCAT_FUNCTION in SqlFunctions and 
correct the return type inference of SqlLibraryOperators.CONCAT_FUNCTION
URL: https://github.com/apache/calcite/pull/1862#discussion_r397056132
 
 

 ##########
 File path: 
core/src/test/java/org/apache/calcite/sql/test/SqlOperatorBaseTest.java
 ##########
 @@ -2169,6 +2170,21 @@ protected static Calendar getCalendarNotTooNear(int 
timeUnit) {
         "VARCHAR(33335) NOT NULL");
     tester.checkNull("x'ff' || cast(null as varbinary)");
     tester.checkNull(" cast(null as ANY) || cast(null as ANY) ");
+    tester.checkString("cast('a' as varchar) || cast('b' as varchar) "
+        + "|| cast('c' as varchar)", "abc", "VARCHAR NOT NULL");
+
+    final SqlTester tester1 = tester(SqlLibrary.MYSQL);
+    final SqlTester tester2 = tester(SqlLibrary.POSTGRESQL);
+    final SqlTester tester3 = tester(SqlLibrary.ORACLE);
 
 Review comment:
   I don't think that it is a serious problem since concat function will be 
translated to || operator and it can work well for oracle. In a practical 
application scenario, we may use two SqlLibaray at a same time, if they have 
different concat function, ambiguity will be caused when check arguements, even 
we register oracle concat as a alias of SqlStdOperatorTable.CONCAT.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to