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

laurent pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/drill.git


The following commit(s) were added to refs/heads/gh-pages by this push:
     new 8c39abb  DRILL-7928: [DOC-UPDATE] Add doc for split_part (#2229)
8c39abb is described below

commit 8c39abb032d13bf1bc7b53667b9e928007543a55
Author: leon <[email protected]>
AuthorDate: Wed Jun 2 01:37:34 2021 +0800

    DRILL-7928: [DOC-UPDATE] Add doc for split_part (#2229)
    
    * add doc for split_part
---
 .../sql-functions/040-string-manipulation.md       | 23 +++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/_docs/sql-reference/sql-functions/040-string-manipulation.md 
b/_docs/sql-reference/sql-functions/040-string-manipulation.md
index 376832f..7e30515 100644
--- a/_docs/sql-reference/sql-functions/040-string-manipulation.md
+++ b/_docs/sql-reference/sql-functions/040-string-manipulation.md
@@ -520,13 +520,14 @@ The _delimiter_ must not be null and must contain a 
single character.
     |------------------------------------|
 
 ## SPLIT_PART
-Return the string part at _index_ after splitting the input string using the 
specified delimiter.
+Return the string part at _start_ or from _start_ to _end_ after splitting the 
input string using the specified delimiter.
 
 ### SPLIT_PART Syntax
-    SPLIT_PART(string, delimiter, index)
+    SPLIT_PART(string, delimiter, start[, end])
 
 ### SPLIT_PART Usage Notes
-The _delimiter_ string may be multiple characters long.  The _index_ must be a 
positive integer.
+The _delimiter_ string may be multiple characters long. The _start_ must be a 
positive integer.
+The _end_ must be greater than or equal to _start_ if provided.
 
 ### SPLIT_PART Examples
 
@@ -537,7 +538,23 @@ The _delimiter_ string may be multiple characters long.  
The _index_ must be a p
     |--------|
     | fox    |
     |--------|
+    
+    SELECT split_part('The | quick | brown | fox | jumps', ' | ', 4, 5);
 
+    |--------------|
+    |    EXPR$0    |
+    |--------------|
+    | fox | jumps  |
+    |--------------|
+    
+    SELECT split_part('The | quick | brown | fox | jumps', ' | ', 4, 10);
+
+    |--------------|
+    |    EXPR$0    |
+    |--------------|
+    | fox | jumps  |
+    |--------------|
+    
 ## STRPOS
 Returns the location of the first occurrence of a substring of the input
 string, or 0 if the substring does not occur.

Reply via email to