Repository: asterixdb Updated Branches: refs/heads/master c281d15de -> 2e73820de
[NO ISSUE][DOC] Fix INF/Bigint Examples - user model changes: no - storage format changes: no - interface changes: no Details: - Fix INF/Bigint expected results in examples - Move number types out of common types file. Change-Id: Ie93a48484da2497bac8bb224a9ecbf39d85979c3 Reviewed-on: https://asterix-gerrit.ics.uci.edu/2001 Sonar-Qube: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Contrib: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Reviewed-by: Till Westmann <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/2e73820d Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/2e73820d Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/2e73820d Branch: refs/heads/master Commit: 2e73820de13ae5b06718de6a7a69de8cb1815878 Parents: c281d15 Author: Murtadha Hubail <[email protected]> Authored: Mon Sep 11 09:25:11 2017 -0700 Committer: Murtadha Hubail <[email protected]> Committed: Tue Sep 12 12:02:41 2017 -0700 ---------------------------------------------------------------------- .../datamodel/datamodel_primitive_common.md | 46 ------------------- .../datamodel/datamodel_primitive_delta.md | 48 ++++++++++++++++++++ 2 files changed, 48 insertions(+), 46 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e73820d/asterixdb/asterix-doc/src/main/markdown/datamodel/datamodel_primitive_common.md ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-doc/src/main/markdown/datamodel/datamodel_primitive_common.md b/asterixdb/asterix-doc/src/main/markdown/datamodel/datamodel_primitive_common.md index 3a401b5..8f9b28e 100644 --- a/asterixdb/asterix-doc/src/main/markdown/datamodel/datamodel_primitive_common.md +++ b/asterixdb/asterix-doc/src/main/markdown/datamodel/datamodel_primitive_common.md @@ -45,51 +45,5 @@ { "v1": "This is a string.", "v2": "\"This is a quoted string\"" } -### <a id="PrimitiveTypesInt">Tinyint / Smallint / Integer (Int) / Bigint</a> ### -Integer types using 8, 16, 32, or 64 bits. The ranges of these types are: -- `tinyint`: -128 to 127 -- `smallint`: -32768 to 32767 -- `integer`: -2147483648 to 2147483647 -- `bigint`: -9223372036854775808 to 9223372036854775807 - -`int` is an abbreviated alias for integer. - - * Example: - - { "tinyint": tiny("125"), "smallint": smallint("32765"), "integer": 294967295, "bigint": bigint("1700000000000000000")}; - - - * The expected result is: - - { "tinyint": 125, "smallint": 32765, "integer": 294967295, "bigint": 17000000 } - -### <a id="PrimitiveTypesFloat">Float</a> ### -`float` represents approximate numeric data values using 4 bytes. The range of a float value can be -from 2^(-149) to (2-2^(-23)·2^(127) for both positive and negative. Beyond these ranges will get `INF` or `-INF`. - - * Example: - - { "v1": float("NaN"), "v2": float("INF"), "v3": float("-INF"), "v4": float("-2013.5") }; - - - * The expected result is: - - { "v1": "NaN", "v2": "Infinity", "v3": "-Infinity", "v4": -2013.5 } - - -### <a id="PrimitiveTypesDouble">Double (double precision)</a> ### -`double` represents approximate numeric data values using 8 bytes. The range of a double value can be from (2^(-1022)) to (2-2^(-52))·2^(1023) -for both positive and negative. Beyond these ranges will get `INF` or `-INF`. - - * Example: - - { "v1": double("NaN"), "v2": double("INF"), "v3": double("-INF"), "v4": "-2013.593823748327284" }; - - - * The expected result is: - - { "v1": "NaN", "v2": "Infinity", "v3": "-Infinity", "v4": -2013.5938237483274 } - -`Double precision` is an alias of `double`. http://git-wip-us.apache.org/repos/asf/asterixdb/blob/2e73820d/asterixdb/asterix-doc/src/main/markdown/datamodel/datamodel_primitive_delta.md ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-doc/src/main/markdown/datamodel/datamodel_primitive_delta.md b/asterixdb/asterix-doc/src/main/markdown/datamodel/datamodel_primitive_delta.md index 13e3910..51aaed3 100644 --- a/asterixdb/asterix-doc/src/main/markdown/datamodel/datamodel_primitive_delta.md +++ b/asterixdb/asterix-doc/src/main/markdown/datamodel/datamodel_primitive_delta.md @@ -17,6 +17,54 @@ ! under the License. !--> +### <a id="PrimitiveTypesInt">Tinyint / Smallint / Integer (Int) / Bigint</a> ### +Integer types using 8, 16, 32, or 64 bits. The ranges of these types are: + +- `tinyint`: -128 to 127 +- `smallint`: -32768 to 32767 +- `integer`: -2147483648 to 2147483647 +- `bigint`: -9223372036854775808 to 9223372036854775807 + +`int` is an abbreviated alias for integer. + + * Example: + + { "tinyint": tiny("125"), "smallint": smallint("32765"), "integer": 294967295, "bigint": bigint("1700000000000000000")}; + + + * The expected result is: + + { "tinyint": 125, "smallint": 32765, "integer": 294967295, "bigint": 1700000000000000000 } + +### <a id="PrimitiveTypesFloat">Float</a> ### +`float` represents approximate numeric data values using 4 bytes. The range of a float value can be +from 2^(-149) to (2-2^(-23)·2^(127) for both positive and negative. Beyond these ranges will get `INF` or `-INF`. + + * Example: + + { "v1": float("NaN"), "v2": float("INF"), "v3": float("-INF"), "v4": float("-2013.5") }; + + + * The expected result is: + + { "v1": "NaN", "v2": "INF", "v3": "-INF", "v4": -2013.5 } + + +### <a id="PrimitiveTypesDouble">Double (double precision)</a> ### +`double` represents approximate numeric data values using 8 bytes. The range of a double value can be from (2^(-1022)) to (2-2^(-52))·2^(1023) +for both positive and negative. Beyond these ranges will get `INF` or `-INF`. + + * Example: + + { "v1": double("NaN"), "v2": double("INF"), "v3": double("-INF"), "v4": "-2013.593823748327284" }; + + + * The expected result is: + + { "v1": "NaN", "v2": "INF", "v3": "-INF", "v4": -2013.5938237483274 } + +`Double precision` is an alias of `double`. + ### <a id="PrimitiveTypesBinary">Binary</a> ### `binary` represents a sequence of bytes. It can be constructed from a `hex` or a `base64` string sequence. The total length of the byte sequence can be up to 2,147,483,648.
