This is an automated email from the ASF dual-hosted git repository.

dlych pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 6e4213b  [NO ISSUE] Update split() document with a new example
6e4213b is described below

commit 6e4213bb3aac91552835927f8f171a8ef87ab614
Author: Rui Guo <[email protected]>
AuthorDate: Tue Jul 21 17:16:42 2020 -0700

    [NO ISSUE] Update split() document with a new example
    
    In the split() function document, added an example with two consecutive
    `sep`s in the input `string` to clarify this edge case.
    
    Change-Id: I9d944ac560957581523de52c0533f91225c059e6
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/7205
    Reviewed-by: Dmitry Lychagin <[email protected]>
    Tested-by: Dmitry Lychagin <[email protected]>
    Integration-Tests: Dmitry Lychagin <[email protected]>
---
 .../asterix-doc/src/main/markdown/builtins/2_string_common.md | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git 
a/asterixdb/asterix-doc/src/main/markdown/builtins/2_string_common.md 
b/asterixdb/asterix-doc/src/main/markdown/builtins/2_string_common.md
index 528ff5d..8a98690 100644
--- a/asterixdb/asterix-doc/src/main/markdown/builtins/2_string_common.md
+++ b/asterixdb/asterix-doc/src/main/markdown/builtins/2_string_common.md
@@ -505,6 +505,7 @@
     * `string` : a `string` to be split.
  * Return Value:
     * an array of substrings by splitting the input `string` by `sep`,
+    * in case of two consecutive `sep`s in the `string`, the result of 
splitting the two consecutive `sep`s will be the empty string `""`,
     * `missing` if the argument is a `missing` value,
     * `null` if the argument is a `null` value,
     * any other non-string input value will cause a type error.
@@ -519,6 +520,16 @@
         [ "test", "driven", "development" ]
 
 
+ * Example with two consecutive `sep`s in the `string`:
+
+        split("123//456", "/");
+
+
+ * The expected result is:
+
+        [ "123", "", "456" ]
+
+
 ### starts_with ###
  * Syntax:
 

Reply via email to