asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject asterixdb git commit: Cleaning up typos and clarifying examples in string function doc.
Date Tue, 27 Dec 2016 21:24:59 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 0294b3119 -> 8b3d0e754


Cleaning up typos and clarifying examples in string function doc.

Change-Id: I944d9dd1d1e23608b6a596190c3d89e19cfacead
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1403
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
Reviewed-by: Steven Jacobs <sjaco002@ucr.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/8b3d0e75
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/8b3d0e75
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/8b3d0e75

Branch: refs/heads/master
Commit: 8b3d0e75417d9dbeb5848dcd11209e04d8629ed8
Parents: 0294b31
Author: Mike Carey <dtabass@gmail.com>
Authored: Wed Dec 21 17:11:29 2016 -0800
Committer: Yingyi Bu <buyingyi@gmail.com>
Committed: Tue Dec 27 09:21:24 2016 -0800

----------------------------------------------------------------------
 .../src/main/markdown/builtins/2_string.md      | 57 ++++++++++++--------
 1 file changed, 34 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/8b3d0e75/asterixdb/asterix-doc/src/main/markdown/builtins/2_string.md
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-doc/src/main/markdown/builtins/2_string.md b/asterixdb/asterix-doc/src/main/markdown/builtins/2_string.md
index 365b6f4..e7d0d5c 100644
--- a/asterixdb/asterix-doc/src/main/markdown/builtins/2_string.md
+++ b/asterixdb/asterix-doc/src/main/markdown/builtins/2_string.md
@@ -100,7 +100,7 @@
         { "v1": true, "v2": false }
 
 
-### initcap (title) ###
+### initcap (or title) ###
  * Syntax:
 
         initcap(string)
@@ -113,7 +113,7 @@
  * Return Value:
     * a `string` as the title form of the given `string`,
     * `missing` if the argument is a `missing` value,
-     * `null` if the argument is a `null` value,
+    * `null` if the argument is a `null` value,
     * any other non-string input value will cause a type error.
 
  * Example:
@@ -161,7 +161,7 @@
  * Return Value:
     * a `string` as the lowercase form of the given `string`,
     * `missing` if the argument is a `missing` value,
-     * `null` if the argument is a `null` value,
+    * `null` if the argument is a `null` value,
     * any other non-string input value will cause a type error.
 
  * Example:
@@ -193,7 +193,7 @@
 
  * Example:
 
-        ltrim("i like iphone", "iphone");
+        ltrim("me like iphone", "eml");
 
 
  * The expected result is:
@@ -220,14 +220,14 @@
  * Example:
 
         {
-          "v1": position("pphonepp", "phone"),
+          "v1": position("ppphonepp", "phone"),
           "v2": position("hone", "phone")
         };
 
 
  * The expected result is:
 
-        { "v1": 1, "v2": -1 }
+        { "v1": 2, "v2": -1 }
 
 
 ### regexp_contains ###
@@ -241,7 +241,7 @@
     * `string` : a `string` that might contain the pattern,
     * `string_pattern` : a pattern `string` to be matched,
     * `string_flag` : (Optional) a `string` with flags to be used during regular expression
matching.
-        * The following modes are enabled with these flags: dotall (s), multiline (m), case_insenitive
(i), and comments and whitespace (x).
+        * The following modes are enabled with these flags: dotall (s), multiline (m), case_insensitive
(i), and comments and whitespace (x).
  * Return Value:
     * a `boolean`, returns `true` if `string` contains the pattern `string_pattern`,
     * `missing` if any argument is a `missing` value,
@@ -273,7 +273,7 @@
     * `string` : a `string` that might contain the pattern,
     * `string_pattern` : a pattern `string` that might be contained,
     * `string_flag` : (Optional) a `string` with flags to be used during regular expression
matching.
-        * The following modes are enabled with these flags: dotall (s), multiline (m), case_insenitive
(i), and comments and whitespace (x).
+        * The following modes are enabled with these flags: dotall (s), multiline (m), case_insensitive
(i), and comments and whitespace (x).
  * Return Value:
     * a `boolean` value, `true` if `string` contains the pattern `string_pattern`,
     * `missing` if any argument is a `missing` value,
@@ -304,7 +304,7 @@
     * `string` : a `string` that might contain the pattern,
     * `string_pattern` : a pattern `string` to be matched,
     * `string_flag` : (Optional) a `string` with flags to be used during regular expression
matching.
-        * The following modes are enabled with these flags: dotall (s), multiline (m), case_insenitive
(i), and comments and whitespace (x).
+        * The following modes are enabled with these flags: dotall (s), multiline (m), case_insensitive
(i), and comments and whitespace (x).
  * Return Value:
     * the first position that the regular expression `string_pattern` appears in `string`,
       or -1 if it does not appear.
@@ -338,7 +338,7 @@
     * `string_pattern` : a pattern `string` to be matched,
     * `string_replacement` : a pattern `string` to be used as the replacement,
     * `string_flag` : (Optional) a `string` with flags to be used during replace.
-        * The following modes are enabled with these flags: dotall (s), multiline (m), case_insenitive
(i), and comments and whitespace (x).
+        * The following modes are enabled with these flags: dotall (s), multiline (m), case_insensitive
(i), and comments and whitespace (x).
  * Return Value:
     * Returns a `string` that is obtained after the replacements,
     * `missing` if any argument is a `missing` value,
@@ -362,7 +362,7 @@
 
  * Returns a string formed by repeating the input `string` `n` times.
  * Arguments:
-    * `string` : a `string` to be extracted,
+    * `string` : a `string` to be repeated,
     * `offset` : an `tinyint`/`smallint`/`integer`/`bigint` value as the starting offset
of the substring in `string`.
  * Return Value:
     * a string that repeats the input `string` `n` times,
@@ -401,13 +401,14 @@
 
  * Example:
 
-        rtrim("i like iphone", "iphone");
-
+        {
+          "v1": rtrim("i like iphone", "iphone"),
+          "v2": rtrim("i like iphone", "oneiph")
+        };
 
  * The expected result is:
 
-        "i like "
-
+        { "v1": "i like ", "v2": "i like " }
 
 ### split ###
  * Syntax:
@@ -493,10 +494,10 @@
 
         string_join(array, string)
 
- * Joins a array or multiset of strings `array` with the given separator `string` into a
single string.
+ * Joins an array or multiset of strings `array` with the given separator `string` into a
single string.
  * Arguments:
     * `array` : an `array` or `multiset` of strings (could be `null`) to be joined.
-    * `string` : a `string` as the separator.
+    * `string` : a `string` to serve as the separator.
  * Return Value:
     * the joined `string`,
     * `missing` if any argument is a `missing` value,
@@ -531,6 +532,14 @@
     * `null` if the argument is a `null` value,
     * any other non-string input value will cause a type error.
 
+ * Example:
+
+        string_to_codepoint("Hello ASTERIX!");
+
+
+ * The expected result is:
+
+        [ 72, 101, 108, 108, 111, 32, 65, 83, 84, 69, 82, 73, 88, 33 ]
 
 
 ### codepoint_to_string ###
@@ -551,12 +560,13 @@
 
  * Example:
 
-        { "codes": string_to_codepoint("Hello ASTERIX!"), "string": codepoint_to_string(string_to_codepoint("Hello
ASTERIX!"))};
+        codepoint_to_string([72, 101, 108, 108, 111, 32, 65, 83, 84, 69, 82, 73, 88, 33]);
 
 
  * The expected result is:
 
-        { "codes": [ 72, 101, 108, 108, 111, 32, 65, 83, 84, 69, 82, 73, 88, 33 ], "string":
"Hello ASTERIX!" }
+        "Hello ASTERIX!"
+
 
 
 ### substr ###
@@ -608,10 +618,11 @@
         substring_before(" like iphone", "iphone");
 
 
-* The expected result is:
+ * The expected result is:
 
         " like "
 
+
 ### substring_after ###
  * Syntax:
 
@@ -630,12 +641,12 @@
 
  * Example:
 
-        substring_after(" like iphone", "iphone");
+        substring_after(" like iphone", "iph");
 
 
  * The expected result is:
 
-        ""
+        "one"
 
 
 ### trim ###
@@ -657,7 +668,7 @@
 
  * Example:
 
-        trim("i like iphone", "iphone");
+        trim("i like iphone", "iphoen");
 
 
  * The expected result is:


Mime
View raw message