Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 413C3200D09 for ; Tue, 12 Sep 2017 21:03:33 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3FB4C1609C7; Tue, 12 Sep 2017 19:03:33 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5E1311609B4 for ; Tue, 12 Sep 2017 21:03:32 +0200 (CEST) Received: (qmail 95404 invoked by uid 500); 12 Sep 2017 19:03:31 -0000 Mailing-List: contact commits-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list commits@asterixdb.apache.org Received: (qmail 95393 invoked by uid 99); 12 Sep 2017 19:03:30 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Sep 2017 19:03:30 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 978EAF5743; Tue, 12 Sep 2017 19:03:30 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: mhubail@apache.org To: commits@asterixdb.apache.org Message-Id: <7f805af2f28546cf889d025d987861e5@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: asterixdb git commit: [NO ISSUE][DOC] Fix INF/Bigint Examples Date: Tue, 12 Sep 2017 19:03:30 +0000 (UTC) archived-at: Tue, 12 Sep 2017 19:03:33 -0000 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 Tested-by: Jenkins Contrib: Jenkins Integration-Tests: Jenkins Reviewed-by: Till Westmann 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 Authored: Mon Sep 11 09:25:11 2017 -0700 Committer: Murtadha Hubail 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\"" } -### Tinyint / Smallint / Integer (Int) / Bigint ### -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 } - -### Float ### -`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 } - - -### Double (double precision) ### -`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. !--> +### Tinyint / Smallint / Integer (Int) / Bigint ### +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 } + +### Float ### +`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 } + + +### Double (double precision) ### +`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`. + ### Binary ### `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.