asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject [3/6] incubator-asterixdb git commit: ASTERIXDB-1187, ASTERIXDB-1162 and ASTERIXDB-1252 fixes, plus new internal functions
Date Mon, 11 Jan 2016 16:20:48 GMT
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/4053f390/asterix-app/src/test/resources/runtimets/results/records/record-remove-fields/tiny-social-example/tiny-social-example.4.adm
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/results/records/record-remove-fields/tiny-social-example/tiny-social-example.4.adm b/asterix-app/src/test/resources/runtimets/results/records/record-remove-fields/tiny-social-example/tiny-social-example.4.adm
new file mode 100644
index 0000000..5f622d7
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/records/record-remove-fields/tiny-social-example/tiny-social-example.4.adm
@@ -0,0 +1,12 @@
+{ "tweetid": "7", "user": { "lang": "en", "friends_count": 182, "statuses_count": 394, "name": "Chang Ewing", "followers_count": 32136 }, "send-time": datetime("2011-08-25T10:10:00.000Z"), "referred-topics": {{ "samsung", "platform" }}, "message-text": " like samsung the platform is good" }
+, { "tweetid": "3", "user": { "lang": "en", "friends_count": 39339, "statuses_count": 473, "name": "Nathan Giesen", "followers_count": 49416 }, "send-time": datetime("2006-11-04T10:10:00.000Z"), "referred-topics": {{ "motorola", "speed" }}, "message-text": " like motorola the speed is good:)" }
+, { "tweetid": "6", "user": { "lang": "en", "friends_count": 121, "statuses_count": 362, "name": "Coline Geyer", "followers_count": 17159 }, "send-time": datetime("2010-05-07T10:10:00.000Z"), "referred-topics": {{ "iphone", "voice-clarity" }}, "message-text": " like iphone the voice-clarity is good:)" }
+, { "tweetid": "5", "user": { "lang": "en", "friends_count": 39339, "statuses_count": 473, "name": "Nathan Giesen", "followers_count": 49416 }, "send-time": datetime("2006-08-04T10:10:00.000Z"), "referred-topics": {{ "motorola", "speed" }}, "message-text": " can't stand motorola its speed is terrible:(" }
+, { "tweetid": "11", "user": { "lang": "en", "friends_count": 445, "statuses_count": 164, "name": "Nila Milliron", "followers_count": 22649 }, "send-time": datetime("2008-03-09T10:10:00.000Z"), "referred-topics": {{ "iphone", "platform" }}, "message-text": " can't stand iphone its platform is terrible" }
+, { "tweetid": "10", "user": { "lang": "en", "friends_count": 121, "statuses_count": 362, "name": "Coline Geyer", "followers_count": 17159 }, "send-time": datetime("2008-01-26T10:10:00.000Z"), "referred-topics": {{ "verizon", "voice-clarity" }}, "message-text": " hate verizon its voice-clarity is OMG:(" }
+, { "tweetid": "2", "user": { "lang": "en", "friends_count": 121, "statuses_count": 362, "name": "Coline Geyer", "followers_count": 17159 }, "send-time": datetime("2010-05-13T10:10:00.000Z"), "referred-topics": {{ "verizon", "shortcut-menu" }}, "message-text": " like verizon its shortcut-menu is awesome:)" }
+, { "tweetid": "1", "user": { "lang": "en", "friends_count": 39339, "statuses_count": 473, "name": "Nathan Giesen", "followers_count": 49416 }, "send-time": datetime("2008-04-26T10:10:00.000Z"), "referred-topics": {{ "t-mobile", "customization" }}, "message-text": " love t-mobile its customization is good:)" }
+, { "tweetid": "12", "user": { "lang": "en", "friends_count": 445, "statuses_count": 164, "name": "Oli Jackson", "followers_count": 22649 }, "send-time": datetime("2010-02-13T10:10:00.000Z"), "referred-topics": {{ "samsung", "voice-command" }}, "message-text": " like samsung the voice-command is amazing:)" }
+, { "tweetid": "8", "user": { "lang": "en", "friends_count": 39339, "statuses_count": 473, "name": "Nathan Giesen", "followers_count": 49416 }, "send-time": datetime("2005-10-14T10:10:00.000Z"), "referred-topics": {{ "t-mobile", "shortcut-menu" }}, "message-text": " like t-mobile the shortcut-menu is awesome:)" }
+, { "tweetid": "4", "user": { "lang": "en", "friends_count": 39339, "statuses_count": 473, "name": "Nathan Giesen", "followers_count": 49416 }, "send-time": datetime("2011-12-26T10:10:00.000Z"), "referred-topics": {{ "sprint", "voice-command" }}, "message-text": " like sprint the voice-command is mind-blowing:)" }
+, { "tweetid": "9", "user": { "lang": "en", "friends_count": 39339, "statuses_count": 473, "name": "Nathan Giesen", "followers_count": 49416 }, "send-time": datetime("2012-07-21T10:10:00.000Z"), "referred-topics": {{ "verizon", "voicemail-service" }}, "message-text": " love verizon its voicemail-service is awesome" }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/4053f390/asterix-app/src/test/resources/runtimets/testsuite.xml
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index 0e48f39..c4c8fc4 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -18,9 +18,10 @@
  !-->
 <!DOCTYPE test-suite [
 
-        <!ENTITY RecordsQueries SYSTEM "queries/records/RecordsQueries.xml">
+<!ENTITY RecordsQueries SYSTEM "queries/records/RecordsQueries.xml">
+<!ENTITY DeepEqualQueries SYSTEM "queries/comparison/deep_equal/DeepEqualQueries.xml">
+]>
 
-        ]>
 <test-suite
         xmlns="urn:xml.testframework.asterix.apache.org"
         ResultOffsetPath="results"
@@ -4417,6 +4418,9 @@
     <test-group name="records">
         &RecordsQueries;
     </test-group>
+    <test-group name="deep-equal">
+        &DeepEqualQueries;
+    </test-group>
     <test-group name="scan">
         <test-case FilePath="scan">
             <compilation-unit name="10">

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/4053f390/asterix-doc/src/site/markdown/aql/functions.md
----------------------------------------------------------------------
diff --git a/asterix-doc/src/site/markdown/aql/functions.md b/asterix-doc/src/site/markdown/aql/functions.md
index 2786d2a..1907689 100644
--- a/asterix-doc/src/site/markdown/aql/functions.md
+++ b/asterix-doc/src/site/markdown/aql/functions.md
@@ -37,11 +37,11 @@ Asterix provides various classes of functions to support operations on numeric,
 ### abs ###
  * Syntax:
 
-        abs(numeric_expression)
+        abs(numeric_value)
 
  * Computes the absolute value of the argument.
  * Arguments:
-    * `numeric_expression`: A `int8`/`int16`/`int32`/`int64`/`float`/`double` value.
+    * `numeric_value`: A `int8`/`int16`/`int32`/`int64`/`float`/`double` value.
  * Return Value:
     * The absolute value of the argument with the same type as the input argument, or `null` if the argument is a `null` value.
 
@@ -63,11 +63,11 @@ Asterix provides various classes of functions to support operations on numeric,
 ### ceiling ###
  * Syntax:
 
-        ceiling(numeric_expression)
+        ceiling(numeric_value)
 
  * Computes the smallest (closest to negative infinity) number with no fractional part that is not less than the value of the argument. If the argument is already equal to mathematical integer, then the result is the same as the argument.
  * Arguments:
-    * `numeric_expression`: A `int8`/`int16`/`int32`/`int64`/`float`/`double` value.
+    * `numeric_value`: A `int8`/`int16`/`int32`/`int64`/`float`/`double` value.
  * Return Value:
     * The ceiling value for the given number in the same type as the input argument, or `null` if the input is `null`.
 
@@ -89,11 +89,11 @@ Asterix provides various classes of functions to support operations on numeric,
 ### floor ###
  * Syntax:
 
-        floor(numeric_expression)
+        floor(numeric_value)
 
  * Computes the largest (closest to positive infinity) number with no fractional part that is not greater than the value. If the argument is already equal to mathematical integer, then the result is the same as the argument.
  * Arguments:
-    * `numeric_expression`: A `int8`/`int16`/`int32`/`int64`/`float`/`double` value.
+    * `numeric_value`: A `int8`/`int16`/`int32`/`int64`/`float`/`double` value.
  * Return Value:
     * The floor value for the given number in the same type as the input argument, or `null` if the input is `null`.
 
@@ -115,11 +115,11 @@ Asterix provides various classes of functions to support operations on numeric,
 ### round ###
  * Syntax:
 
-        round(numeric_expression)
+        round(numeric_value)
 
  * Computes the number with no fractional part that is closest (and also closest to positive infinity) to the argument.
  * Arguments:
-    * `numeric_expression`: A `int8`/`int16`/`int32`/`int64`/`float`/`double` value.
+    * `numeric_value`: A `int8`/`int16`/`int32`/`int64`/`float`/`double` value.
  * Return Value:
     * The rounded value for the given number in the same type as the input argument, or `null` if the input is `null`.
 
@@ -141,11 +141,11 @@ Asterix provides various classes of functions to support operations on numeric,
 ### round-half-to-even ###
  * Syntax:
 
-        round-half-to-even(numeric_expression, [precision])
+        round-half-to-even(numeric_value, [precision])
 
- * Computes the closest numeric value to `numeric_expression` that is a multiple of ten to the power of minus `precision`. `precision` is optional and by default value `0` is used.
+ * Computes the closest numeric value to `numeric_value` that is a multiple of ten to the power of minus `precision`. `precision` is optional and by default value `0` is used.
  * Arguments:
-    * `numeric_expression`: A `int8`/`int16`/`int32`/`int64`/`float`/`double` value.
+    * `numeric_value`: A `int8`/`int16`/`int32`/`int64`/`float`/`double` value.
     * `precision`: An optional integer field representing the number of digits in the fraction of the the result
  * Return Value:
     * The rounded value for the given number in the same type as the input argument, or `null` if the input is `null`.
@@ -172,24 +172,24 @@ Asterix provides various classes of functions to support operations on numeric,
 ### string-to-codepoint ###
  * Syntax:
 
-        string-to-codepoint(string_expression)
+        string-to-codepoint(string)
 
- * Converts the string `string_expression` to its code-based representation.
+ * Converts the string `string` to its code-based representation.
  * Arguments:
-    * `string_expression` : A `string` that will be converted.
+    * `string` : A `string` that will be converted.
  * Return Value:
-    * An `OrderedList` of the code points for the string `string_expression`.
+    * An `OrderedList` of the code points for the string `string`.
 
 ### codepoint-to-string ###
  * Syntax:
 
-        codepoint-to-string(list_expression)
+        codepoint-to-string(list)
 
- * Converts the ordered code-based representation `list_expression` to the corresponding string.
+ * Converts the ordered code-based representation `list` to the corresponding string.
  * Arguments:
-    * `list_expression` : An `OrderedList` of code-points.
+    * `list` : An `OrderedList` of code-points.
  * Return Value:
-    * A `string` representation of `list_expression`.
+    * A `string` representation of `list`.
 
  * Example:
 
@@ -209,14 +209,14 @@ Asterix provides various classes of functions to support operations on numeric,
 ### contains ###
  * Syntax:
 
-        contains(string_expression, substring_to_contain)
+        contains(string, substring_to_contain)
 
- * Checks whether the string `string_expression` contains the string `substring_to_contain`
+ * Checks whether the string `string` contains the string `substring_to_contain`
  * Arguments:
-    * `string_expression` : A `string` that might contain the given substring.
+    * `string` : A `string` that might contain the given substring.
     * `substring_to_contain` : A target `string` that might be contained.
  * Return Value:
-    * A `boolean` value, `true` if `string_expression` contains `substring_to_contain`, and `false` otherwise.
+    * A `boolean` value, `true` if `string` contains `substring_to_contain`, and `false` otherwise.
  * Note: An [n-gram index](similarity.html#UsingIndexesToSupportSimilarityQueries) can be utilized for this function.
  * Example:
 
@@ -237,14 +237,14 @@ Asterix provides various classes of functions to support operations on numeric,
 ### like ###
  * Syntax:
 
-        like(string_expression, string_pattern)
+        like(string, string_pattern)
 
- * Checks whether the string `string_expression` contains the string pattern `string_pattern`. Compared to the `contains` function, the `like` function also supports regular expressions.
+ * Checks whether the string `string` contains the string pattern `string_pattern`. Compared to the `contains` function, the `like` function also supports regular expressions.
  * Arguments:
-    * `string_expression` : A `string` that might contain the pattern or `null`.
+    * `string` : A `string` that might contain the pattern or `null`.
     * `string_pattern` : A pattern `string` that might be contained or `null`.
  * Return Value:
-    * A `boolean` value, `true` if `string_expression` contains the pattern `string_pattern`, and `false` otherwise.
+    * A `boolean` value, `true` if `string` contains the pattern `string_pattern`, and `false` otherwise.
 
  * Example:
 
@@ -265,14 +265,14 @@ Asterix provides various classes of functions to support operations on numeric,
 ### starts-with ###
  * Syntax:
 
-        starts-with(string_expression, substring_to_start_with)
+        starts-with(string, substring_to_start_with)
 
- * Checks whether the string `string_expression` starts with the string `substring_to_start_with`.
+ * Checks whether the string `string` starts with the string `substring_to_start_with`.
  * Arguments:
-    * `string_expression` : A `string` that might start with the given string.
+    * `string` : A `string` that might start with the given string.
     * `substring_to_start_with` : A `string` that might be contained as the starting substring.
  * Return Value:
-    * A `boolean`, returns `true` if `string_expression` starts with the string `substring_to_start_with`, and `false` otherwise.
+    * A `boolean`, returns `true` if `string` starts with the string `substring_to_start_with`, and `false` otherwise.
 
  * Example:
 
@@ -294,14 +294,14 @@ Asterix provides various classes of functions to support operations on numeric,
 ### ends-with ###
  * Syntax:
 
-        ends-with(string_expression, substring_to_end_with)
+        ends-with(string, substring_to_end_with)
 
- * Checks whether the string `string_expression` ends with the string `substring_to_end_with`.
+ * Checks whether the string `string` ends with the string `substring_to_end_with`.
  * Arguments:
-    * `string_expression` : A `string` that might end with the given string.
+    * `string` : A `string` that might end with the given string.
     * `substring_to_end_with` : A `string` that might be contained as the ending substring.
  * Return Value:
-    * A `boolean`, returns `true` if `string_expression` ends with the string `substring_to_end_with`, and `false` otherwise.
+    * A `boolean`, returns `true` if `string` ends with the string `substring_to_end_with`, and `false` otherwise.
 
  * Example:
 
@@ -322,11 +322,11 @@ Asterix provides various classes of functions to support operations on numeric,
 ### string-concat ###
  * Syntax:
 
-        string-concat(list_expression)
+        string-concat(list)
 
- * Concatenates a list of strings `list_expression` into a single string.
+ * Concatenates a list of strings `list` into a single string.
  * Arguments:
-    * `list_expression` : An `OrderedList` or `UnorderedList` of `string`s (could be `null`) to be concatenated.
+    * `list` : An `OrderedList` or `UnorderedList` of `string`s (could be `null`) to be concatenated.
  * Return Value:
     * Returns the concatenated `string` value.
 
@@ -346,12 +346,12 @@ Asterix provides various classes of functions to support operations on numeric,
 ### string-join ###
  * Syntax:
 
-        string-join(list_expression, string_expression)
+        string-join(list, string)
 
- * Joins a list of strings `list_expression` with the given separator `string_expression` into a single string.
+ * Joins a list of strings `list` with the given separator `string` into a single string.
  * Arguments:
-    * `list_expression` : An `OrderedList` or `UnorderedList` of strings (could be `null`) to be joined.
-    * `string_expression` : A `string` as the separator.
+    * `list` : An `OrderedList` or `UnorderedList` of strings (could be `null`) to be joined.
+    * `string` : A `string` as the separator.
  * Return Value:
     * Returns the joined `String`.
 
@@ -371,13 +371,13 @@ Asterix provides various classes of functions to support operations on numeric,
 ### lowercase ###
  * Syntax:
 
-        lowercase(string_expression)
+        lowercase(string)
 
- * Converts a given string `string_expression` to its lowercase form.
+ * Converts a given string `string` to its lowercase form.
  * Arguments:
-    * `string_expression` : A `string` to be converted.
+    * `string` : A `string` to be converted.
  * Return Value:
-    * Returns a `string` as the lowercase form of the given `string_expression`.
+    * Returns a `string` as the lowercase form of the given `string`.
 
  * Example:
 
@@ -394,13 +394,13 @@ Asterix provides various classes of functions to support operations on numeric,
 ### uppercase ###
  * Syntax:
 
- uppercase(string_expression)
+        uppercase(string)
 
- * Converts a given string `string_expression` to its uppercase form.
+ * Converts a given string `string` to its uppercase form.
  * Arguments:
-    * `string_expression` : A `string` to be converted.
+    * `string` : A `string` to be converted.
  * Return Value:
-    * Returns a `string` as the uppercase form of the given `string_expression`.
+    * Returns a `string` as the uppercase form of the given `string`.
 
  * Example:
 
@@ -414,42 +414,17 @@ Asterix provides various classes of functions to support operations on numeric,
 
         ASTERIX
 
-
-### uppercase ###
- * Syntax:
-
-        uppercase(string_expression)
-
- * Converts a given string `string_expression` to its uppercase form.
- * Arguments:
-    * `string_expression` : A `string` to be converted.
- * Return Value:
-    * Returns a `string` as the uppercase form of the given `string_expression`.
-
- * Example:
-
-        use dataverse TinySocial;
-
-        let $i := "asterix"
-        return uppercase($i)
-
-
- * The expected result is:
-
-        ASTERIX
-
-
 ### matches ###
  * Syntax:
 
-        matches(string_expression, string_pattern)
+        matches(string, string_pattern)
 
- * Checks whether the strings `string_expression` matches the given pattern `string_pattern` (A Java regular expression pattern).
+ * Checks whether the strings `string` matches the given pattern `string_pattern` (A Java regular expression pattern).
  * Arguments:
-    * `string_expression` : A `string` that might contain the pattern.
+    * `string` : A `string` that might contain the pattern.
     * `string_pattern` : A pattern `string` to be matched.
  * Return Value:
-    * A `boolean`, returns `true` if `string_expression` matches the pattern `string_pattern`, and `false` otherwise.
+    * A `boolean`, returns `true` if `string` matches the pattern `string_pattern`, and `false` otherwise.
 
  * Example:
 
@@ -469,11 +444,11 @@ Asterix provides various classes of functions to support operations on numeric,
 ### replace ###
  * Syntax:
 
-        replace(string_expression, string_pattern, string_replacement[, string_flags])
+        replace(string, string_pattern, string_replacement[, string_flags])
 
- * Checks whether the string `string_expression` matches the given pattern `string_pattern`, and replace the matched pattern `string_pattern` with the new pattern `string_replacement`.
+ * Checks whether the string `string` matches the given pattern `string_pattern`, and replace the matched pattern `string_pattern` with the new pattern `string_replacement`.
  * Arguments:
-    * `string_expression` : A `string` that might contain the pattern.
+    * `string` : A `string` that might contain the pattern.
     * `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.
@@ -498,13 +473,13 @@ Asterix provides various classes of functions to support operations on numeric,
 ### string-length ###
  * Syntax:
 
-        string-length(string_expression)
+        string-length(string)
 
- * Returns the length of the string `string_expression`.
+ * Returns the length of the string `string`.
  * Arguments:
-    * `string_expression` : A `string` or `null` that represents the string to be checked.
+    * `string` : A `string` or `null` that represents the string to be checked.
  * Return Value:
-    * An `int64` that represents the length of `string_expression`.
+    * An `int64` that represents the length of `string`.
 
  * Example:
 
@@ -536,12 +511,12 @@ Asterix provides various classes of functions to support operations on numeric,
 ### substring ###
  * Syntax:
 
-        substring(string_expression, offset[, length])
+        substring(string, offset[, length])
 
- * Returns the substring from the given string `string_expression` based on the given start offset `offset` with the optional `length`.
+ * Returns the substring from the given string `string` based on the given start offset `offset` with the optional `length`.
  * Arguments:
-    * `string_expression` : A `string` to be extracted.
-    * `offset` : An `int64` as the starting offset of the substring in `string_expression`.
+    * `string` : A `string` to be extracted.
+    * `offset` : An `int64` as the starting offset of the substring in `string`.
     * `length` : (Optional) An `int64` as the length of the substring.
  * Return Value:
     * A `string` that represents the substring.
@@ -563,11 +538,11 @@ Asterix provides various classes of functions to support operations on numeric,
 ### substring-before ###
  * Syntax:
 
-        substring-before(string_expression, string_pattern)
+        substring-before(string, string_pattern)
 
- * Returns the substring from the given string `string_expression` before the given pattern `string_pattern`.
+ * Returns the substring from the given string `string` before the given pattern `string_pattern`.
  * Arguments:
-    * `string_expression` : A `string` to be extracted.
+    * `string` : A `string` to be extracted.
     * `string_pattern` : A `string` pattern to be searched.
  * Return Value:
     * A `string` that represents the substring.
@@ -591,11 +566,11 @@ Asterix provides various classes of functions to support operations on numeric,
 ### substring-after ###
  * Syntax:
 
-        substring-after(string_expression, string_pattern)
+        substring-after(string, string_pattern)
 
- * Returns the substring from the given string `string_expression` after the given pattern `string_pattern`.
+ * Returns the substring from the given string `string` after the given pattern `string_pattern`.
  * Arguments:
-    * `string_expression` : A `string` to be extracted.
+    * `string` : A `string` to be extracted.
     * `string_pattern` : A `string` pattern to be searched.
  * Return Value:
     * A `string` that represents the substring.
@@ -820,14 +795,14 @@ Asterix provides various classes of functions to support operations on numeric,
 ### create-line ###
  * Syntax:
 
-        create-line(point_expression1, point_expression2)
+        create-line(point1, point2)
 
- * Creates the primitive type `line` using `point_expression1` and `point_expression2`.
+ * Creates the primitive type `line` using `point1` and `point2`.
  * Arguments:
-    * `point_expression1` : A `point` that represents the start point of the line.
-    * `point_expression2` : A `point` that represents the end point of the line.
+    * `point1` : A `point` that represents the start point of the line.
+    * `point2` : A `point` that represents the end point of the line.
  * Return Value:
-    * A spatial `line` created using the points provided in `point_expression1` and `point_expression2`.
+    * A spatial `line` created using the points provided in `point1` and `point2`.
 
  * Example:
 
@@ -845,14 +820,14 @@ Asterix provides various classes of functions to support operations on numeric,
 ### create-rectangle ###
  * Syntax:
 
-        create-rectangle(point_expression1, point_expression2)
+        create-rectangle(point1, point2)
 
- * Creates the primitive type `rectangle` using `point_expression1` and `point_expression2`.
+ * Creates the primitive type `rectangle` using `point1` and `point2`.
  * Arguments:
-    * `point_expression1` : A `point` that represents the lower-left point of the rectangle.
-    * `point_expression2` : A `point` that represents the upper-right point of the rectangle.
+    * `point1` : A `point` that represents the lower-left point of the rectangle.
+    * `point2` : A `point` that represents the upper-right point of the rectangle.
  * Return Value:
-    * A spatial `rectangle` created using the points provided in `point_expression1` and `point_expression2`.
+    * A spatial `rectangle` created using the points provided in `point1` and `point2`.
 
  * Example:
 
@@ -870,14 +845,14 @@ Asterix provides various classes of functions to support operations on numeric,
 ### create-circle ###
  * Syntax:
 
-        create-circle(point_expression, radius)
+        create-circle(point, radius)
 
- * Creates the primitive type `circle` using `point_expression` and `radius`.
+ * Creates the primitive type `circle` using `point` and `radius`.
  * Arguments:
-    * `point_expression` : A `point` that represents the center of the circle.
+    * `point` : A `point` that represents the center of the circle.
     * `radius` : A `double` that represents the radius of the circle.
  * Return Value:
-    * A spatial `circle` created using the center point and the radius provided in `point_expression` and `radius`.
+    * A spatial `circle` created using the center point and the radius provided in `point` and `radius`.
 
  * Example:
 
@@ -895,13 +870,13 @@ Asterix provides various classes of functions to support operations on numeric,
 ### create-polygon ###
  * Syntax:
 
-        create-polygon(list_expression)
+        create-polygon(list)
 
- * Creates the primitive type `polygon` using the double values provided in the argument `list_expression`. Each two consecutive double values represent a point starting from the first double value in the list. Note that at least six double values should be specified, meaning a total of three points.
+ * Creates the primitive type `polygon` using the double values provided in the argument `list`. Each two consecutive double values represent a point starting from the first double value in the list. Note that at least six double values should be specified, meaning a total of three points.
  * Arguments:
-   * `list_expression` : An OrderedList of doubles representing the points of the polygon.
+   * `list` : An OrderedList of doubles representing the points of the polygon.
  * Return Value:
-   * A `polygon`, represents a spatial simple polygon created using the points provided in `list_expression`.
+   * A `polygon`, represents a spatial simple polygon created using the points provided in `list`.
 
  * Example:
 
@@ -919,13 +894,13 @@ Asterix provides various classes of functions to support operations on numeric,
 ### get-x/get-y ###
  * Syntax:
 
-        get-x(point_expression) or get-y(point_expression)
+        get-x(point) or get-y(point)
 
- * Returns the x or y coordinates of a point `point_expression`.
+ * Returns the x or y coordinates of a point `point`.
  * Arguments:
-    * `point_expression` : A `point`.
+    * `point` : A `point`.
  * Return Value:
-    * A `double` representing the x or y coordinates of the point `point_expression`.
+    * A `double` representing the x or y coordinates of the point `point`.
 
  * Example:
 
@@ -943,13 +918,13 @@ Asterix provides various classes of functions to support operations on numeric,
 ### get-points ###
  * Syntax:
 
-        get-points(spatial_expression)
+        get-points(spatial_object)
 
- * Returns an ordered list of the points forming the spatial object `spatial_expression`.
+ * Returns an ordered list of the points forming the spatial object `spatial_object`.
  * Arguments:
-    * `spatial_expression` : A `point`, `line`, `rectangle`, `circle`, or `polygon`.
+    * `spatial_object` : A `point`, `line`, `rectangle`, `circle`, or `polygon`.
  * Return Value:
-    * An `OrderedList` of the points forming the spatial object `spatial_expression`.
+    * An `OrderedList` of the points forming the spatial object `spatial_object`.
 
  * Example:
 
@@ -998,14 +973,14 @@ Asterix provides various classes of functions to support operations on numeric,
 ### spatial-distance ###
  * Syntax:
 
-        spatial-distance(point_expression1, point_expression2)
+        spatial-distance(point1, point2)
 
- * Returns the Euclidean distance between `point_expression1` and `point_expression2`.
+ * Returns the Euclidean distance between `point1` and `point2`.
  * Arguments:
-    * `point_expression1` : A `point`.
-    * `point_expression2` : A `point`.
+    * `point1` : A `point`.
+    * `point2` : A `point`.
  * Return Value:
-    * A `double` as the Euclidean distance between `point_expression1` and `point_expression2`.
+    * A `double` as the Euclidean distance between `point1` and `point2`.
 
  * Example:
 
@@ -1061,14 +1036,14 @@ Asterix provides various classes of functions to support operations on numeric,
 ### spatial-intersect ###
  * Syntax:
 
-        spatial-intersect(spatial_expression1, spatial_expression2)
+        spatial-intersect(spatial_object1, spatial_object2)
 
  * Checks whether `@arg1` and `@arg2` spatially intersect each other.
  * Arguments:
-    * `spatial_expression1` : A `point`, `line`, `rectangle`, `circle`, or `polygon`.
-    * `spatial_expression2` : A `point`, `line`, `rectangle`, `circle`, or `polygon`.
+    * `spatial_object1` : A `point`, `line`, `rectangle`, `circle`, or `polygon`.
+    * `spatial_object2` : A `point`, `line`, `rectangle`, `circle`, or `polygon`.
  * Return Value:
-    * A `boolean` representing whether `spatial_expression1` and `spatial_expression2` spatially overlap with each other.
+    * A `boolean` representing whether `spatial_object1` and `spatial_object2` spatially overlap with each other.
 
  * Example:
 
@@ -1089,16 +1064,16 @@ Asterix provides various classes of functions to support operations on numeric,
 ### spatial-cell ###
  * Syntax:
 
-        spatial-cell(point_expression1, point_expression2, x_increment, y_increment)
+        spatial-cell(point1, point2, x_increment, y_increment)
 
- * Returns the grid cell that `point_expression1` belongs to.
+ * Returns the grid cell that `point1` belongs to.
  * Arguments:
-    * `point_expression1` : A `point` representing the point of interest that its grid cell will be returned.
-    * `point_expression2` : A `point` representing the origin of the grid.
+    * `point1` : A `point` representing the point of interest that its grid cell will be returned.
+    * `point2` : A `point` representing the origin of the grid.
     * `x_increment` : A `double`, represents X increments.
     * `y_increment` : A `double`, represents Y increments.
  * Return Value:
-    * A `rectangle` representing the grid cell that `point_expression1` belongs to.
+    * A `rectangle` representing the grid cell that `point1` belongs to.
 
  * Example:
 
@@ -1194,7 +1169,7 @@ including [edit distance](http://en.wikipedia.org/wiki/Levenshtein_distance) and
 ### edit-distance-contains ###
 * Syntax:
 
-edit-distance-contains(expression1, expression2, threshold)
+        edit-distance-contains(expression1, expression2, threshold)
 
 * Checks whether `expression1` contains `expression2` with an [edit distance](http://en.wikipedia.org/wiki/Levenshtein_distance) within a given threshold.
 
@@ -1222,14 +1197,14 @@ edit-distance-contains(expression1, expression2, threshold)
 ### similarity-jaccard ###
  * Syntax:
 
-        similarity-jaccard(list_expression1, list_expression2)
+        similarity-jaccard(list1, list2)
 
- * Returns the [Jaccard similarity](http://en.wikipedia.org/wiki/Jaccard_index) of `list_expression1` and `list_expression2`.
+ * Returns the [Jaccard similarity](http://en.wikipedia.org/wiki/Jaccard_index) of `list1` and `list2`.
  * Arguments:
-    * `list_expression1` : An `UnorderedList` or `OrderedList`.
-    * `list_expression2` : An `UnorderedList` or `OrderedList`.
+    * `list1` : An `UnorderedList` or `OrderedList`.
+    * `list2` : An `UnorderedList` or `OrderedList`.
  * Return Value:
-    * A `float` that represents the Jaccard similarity of `list_expression1` and `list_expression2`.
+    * A `float` that represents the Jaccard similarity of `list1` and `list2`.
  * Note: A [keyword index](similarity.html#UsingIndexesToSupportSimilarityQueries) can be utilized for this function.
  * Example:
 
@@ -1256,18 +1231,18 @@ edit-distance-contains(expression1, expression2, threshold)
 ### similarity-jaccard-check ###
  * Syntax:
 
-        similarity-jaccard-check(list_expression1, list_expression2, threshold)
+        similarity-jaccard-check(list1, list2, threshold)
 
- * Checks whether `list_expression1` and `list_expression2` have a [Jaccard similarity](http://en.wikipedia.org/wiki/Jaccard_index) greater than or equal to threshold.  Again, the “check” version of Jaccard is faster than the "non-check" version.
+ * Checks whether `list1` and `list2` have a [Jaccard similarity](http://en.wikipedia.org/wiki/Jaccard_index) greater than or equal to threshold.  Again, the “check” version of Jaccard is faster than the "non-check" version.
 
  * Arguments:
-    * `list_expression1` : An `UnorderedList` or `OrderedList`.
-    * `list_expression2` : An `UnorderedList` or `OrderedList`.
+    * `list1` : An `UnorderedList` or `OrderedList`.
+    * `list2` : An `UnorderedList` or `OrderedList`.
     * `threshold` : A `float` that represents the similarity threshold.
  * Return Value:
     * An `OrderedList` with two items:
-     * The first item contains a `boolean` value representing whether `list_expression1` and `list_expression2` are similar.
-     * The second item contains a `float` that represents the Jaccard similarity of `list_expression1` and `list_expression2` if it is greater than or equal to the threshold, or 0 otherwise.
+     * The first item contains a `boolean` value representing whether `list1` and `list2` are similar.
+     * The second item contains a `float` that represents the Jaccard similarity of `list1` and `list2` if it is greater than or equal to the threshold, or 0 otherwise.
  * Note: A [keyword index](similarity.html#UsingIndexesToSupportSimilarityQueries) can be utilized for this function.
  * Example:
 
@@ -1339,11 +1314,11 @@ edit-distance-contains(expression1, expression2, threshold)
 
  * Syntax:
 
-        word-tokens(string_expression)
+        word-tokens(string)
 
- * Returns a list of word tokens of `string_expression` using non-alphanumeric characters as delimiters.
+ * Returns a list of word tokens of `string` using non-alphanumeric characters as delimiters.
  * Arguments:
-    * `string_expression` : A `string` that will be tokenized.
+    * `string` : A `string` that will be tokenized.
  * Return Value:
     * An `OrderedList` of `string` word tokens.
 
@@ -1368,11 +1343,11 @@ edit-distance-contains(expression1, expression2, threshold)
 <!--### hashed-word-tokens ###
  * Syntax:
 
-        hashed-word-tokens(string_expression)
+        hashed-word-tokens(string)
 
- * Returns a list of hashed word tokens of `string_expression`.
+ * Returns a list of hashed word tokens of `string`.
  * Arguments:
-    * `string_expression` : A `string` that will be tokenized.
+    * `string` : A `string` that will be tokenized.
  * Return Value:
    * An `OrderedList` of `int32` hashed tokens.
 
@@ -1397,11 +1372,11 @@ edit-distance-contains(expression1, expression2, threshold)
 ### counthashed-word-tokens ###
  * Syntax:
 
-        counthashed-word-tokens(string_expression)
+        counthashed-word-tokens(string)
 
- * Returns a list of hashed word tokens of `string_expression`. The hashing mechanism gives duplicate tokens different hash values, based on the occurrence count of that token.
+ * Returns a list of hashed word tokens of `string`. The hashing mechanism gives duplicate tokens different hash values, based on the occurrence count of that token.
  * Arguments:
-    * `string_expression` : A `String` that will be tokenized.
+    * `string` : A `String` that will be tokenized.
  * Return Value:
     * An `OrderedList` of `Int32` hashed tokens.
  * Example:
@@ -1425,13 +1400,13 @@ edit-distance-contains(expression1, expression2, threshold)
 ### gram-tokens ###
  * Syntax:
 
-        gram-tokens(string_expression, gram_length, boolean_expression)
+        gram-tokens(string, gram_length, boolean_expression)
 
- * Returns a list of gram tokens of `string_expression`, which can be obtained by scanning the characters using a sliding window of a fixed length.
+ * Returns a list of gram tokens of `string`, which can be obtained by scanning the characters using a sliding window of a fixed length.
  * Arguments:
-    * `string_expression` : A `String` that will be tokenized.
+    * `string` : A `String` that will be tokenized.
     * `gram_length` : An `Int32` as the length of grams.
-   * `boolean_expression` : A `Boolean` value to indicate whether to generate additional grams by pre- and postfixing `string_expression` with special characters.
+   * `boolean_expression` : A `Boolean` value to indicate whether to generate additional grams by pre- and postfixing `string` with special characters.
  * Return Value:
     * An `OrderedList` of String gram tokens.
 
@@ -1460,13 +1435,13 @@ edit-distance-contains(expression1, expression2, threshold)
 ### hashed-gram-tokens ###
  * Syntax:
 
-        hashed-gram-tokens(string_expression, gram_length, boolean_expression)
+        hashed-gram-tokens(string, gram_length, boolean_expression)
 
- * Returns a list of hashed gram tokens of `string_expression`.
+ * Returns a list of hashed gram tokens of `string`.
  * Arguments:
-    * `string_expression` : A `String` that will be tokenized.
+    * `string` : A `String` that will be tokenized.
     * `gram_length` : An `Int32` as the length of grams.
-    * `boolean_expression` : A `Boolean` to indicate whether to generate additional grams by pre- and postfixing `string_expression` with special characters.
+    * `boolean_expression` : A `Boolean` to indicate whether to generate additional grams by pre- and postfixing `string` with special characters.
  * Return Value:
     * An `OrderedList` of `Int32` hashed gram tokens.
 
@@ -1497,13 +1472,13 @@ edit-distance-contains(expression1, expression2, threshold)
 ### counthashed-gram-tokens ###
  * Syntax:
 
-        counthashed-gram-tokens(string_expression, gram_length, boolean_expression)
+        counthashed-gram-tokens(string, gram_length, boolean_expression)
 
- * Returns a list of hashed gram tokens of `string_expression`. The hashing mechanism gives duplicate tokens different hash values, based on the occurrence count of that token.
+ * Returns a list of hashed gram tokens of `string`. The hashing mechanism gives duplicate tokens different hash values, based on the occurrence count of that token.
  * Arguments:
-    * `string_expression` : A `String` that will be tokenized.
+    * `string` : A `String` that will be tokenized.
     * `gram_length` : An `Int32`, length of grams to generate.
-    * `boolean_expression` : A `Boolean`, whether to generate additional grams by pre- and postfixing `string_expression` with special characters.
+    * `boolean_expression` : A `Boolean`, whether to generate additional grams by pre- and postfixing `string` with special characters.
  * Return Value:
     * An `OrderedList` of `Int32` hashed gram tokens.
 
@@ -1537,11 +1512,11 @@ edit-distance-contains(expression1, expression2, threshold)
 ### get-year/get-month/get-day/get-hour/get-minute/get-second/get-millisecond ###
  * Syntax:
 
-        get-year/get-month/get-day/get-hour/get-minute/get-second/get-millisecond(temporal_expression)
+        get-year/get-month/get-day/get-hour/get-minute/get-second/get-millisecond(temporal_value)
 
  * Accessors for accessing fields in a temporal value
  * Arguments:
-    * `temporal_expression` : a temporal value represented as one of the following types: `date`, `datetime`, `time`, and `duration`.
+    * `temporal_value` : a temporal value represented as one of the following types: `date`, `datetime`, `time`, and `duration`.
  * Return Value:
     * An `int64` value representing the field to be extracted.
 
@@ -1563,12 +1538,12 @@ edit-distance-contains(expression1, expression2, threshold)
 ### adjust-datetime-for-timezone ###
  * Syntax:
 
-        adjust-datetime-for-timezone(datetime_expression, string_expression)
+        adjust-datetime-for-timezone(datetime, string)
 
- * Adjusts the given datetime `datetime_expression` by applying the timezone information `string_expression`.
+ * Adjusts the given datetime `datetime` by applying the timezone information `string`.
  * Arguments:
-    * `datetime_expression` : A `datetime` value to be adjusted.
-    * `string_expression` : A `string` representing the timezone information.
+    * `datetime` : A `datetime` value to be adjusted.
+    * `string` : A `string` representing the timezone information.
  * Return Value:
     * A `string` value representing the new datetime after being adjusted by the timezone information.
 
@@ -1599,12 +1574,12 @@ edit-distance-contains(expression1, expression2, threshold)
 ### adjust-time-for-timezone ###
  * Syntax:
 
-        adjust-time-for-timezone(time_expression, string_expression)
+        adjust-time-for-timezone(time, string)
 
- * Adjusts the given time `time_expression` by applying the timezone information `string_expression`.
+ * Adjusts the given time `time` by applying the timezone information `string`.
  * Arguments:
-    * `time_expression` : A `time` value to be adjusted.
-    * `string_expression` : A `string` representing the timezone information.
+    * `time` : A `time` value to be adjusted.
+    * `string` : A `string` representing the timezone information.
  * Return Value:
     * A `string` value representing the new time after being adjusted by the timezone information.
 
@@ -1635,14 +1610,14 @@ edit-distance-contains(expression1, expression2, threshold)
 ### calendar-duration-from-datetime ###
  * Syntax:
 
-        calendar-duration-from-datetime(datetime_expression, duration_expression)
+        calendar-duration-from-datetime(datetime, duration_value)
 
- * Gets a user-friendly representation of the duration `duration_expression` based on the given datetime `datetime_expression`.
+ * Gets a user-friendly representation of the duration `duration_value` based on the given datetime `datetime`.
  * Arguments:
-    * `datetime_expression` : A `datetime` value to be used as the reference time point.
-    * `duration_expression` : A `duration` value to be converted.
+    * `datetime` : A `datetime` value to be used as the reference time point.
+    * `duration_value` : A `duration` value to be converted.
  * Return Value:
-    * A `duration` value with the duration as `duration_expression` but with a user-friendly representation.
+    * A `duration` value with the duration as `duration_value` but with a user-friendly representation.
 
  * Example:
 
@@ -1663,11 +1638,11 @@ edit-distance-contains(expression1, expression2, threshold)
 ### get-year-month-duration/get-day-time-duration ###
  * Syntax:
 
-        get-year-month-duration/get-day-time-duration(duration_expression)
+        get-year-month-duration/get-day-time-duration(duration_value)
 
- * Extracts the correct `duration` subtype from `duration_expression`.
+ * Extracts the correct `duration` subtype from `duration_value`.
  * Arguments:
-    * `duration_expression` : A `duration` value to be converted.
+    * `duration_value` : A `duration` value to be converted.
  * Return Value:
     * A `year-month-duration` value or a `day-time-duration` value.
 
@@ -1684,11 +1659,11 @@ edit-distance-contains(expression1, expression2, threshold)
 ### months-from-year-month-duration/milliseconds-from-day-time-duration ###
 * Syntax:
 
-        months-from-year-month-duration/milliseconds-from-day-time-duration(duration_expression)
+        months-from-year-month-duration/milliseconds-from-day-time-duration(duration_value)
 
 * Extracts the number of months or the number of milliseconds from the `duration` subtype.
 * Arguments:
-    * `duration_expression` : A `duration` of the correct subtype.
+    * `duration_value` : A `duration` of the correct subtype.
 * Return Value:
     * An `int64` representing the number or months/milliseconds.
 
@@ -1706,13 +1681,13 @@ edit-distance-contains(expression1, expression2, threshold)
 ### duration-from-months/duration-from-ms ###
 * Syntax:
 
-        duration-from-months/duration-from-ms(number_expression)
+        duration-from-months/duration-from-ms(number_value)
 
-* Creates a `duration` from `number_expression`.
+* Creates a `duration` from `number_value`.
 * Arguments:
-    * `number_expression` : An `int64` representing the number of months/milliseconds
+    * `number_value` : An `int64` representing the number of months/milliseconds
 * Return Value:
-    * A `duration` containing `number_expression` value for months/milliseconds
+    * A `duration` containing `number_value` value for months/milliseconds
 
 * Example:
 
@@ -1727,13 +1702,13 @@ edit-distance-contains(expression1, expression2, threshold)
 ### duration-from-interval ###
 * Syntax:
 
-        duration-from-interval(interval_expression)
+        duration-from-interval(interval_value)
 
-* Creates a `duration` from `interval_expression`.
+* Creates a `duration` from `interval_value`.
 * Arguments:
-    * `interval_expression` : An `interval` value
+    * `interval_value` : An `interval` value
 * Return Value:
-    * A `duration` repesenting the time in the `interval_expression`
+    * A `duration` repesenting the time in the `interval_value`
 
 * Example:
 
@@ -1745,7 +1720,7 @@ edit-distance-contains(expression1, expression2, threshold)
           "dr2" : duration-from-interval($itv2),
           "dr3" : duration-from-interval($itv3),
           "dr4" : duration-from-interval(null) }
-          
+
 * The expected result is:
 
         { "dr1": day-time-duration("P52D"),
@@ -1801,22 +1776,22 @@ edit-distance-contains(expression1, expression2, threshold)
 ### get-date-from-datetime ###
  * Syntax:
 
-        get-date-from-datetime(datetime_expression)
+        get-date-from-datetime(datetime)
 
- * Gets the date value from the given datetime value `datetime_expression`.
+ * Gets the date value from the given datetime value `datetime`.
  * Arguments:
-    * `datetime_expression`: A `datetime` value to be extracted from.
+    * `datetime`: A `datetime` value to be extracted from.
  * Return Value:
     * A `date` value from the datetime.
 
 ### get-time-from-datetime ###
  * Syntax:
 
-        get-time-from-datetime(datetime_expression)
+        get-time-from-datetime(datetime)
 
- * Get the time value from the given datetime value `datetime_expression`
+ * Get the time value from the given datetime value `datetime`
  * Arguments:
-    * `datetime_expression`: A `datetime` value to be extracted from
+    * `datetime`: A `datetime` value to be extracted from
  * Return Value:
     * A `time` value from the datetime.
 
@@ -1839,11 +1814,11 @@ edit-distance-contains(expression1, expression2, threshold)
 ### day-of-week ###
 * Syntax:
 
-        day-of-week(date_expression)
+        day-of-week(date)
 
 * Finds the day of the week for a given date (1-7)
 * Arguments:
-    * `date_expression`: A `date` value (Can also be a `datetime`)
+    * `date`: A `date` value (Can also be a `datetime`)
 * Return Value:
     * An `int8` representing the day of the week (1-7)
 
@@ -1861,59 +1836,59 @@ edit-distance-contains(expression1, expression2, threshold)
 ### date-from-unix-time-in-days ###
  * Syntax:
 
-        date-from-unix-time-in-days(numeric_expression)
+        date-from-unix-time-in-days(numeric_value)
 
- * Gets a date representing the time after `numeric_expression` days since 1970-01-01.
+ * Gets a date representing the time after `numeric_value` days since 1970-01-01.
  * Arguments:
-    * `numeric_expression`: A `int8`/`int16`/`int32`/`int64` value representing the number of days.
+    * `numeric_value`: A `int8`/`int16`/`int32`/`int64` value representing the number of days.
  * Return Value:
-    * A `date` value as the time after `numeric_expression` days since 1970-01-01.
+    * A `date` value as the time after `numeric_value` days since 1970-01-01.
 
 ### datetime-from-unix-time-in-ms ###
  * Syntax:
 
-        datetime-from-unix-time-in-ms(numeric_expression)
+        datetime-from-unix-time-in-ms(numeric_value)
 
- * Gets a datetime representing the time after `numeric_expression` milliseconds since 1970-01-01T00:00:00Z.
+ * Gets a datetime representing the time after `numeric_value` milliseconds since 1970-01-01T00:00:00Z.
  * Arguments:
-    * `numeric_expression`: A `int8`/`int16`/`int32`/`int64` value representing the number of milliseconds.
+    * `numeric_value`: A `int8`/`int16`/`int32`/`int64` value representing the number of milliseconds.
  * Return Value:
-    * A `datetime` value as the time after `numeric_expression` milliseconds since 1970-01-01T00:00:00Z.
+    * A `datetime` value as the time after `numeric_value` milliseconds since 1970-01-01T00:00:00Z.
 
 ### datetime-from-unix-time-in-secs ###
  * Syntax:
 
-        datetime-from-unix-time-in-secs(numeric_expression)
+        datetime-from-unix-time-in-secs(numeric_value)
 
- * Gets a datetime representing the time after `numeric_expression` seconds since 1970-01-01T00:00:00Z.
+ * Gets a datetime representing the time after `numeric_value` seconds since 1970-01-01T00:00:00Z.
  * Arguments:
-    * `numeric_expression`: A `int8`/`int16`/`int32`/`int64` value representing the number of seconds.
+    * `numeric_value`: A `int8`/`int16`/`int32`/`int64` value representing the number of seconds.
  * Return Value:
-    * A `datetime` value as the time after `numeric_expression` seconds since 1970-01-01T00:00:00Z.
+    * A `datetime` value as the time after `numeric_value` seconds since 1970-01-01T00:00:00Z.
 
 
 ### datetime-from-date-time ###
 * Syntax:
 
-datetime-from-date-time(date_expression,time_expression)
+datetime-from-date-time(date,time)
 
-* Gets a datetime representing the combination of `date_expression` and `time_expression`
+* Gets a datetime representing the combination of `date` and `time`
     * Arguments:
-    * `date_expression`: A `date` value
-    * `time_expression` A `time` value
+    * `date`: A `date` value
+    * `time` A `time` value
 * Return Value:
-    * A `datetime` value by combining `date_expression` and `time_expression`
+    * A `datetime` value by combining `date` and `time`
 
 ### time-from-unix-time-in-ms ###
  * Syntax:
 
-        time-from-unix-time-in-ms(numeric_expression)
+        time-from-unix-time-in-ms(numeric_value)
 
- * Gets a time representing the time after `numeric_expression` milliseconds since 00:00:00.000Z.
+ * Gets a time representing the time after `numeric_value` milliseconds since 00:00:00.000Z.
  * Arguments:
-    * `numeric_expression`: A `int8`/`int16`/`int32`/`int64` value representing the number of milliseconds.
+    * `numeric_value`: A `int8`/`int16`/`int32`/`int64` value representing the number of milliseconds.
  * Return Value:
-    * A `time` value as the time after `numeric_expression` milliseconds since 00:00:00.000Z.
+    * A `time` value as the time after `numeric_value` milliseconds since 00:00:00.000Z.
 
  * Example:
 
@@ -1933,11 +1908,11 @@ datetime-from-date-time(date_expression,time_expression)
 ### parse-date/parse-time/parse-datetime ###
 * Syntax:
 
-parse-date/parse-time/parse-datetime(date_expression,formatting_expression)
+parse-date/parse-time/parse-datetime(date,formatting_expression)
 
-* Creates a `date/time/date-time` value by treating `date_expression` with formatting `formatting_expression`
+* Creates a `date/time/date-time` value by treating `date` with formatting `formatting_expression`
 * Arguments:
-    * `date_expression`: A `string` value representing the `date/time/datetime`. 
+    * `date`: A `string` value representing the `date/time/datetime`.
     * `formatting_expression` A `string` value providing the formatting for `date_expression`.Characters used to create date expression:
        * `h` hours
        * `m` minutes
@@ -1951,7 +1926,7 @@ parse-date/parse-time/parse-datetime(date_expression,formatting_expression)
        * `W` weekday
        * `-`, `'`, `/`, `.`, `,`, `T` seperators for both time and date
 * Return Value:
-    * A `date/time/date-time` value corresponding to `date_expression`
+    * A `date/time/date-time` value corresponding to `date`
 
 * Example:
 
@@ -1966,11 +1941,11 @@ parse-date/parse-time/parse-datetime(date_expression,formatting_expression)
 ### print-date/print-time/print-datetime ###
 * Syntax:
 
-print-date/print-time/print-datetime(date_expression,formatting_expression)
+        print-date/print-time/print-datetime(date,formatting_expression)
 
-* Creates a `string` representing a `date/time/date-time` value of the `date_expression` using the formatting `formatting_expression`
+* Creates a `string` representing a `date/time/date-time` value of the `date` using the formatting `formatting_expression`
 * Arguments:
-    * `date_expression`: A `date/time/datetime` value.
+    * `date`: A `date/time/datetime` value.
     * `formatting_expression` A `string` value providing the formatting for `date_expression`. Characters used to create date expression:
        * `h` hours
        * `m` minutes
@@ -1984,7 +1959,7 @@ print-date/print-time/print-datetime(date_expression,formatting_expression)
        * `W` weekday
        * `-`, `'`, `/`, `.`, `,`, `T` seperators for both time and date
 * Return Value:
-    * A `string` value corresponding to `date_expression`
+    * A `string` value corresponding to `date`
 
 * Example:
 
@@ -2045,18 +2020,18 @@ print-date/print-time/print-datetime(date_expression,formatting_expression)
 ### get-overlapping-interval ###
  * Syntax:
 
-        get-overlapping-interval(interval_expression_1, interval_expression_2)
+        get-overlapping-interval(interval1, interval2)
 
  * Gets the start/end of the given interval for the specific date/datetime/time type.
  * Arguments:
-    * `interval_expression_1`: an `interval` value
-    * `interval_expression_2`: an `interval` value
+    * `interval1`: an `interval` value
+    * `interval2`: an `interval` value
  * Return Value:
-    * Returns an `interval` that is overlapping `interval_expression_1` and `interval_expression_2`. If `interval_expression_1` and `interval_expression_2` do not overlap `null` is returned. Note each interval must be of the same type.
+    * Returns an `interval` that is overlapping `interval1` and `interval2`. If `interval1` and `interval2` do not overlap `null` is returned. Note each interval must be of the same type.
 
  * Example:
 
-        { "overlap1": get-overlapping-interval(interval-from-time(time("11:23:39"), time("18:27:19")), interval-from-time(time("12:23:39"), time("23:18:00"))), 
+        { "overlap1": get-overlapping-interval(interval-from-time(time("11:23:39"), time("18:27:19")), interval-from-time(time("12:23:39"), time("23:18:00"))),
           "overlap2": get-overlapping-interval(interval-from-time(time("12:23:39"), time("18:27:19")), interval-from-time(time("07:19:39"), time("09:18:00"))),
           "overlap3": get-overlapping-interval(interval-from-date(date("1980-11-30"), date("1999-09-09")), interval-from-date(date("2013-01-01"), date("2014-01-01"))),
           "overlap4": get-overlapping-interval(interval-from-date(date("1980-11-30"), date("2099-09-09")), interval-from-date(date("2013-01-01"), date("2014-01-01"))),
@@ -2065,11 +2040,11 @@ print-date/print-time/print-datetime(date_expression,formatting_expression)
 
  * The expected result is:
 
-        { "overlap1": interval-time("12:23:39.000Z, 18:27:19.000Z"), 
-          "overlap2": null, 
-          "overlap3": null, 
-          "overlap4": interval-date("2013-01-01, 2014-01-01"), 
-          "overlap5": interval-datetime("1989-03-04T12:23:39.000Z, 2000-10-30T18:27:19.000Z"), 
+        { "overlap1": interval-time("12:23:39.000Z, 18:27:19.000Z"),
+          "overlap2": null,
+          "overlap3": null,
+          "overlap4": interval-date("2013-01-01, 2014-01-01"),
+          "overlap5": interval-datetime("1989-03-04T12:23:39.000Z, 2000-10-30T18:27:19.000Z"),
           "overlap6": null }
 
 
@@ -2120,12 +2095,12 @@ See the [Allen's Relations](allens.html).
 ### interval-from-date ###
  * Syntax:
 
-        interval-from-date(string_expression1, string_expression2)
+        interval-from-date(string1, string2)
 
  * Constructor function for the `interval` type by parsing two date strings.
  * Arguments:
-    * `string_expression1` : The `string` value representing the starting date.
-    * `string_expression2` : The `string` value representing the ending date.
+    * `string1` : The `string` value representing the starting date.
+    * `string2` : The `string` value representing the ending date.
  * Return Value:
     * An `interval` value between the two dates.
 
@@ -2142,12 +2117,12 @@ See the [Allen's Relations](allens.html).
 ### interval-from-time ###
  * Syntax:
 
-        interval-from-time(string_expression1, string_expression2)
+        interval-from-time(string1, string2)
 
  * Constructor function for the `interval` type by parsing two time strings.
  * Arguments:
-    * `string_expression1` : The `string` value representing the starting time.
-    * `string_expression2` : The `string` value representing the ending time.
+    * `string1` : The `string` value representing the starting time.
+    * `string2` : The `string` value representing the ending time.
  * Return Value:
     * An `interval` value between the two times.
 
@@ -2164,12 +2139,12 @@ See the [Allen's Relations](allens.html).
 ### interval-from-datetime ###
  * Syntax:
 
-        interval-from-datetime(string_expression1, string_expression2)
+        interval-from-datetime(string1, string2)
 
  * Constructor function for `interval` type by parsing two datetime strings.
  * Arguments:
-    * `string_expression1` : The `string` value representing the starting datetime.
-    * `string_expression2` : The `string` value representing the ending datetime.
+    * `string1` : The `string` value representing the starting datetime.
+    * `string2` : The `string` value representing the ending datetime.
  * Return Value:
     * An `interval` value between the two datetimes.
 
@@ -2213,11 +2188,11 @@ See the [Allen's Relations](allens.html).
 
  * Syntax:
 
-        overlap-bins(interval_expression, time-bin-anchor, duration-bin-size)
+        overlap-bins(interval, time-bin-anchor, duration-bin-size)
 
- * Returns an ordered list of `interval` values representing each bin that is overlapping the `interval_expression`.
+ * Returns an ordered list of `interval` values representing each bin that is overlapping the `interval`.
  * Arguments:
-    * `interval_expression`: an `interval` value
+    * `interval`: an `interval` value
     * `time-bin-anchor`: a date/time/datetime value representing an anchor of a bin starts. The type of this argument should be the same as the first `time-to-bin` argument.
     * `duration-bin-size`: the duration value representing the size of the bin, in the type of year-month-duration or day-time-duration. The type of this duration should be compatible with the type of `time-to-bin`, so that the arithmetic operation between `time-to-bin` and `duration-bin-size` is well-defined. Currently AsterixDB supports the following arithmetic operations:
         * datetime +|- year-month-duration
@@ -2226,7 +2201,7 @@ See the [Allen's Relations](allens.html).
         * date +|- day-time-duration
         * time +|- day-time-duration
   * Return Value:
-    * A ordered list of `interval` values representing each bin that is overlapping the `interval_expression`. Note that the internal type as `time-to-bin` and `duration-bin-size`.
+    * A ordered list of `interval` values representing each bin that is overlapping the `interval`. Note that the internal type as `time-to-bin` and `duration-bin-size`.
 
   * Example:
 
@@ -2236,11 +2211,11 @@ See the [Allen's Relations](allens.html).
         return { "timebins": overlap-bins($itv1, time("00:00:00"), day-time-duration("PT30M")),
           "datebins": overlap-bins($itv2, date("1990-01-01"), year-month-duration("P20Y")),
           "datetimebins": overlap-bins($itv3, datetime("1900-01-01T00:00:00.000"), year-month-duration("P100Y")) }
-          
+
    * The expected result is:
 
-        { "timebins": [ interval-time("17:00:00.000Z, 17:30:00.000Z"), interval-time("17:30:00.000Z, 18:00:00.000Z"), interval-time("18:00:00.000Z, 18:30:00.000Z"), interval-time("18:30:00.000Z, 19:00:00.000Z") ], 
-          "datebins": [ interval-date("1970-01-01, 1990-01-01"), interval-date("1990-01-01, 2010-01-01"), interval-date("2010-01-01, 2030-01-01") ], 
+        { "timebins": [ interval-time("17:00:00.000Z, 17:30:00.000Z"), interval-time("17:30:00.000Z, 18:00:00.000Z"), interval-time("18:00:00.000Z, 18:30:00.000Z"), interval-time("18:30:00.000Z, 19:00:00.000Z") ],
+          "datebins": [ interval-date("1970-01-01, 1990-01-01"), interval-date("1990-01-01, 2010-01-01"), interval-date("2010-01-01, 2030-01-01") ],
           "datetimebins": [ interval-datetime("1800-01-01T00:00:00.000Z, 1900-01-01T00:00:00.000Z"), interval-datetime("1900-01-01T00:00:00.000Z, 2000-01-01T00:00:00.000Z"), interval-datetime("2000-01-01T00:00:00.000Z, 2100-01-01T00:00:00.000Z") ] }
 
 
@@ -2250,52 +2225,52 @@ See the [Allen's Relations](allens.html).
 ### get-record-fields ###
  * Syntax:
 
-        get-record-fields(record_expression)
+        get-record-fields(input_record)
 
  * Access the record field names, type and open status for a given record.
  * Arguments:
-    * `record_expression` : a record value.
+    * `input_record` : a record value.
  * Return Value:
-    * An order list of `record` values that include the field-name `string`, field-type `string`, is-open `boolean` and optional nested `orderedList` for the values of a nested record.
+    * An order list of `record` values that include the field-name `string`, field-type `string`, is-open `boolean` (used for debug purposes only: `true` if field is open and `false` otherwise), and optional nested `orderedList` for the values of a nested record.
 
  * Example:
 
-        let $r1 := {"id": 1, 
-            "project": "AsterixDB", 
-            "address": {"city": "Irvine", "state": "CA"}, 
+        let $r1 := {"id": 1,
+            "project": "AsterixDB",
+            "address": {"city": "Irvine", "state": "CA"},
             "related": ["Hivestrix", "Preglix", "Apache VXQuery"] }
         return get-record-fields($r1)
 
  * The expected result is:
 
-        [ { "field-name": "id", "field-type": "INT64", "is-open": false }, 
-          { "field-name": "project", "field-type": "STRING", "is-open": false }, 
-          { "field-name": "address", "field-type": "RECORD", "is-open": false, "nested": [ 
-            { "field-name": "city", "field-type": "STRING", "is-open": false }, 
-            { "field-name": "state", "field-type": "STRING", "is-open": false } ] }, 
-          { "field-name": "related", "field-type": "ORDEREDLIST", "is-open": false, "list": [ 
-            { "field-type": "STRING" }, 
-            { "field-type": "STRING" }, 
+        [ { "field-name": "id", "field-type": "INT64", "is-open": false },
+          { "field-name": "project", "field-type": "STRING", "is-open": false },
+          { "field-name": "address", "field-type": "RECORD", "is-open": false, "nested": [
+            { "field-name": "city", "field-type": "STRING", "is-open": false },
+            { "field-name": "state", "field-type": "STRING", "is-open": false } ] },
+          { "field-name": "related", "field-type": "ORDEREDLIST", "is-open": false, "list": [
+            { "field-type": "STRING" },
+            { "field-type": "STRING" },
             { "field-type": "STRING" } ] } ]
 
  ]
 ### get-record-field-value ###
  * Syntax:
 
-        get-record-field-value(record_expression, string_expression)
+        get-record-field-value(input_record, string)
 
  * Access the field name given in the `string_expression` from the `record_expression`.
  * Arguments:
-    * `record_expression` : A `record` value.
-    * `string_expression` : A `string` representing the top level field name.
+    * `input_record` : A `record` value.
+    * `string` : A `string` representing the top level field name.
  * Return Value:
     * An `any` value saved in the designated field of the record.
 
  * Example:
 
-        let $r1 := {"id": 1, 
-            "project": "AsterixDB", 
-            "address": {"city": "Irvine", "state": "CA"}, 
+        let $r1 := {"id": 1,
+            "project": "AsterixDB",
+            "address": {"city": "Irvine", "state": "CA"},
             "related": ["Hivestrix", "Preglix", "Apache VXQuery"] }
         return get-record-field-value($r1, "project")
 
@@ -2303,9 +2278,99 @@ See the [Allen's Relations](allens.html).
 
         "AsterixDB"
 
+### record-remove-fields ###
+ * Syntax:
 
-## <a id="OtherFunctions">Other Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
+        record-remove-fields(input_record, field_names)
+
+ * Remove indicated fields from a record given a list of field names.
+ * Arguments:
+    * `input_record`:  a record value.
+    * `field_names`: an ordered list of strings and/or ordered list of ordered list of strings.
+
+ * Return Value:
+    * A new record value without the fields listed in the second argument.
+
+
+ * Example:
+
+        let $r1 := {"id":1,
+            "project":"AsterixDB",
+            "address":{"city":"Irvine", "state":"CA"},
+            "related":["Hivestrix", "Preglix", "Apache VXQuery"] }
+        return remove-fields($r1, [["address", "city"], "related"])
+
+ * The expected result is:
+
+        { "id":1,
+        "project":"AsterixDB",
+        "address":{"state":"CA"}}
+
+### record-add-fields ###
+ * Syntax:
+
+        record-add-fields(input_record, fields)
 
+ * Add fields from a record given a list of field names.
+ * Arguments:
+    * `input_record` : a record value.
+    * `fields`: an ordered list of field descriptor records where each record has field-name and  field-value.
+ * Return Value:
+    * A new record value with the new fields included.
+
+
+ * Example:
+
+        let $r1 := {"id":1,
+            "project":"AsterixDB",
+            "address":{"city":"Irvine", "state":"CA"},
+            "related":["Hivestrix", "Preglix", "Apache VXQuery"] }
+        return record-add-fields($r1, [{"field-name":"employment-location", "field-value":create-point(30.0,70.0)}])
+
+ * The expected result is:
+
+        {"id":1,
+           "project":"AsterixDB",
+           "address":{"city":"Irvine", "state":"CA"},
+           "related":["Hivestrix", "Preglix", "Apache VXQuery"]
+           "employment-location": point("30.0,70.0")}
+
+### record-merge ###
+ * Syntax:
+
+        record-merge(record1, record2)
+
+ * Merge two different records into a new record.
+ * Arguments:
+    * `record1` : a record value.
+    * `record2` : a record value.
+ * Return Value:
+    * A new record value with fields from both input records. If a field’s names in both records are the same, an exception is issued.
+
+
+ * Example:
+
+        let $r1 := {"id":1,
+            "project":"AsterixDB",
+            "address":{"city":"Irvine", "state":"CA"},
+            "related":["Hivestrix", "Preglix", "Apache VXQuery"] }
+
+        let $r2 := {"user_id": 22,
+           "employer": "UC Irvine",
+           "employment-type": "visitor" }
+        return  record-merge($r1, $r2)
+
+ * The expected result is:
+
+        {"id":1,
+         "project":"AsterixDB",
+         "address":{"city":"Irvine", "state":"CA"},
+         "related":["Hivestrix", "Preglix", "Apache VXQuery"]
+         "user-id": 22,
+         "employer": "UC Irvine",
+         "employment-type": "visitor"}
+
+## <a id="OtherFunctions">Other Functions</a> <font size="4"><a href="#toc">[Back to TOC]</a></font> ##
 
 ### create-uuid ###
  * Syntax:
@@ -2357,13 +2422,13 @@ See the [Allen's Relations](allens.html).
 ### len ###
  * Syntax:
 
-    len(list_expression)
+    len(list)
 
- * Returns the length of the list list_expression.
+ * Returns the length of the list list.
  * Arguments:
-    * `list_expression` : An `OrderedList`, `UnorderedList` or `null`, represents the list need to be checked.
+    * `list` : An `OrderedList`, `UnorderedList` or `null`, represents the list need to be checked.
  * Return Value:
-    * An `Int32` that represents the length of list_expression.
+    * An `Int32` that represents the length of list.
 
  * Example:
 
@@ -2403,13 +2468,13 @@ See the [Allen's Relations](allens.html).
 ### range ###
  * Syntax:
 
-        range(start_numeric_expression, end_numeric_expression)
+        range(start_numeric_value, end_numeric_value)
 
-* Generates a series of `int64` values based start the `start_numeric_expression` until the `end_numeric_expression`.
+* Generates a series of `int64` values based start the `start_numeric_value` until the `end_numeric_value`.
   The `range` fucntion must be used list argument of a `for` expression.
 * Arguments:
-   * `start_numeric_expression`: A `int8`/`int16`/`int32`/`int64` value representing the start value.
-   * `end_numeric_expression`: A `int8`/`int16`/`int32`/`int64` value representing the max final value.
+   * `start_numeric_value`: A `int8`/`int16`/`int32`/`int64` value representing the start value.
+   * `end_numeric_value`: A `int8`/`int16`/`int32`/`int64` value representing the max final value.
 * Return Value:
     * A generated `uuid`.
 * Example:
@@ -2420,8 +2485,8 @@ See the [Allen's Relations](allens.html).
  * The expected result is:
 
         [ 0
-        , 1 
-        , 2 
+        , 1
+        , 2
         , 3
         ]
 
@@ -2470,3 +2535,33 @@ See the [Allen's Relations](allens.html).
         3
 
 
+### deep-equal ###
+* Syntax:
+
+        deep-equal(var1, var2)
+
+
+ * Assess the equality between two variables of any type (e.g., records and lists). Two objects are deeply equal iff both their types and values are equal.
+ * Arguments:
+    * `var1` : a data value, such as record and list.
+    * `var2`: a data value, such as record and list.
+ * Return Value:
+    * `true` or `false` depending on the data equality.
+
+
+ * Example:
+
+        let $r1 := {"id":1,
+            "project":"AsterixDB",
+            "address":{"city":"Irvine", "state":"CA"},
+            "related":["Hivestrix", "Preglix", "Apache VXQuery"] }
+
+        let $r2 := {"id":1,
+                    "project":"AsterixDB",
+                    "address":{"city":"San Diego", "state":"CA"},
+                    "related":["Hivestrix", "Preglix", "Apache VXQuery"] }
+        return deep-equal($r1, $r2)
+
+ * The expected result is:
+
+        false
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/4053f390/asterix-om/src/main/java/org/apache/asterix/builders/IARecordBuilder.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/builders/IARecordBuilder.java b/asterix-om/src/main/java/org/apache/asterix/builders/IARecordBuilder.java
index 4512920..ee15d5d 100644
--- a/asterix-om/src/main/java/org/apache/asterix/builders/IARecordBuilder.java
+++ b/asterix-om/src/main/java/org/apache/asterix/builders/IARecordBuilder.java
@@ -52,7 +52,7 @@ public interface IARecordBuilder {
     /**
      * @param name
      *            The field name.
-     * @param out
+     * @param value
      *            The field value.
      * @throws AsterixException
      *             if the field name conflicts with a closed field name

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/4053f390/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlSerializerDeserializerProvider.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlSerializerDeserializerProvider.java b/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlSerializerDeserializerProvider.java
index 9ca94f1..9be8cae 100644
--- a/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlSerializerDeserializerProvider.java
+++ b/asterix-om/src/main/java/org/apache/asterix/formats/nontagged/AqlSerializerDeserializerProvider.java
@@ -18,11 +18,6 @@
  */
 package org.apache.asterix.formats.nontagged;
 
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.Serializable;
-
 import org.apache.asterix.dataflow.data.nontagged.serde.ABinarySerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.ABooleanSerializerDeserializer;
 import org.apache.asterix.dataflow.data.nontagged.serde.ACircleSerializerDeserializer;
@@ -66,6 +61,11 @@ import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
 import org.apache.hyracks.dataflow.common.data.marshalling.ShortSerializerDeserializer;
 
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.Serializable;
+
 public class AqlSerializerDeserializerProvider implements ISerializerDeserializerProvider, Serializable {
 
     private static final long serialVersionUID = 1L;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/4053f390/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java b/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
index ad4831f..7b8a9fa 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/functions/AsterixBuiltinFunctions.java
@@ -18,12 +18,6 @@
  */
 package org.apache.asterix.om.functions;
 
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 import org.apache.asterix.common.functions.FunctionConstants;
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
@@ -97,7 +91,9 @@ import org.apache.asterix.om.typecomputer.impl.OrderedListOfAPointTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.OrderedListOfAStringTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.OrderedListOfAnyTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.QuadStringStringOrNullTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.RecordAddFieldsTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.RecordMergeTypeComputer;
+import org.apache.asterix.om.typecomputer.impl.RecordRemoveFieldsTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.ScalarVersionOfAggregateResultType;
 import org.apache.asterix.om.typecomputer.impl.SubsetCollectionTypeComputer;
 import org.apache.asterix.om.typecomputer.impl.Substring2TypeComputer;
@@ -117,6 +113,12 @@ import org.apache.hyracks.algebricks.core.algebra.functions.AlgebricksBuiltinFun
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.core.algebra.functions.IFunctionInfo;
 
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 public class AsterixBuiltinFunctions {
 
     public enum SpatialFilterKind {
@@ -173,9 +175,17 @@ public class AsterixBuiltinFunctions {
     public final static FunctionIdentifier UNORDERED_LIST_CONSTRUCTOR = new FunctionIdentifier(
             FunctionConstants.ASTERIX_NS, "unordered-list-constructor", FunctionIdentifier.VARARGS);
 
+    public final static FunctionIdentifier DEEP_EQUAL = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "deep-equal", 2);
+
     // records
     public final static FunctionIdentifier RECORD_MERGE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
-            "record-merge", 3);
+            "record-merge", 2);
+    public final static FunctionIdentifier REMOVE_FIELDS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "record-remove-fields", 2);
+    public final static FunctionIdentifier ADD_FIELDS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "record-add-fields", 2);
+
     public final static FunctionIdentifier CLOSED_RECORD_CONSTRUCTOR = new FunctionIdentifier(
             FunctionConstants.ASTERIX_NS, "closed-record-constructor", FunctionIdentifier.VARARGS);
     public final static FunctionIdentifier OPEN_RECORD_CONSTRUCTOR = new FunctionIdentifier(
@@ -741,6 +751,9 @@ public class AsterixBuiltinFunctions {
         addPrivateFunction(OR, BinaryBooleanOrNullFunctionTypeComputer.INSTANCE, true);
         addPrivateFunction(NUMERIC_ADD, NonTaggedNumericAddSubMulDivTypeComputer.INSTANCE, true);
 
+        // Deep equality
+        addFunction(DEEP_EQUAL, BinaryBooleanOrNullFunctionTypeComputer.INSTANCE, true);
+
         // and then, Asterix builtin functions
         addPrivateFunction(NOT_NULL, NotNullTypeComputer.INSTANCE, true);
         addPrivateFunction(ANY_COLLECTION_MEMBER, NonTaggedCollectionMemberResultType.INSTANCE, true);
@@ -933,7 +946,9 @@ public class AsterixBuiltinFunctions {
         addFunction(WORD_TOKENS, OrderedListOfAStringTypeComputer.INSTANCE, true);
 
         // records
-        addPrivateFunction(RECORD_MERGE, RecordMergeTypeComputer.INSTANCE, true);
+        addFunction(RECORD_MERGE, RecordMergeTypeComputer.INSTANCE, true);
+        addFunction(ADD_FIELDS, RecordAddFieldsTypeComputer.INSTANCE, true);
+        addFunction(REMOVE_FIELDS, RecordRemoveFieldsTypeComputer.INSTANCE, true);
         addPrivateFunction(CLOSED_RECORD_CONSTRUCTOR, ClosedRecordConstructorResultType.INSTANCE, true);
         addPrivateFunction(OPEN_RECORD_CONSTRUCTOR, OpenRecordConstructorResultType.INSTANCE, true);
         addPrivateFunction(FIELD_ACCESS_BY_INDEX, FieldAccessByIndexResultType.INSTANCE, true);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/4053f390/asterix-om/src/main/java/org/apache/asterix/om/pointables/ARecordVisitablePointable.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/pointables/ARecordVisitablePointable.java b/asterix-om/src/main/java/org/apache/asterix/om/pointables/ARecordVisitablePointable.java
index 823ea3e..03e3895 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/pointables/ARecordVisitablePointable.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/pointables/ARecordVisitablePointable.java
@@ -19,11 +19,6 @@
 
 package org.apache.asterix.om.pointables;
 
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.dataflow.data.nontagged.AqlNullWriterFactory;
 import org.apache.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
@@ -40,6 +35,11 @@ import org.apache.asterix.om.util.container.IObjectFactory;
 import org.apache.hyracks.api.dataflow.value.INullWriter;
 import org.apache.hyracks.util.string.UTF8StringWriter;
 
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * This class interprets the binary data representation of a record. One can
  * call getFieldNames, getFieldTypeTags and getFieldValues to get pointable

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/4053f390/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java b/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java
index 7e41f3b..d89ae6a 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/pointables/cast/ARecordCaster.java
@@ -19,14 +19,6 @@
 
 package org.apache.asterix.om.pointables.cast;
 
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.asterix.builders.RecordBuilder;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.exceptions.TypeException;
@@ -55,6 +47,14 @@ import org.apache.hyracks.data.std.primitive.UTF8StringPointable;
 import org.apache.hyracks.data.std.util.ByteArrayAccessibleOutputStream;
 import org.apache.hyracks.util.string.UTF8StringWriter;
 
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * This class is to do the runtime type cast for a record. It is ONLY visible to
  * ACastVisitor.


Mime
View raw message