zhangstar333 commented on code in PR #13741:
URL: https://github.com/apache/doris/pull/13741#discussion_r1041689486


##########
docs/zh-CN/docs/sql-manual/sql-functions/string-functions/split_by_string.md:
##########
@@ -0,0 +1,94 @@
+---
+{
+    "title": "split_by_string",
+    "language": "zh-CN"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## split_by_string 
+
+### description
+
+#### Syntax
+
+```
+split_by_string(s, separator)
+```
+将字符串拆分为由字符串分隔的子字符串。它使用多个字符的常量字符串分隔符作为分隔符。如果字符串分隔符为空,它将字符串拆分为单个字符数组。
+
+#### Arguments
+
+`separator` — 分隔符是一个字符串,是用来分割的标志字符. 类型: `String`
+
+`s` — 需要分割的字符串. 类型: `String`
+
+#### Returned value(s)
+
+返回一个包含子字符串的数组. 以下情况会返回空的子字符串:
+
+需要分割的字符串的首尾是分隔符;
+
+多个分隔符连续出现;
+
+需要分割的字符串为空,而分隔符不为空.
+
+Type: `Array(String)`
+
+### notice
+
+`Only supported in vectorized engine`
+
+### example
+
+```
+SELECT split_by_string('1, 2 3, 4,5, abcde', ', ');
++---------------------------------------------+
+| split_by_string('1, 2 3, 4,5, abcde', ', ') |
++---------------------------------------------+
+| ['1', '2 3', '4,5', 'abcde']                |
++---------------------------------------------+
+SELECT split_by_string('abcde','');
++--------------------------------+
+| split_by_string('1,2,3,', ',') |
++--------------------------------+
+| ['a', 'b', 'c', 'd', 'e']      |
++--------------------------------+
+SELECT split_by_string(NULL,',');
++----------------------------+
+| split_by_string(NULL, ',') |
++----------------------------+
+| NULL                       |
++----------------------------+
+SELECT split_by_string('1, 2 3, , , 4,5, abcde', ', ');
++-------------------------------------------------+
+| split_by_string('1, 2 3, , , 4,5, abcde', ', ') |
++-------------------------------------------------+
+| ['1', '2 3', '', '', '4,5']                     |
++-------------------------------------------------+

Review Comment:
   this case result is not contains 'abcde'?



-- 
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-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to