ILuffZhe commented on code in PR #4431:
URL: https://github.com/apache/calcite/pull/4431#discussion_r2161485838


##########
site/_docs/reference.md:
##########
@@ -2832,7 +2832,8 @@ In the following:
 | b | CODE_POINTS_TO_BYTES(integers)                 | Converts *integers*, an 
array of integers between 0 and 255 inclusive, into bytes; throws error if any 
element is out of range
 | b | CODE_POINTS_TO_STRING(integers)                | Converts *integers*, an 
array of integers between 0 and 0xD7FF or between 0xE000 and 0x10FFFF 
inclusive, into string; throws error if any element is out of range
 | o r | CONCAT(string, string)                       | Concatenates two 
strings, returns null only when both string arguments are null, otherwise 
treats null as empty string
-| b m | CONCAT(string [, string ]*)                  | Concatenates one or 
more strings, returns null if any of the arguments is null
+| b | CONCAT(string [, string ]*)                    | Concatenates one or 
more strings, returns null if any of the arguments is null
+| m | CONCAT(any [, any ]*)                          | Concatenates one or 
more strings/bytestrings/..., if arguments contains bytestring would return 
bytes string and returns null if any of the arguments is null

Review Comment:
   Except string and bytestring, what else is supported? If not, maybe you 
should remove ... .
   How about "returns null if any of the arguments is null, and returns bytes 
string if any of the arguments is a bytestring"



##########
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java:
##########
@@ -1200,6 +1200,21 @@ static RelDataType deriveTypeSplit(SqlOperatorBinding 
operatorBinding,
           SqlFunctionCategory.STRING)
           .withOperandTypeInference(InferTypes.RETURN_TYPE);
 
+  /** The "CONCAT(arg, ...)" function that concatenates arguments.
+   * For example, "CONCAT('a', 'bc', 'd')" returns "abcd",
+   * "CONCAT(x'61', 'a')" returns "0x6161".
+   *
+   * <p>It accepts at least 1 argument and returns null if any of
+   * the arguments is null, if arguments contain bytestring, would return 
bytes string. */

Review Comment:
   how about "... is null, and returns bytes string if any of the arguments is 
a bytestring"



##########
core/src/main/java/org/apache/calcite/util/BuiltInMethod.java:
##########
@@ -523,6 +523,7 @@ public enum BuiltInMethod {
   PARSE_URL3(SqlFunctions.ParseUrlFunction.class, "parseUrl", String.class,
       String.class, String.class),
   MULTI_STRING_CONCAT(SqlFunctions.class, "concatMulti", String[].class),
+  MULTI_STRING_CONCAT_OBJECTS(SqlFunctions.class, "concatMultiObjects", 
Object[].class),

Review Comment:
   MULTI_STRING_CONCAT_WITH_BINARY, WDYT?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to