Change in asterixdb[master]: Revise the data model document.
Jenkins has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 3: Integration Tests Successful https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/759/ : SUCCESS -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-Reviewer: Yingyi Bu Gerrit-HasComments: No
Change in asterixdb[master]: Revise the data model document.
Jenkins has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 3: Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/759/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-Reviewer: Yingyi Bu Gerrit-HasComments: No
Change in asterixdb[master]: Revise the data model document.
Yingyi Bu has submitted this change and it was merged. Change subject: Revise the data model document. .. Revise the data model document. Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Reviewed-on: https://asterix-gerrit.ics.uci.edu/1206 Reviewed-by: Till WestmannSonar-Qube: Jenkins Tested-by: Jenkins --- M asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md M asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md M asterixdb/asterix-doc/src/site/markdown/index.md M asterixdb/asterix-doc/src/site/site.xml 4 files changed, 140 insertions(+), 110 deletions(-) Approvals: Till Westmann: Looks good to me, approved Jenkins: Verified; No violations found diff --git a/asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md b/asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md index c9e2acf..cb75d76 100644 --- a/asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md +++ b/asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md @@ -53,7 +53,6 @@ * [WITH clauses](#With_clauses) * [LET clauses](#Let_clauses) * [UNION ALL](#Union_all) - * [MISSING in query results](#Missing_in_query_results) * [SQL++ Vs. SQL-92](#Vs_SQL-92) * [4. DDL and DML statements](#DDL_and_DML_statements) * [Declarations](#Declarations) diff --git a/asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md b/asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md index 09d9177..5a5aced 100644 --- a/asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md +++ b/asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md @@ -17,15 +17,15 @@ ! under the License. !--> -# Asterix Data Model (ADM) # +# The Asterix Data Model (ADM) # ## Table of Contents ## * [Primitive Types](#PrimitiveTypes) * [Boolean](#PrimitiveTypesBoolean) -* [Int8 / Int16 / Int32 / Int64](#PrimitiveTypesInt) +* [Tinyint / Smallint / Integer (Int) / Bigint](#PrimitiveTypesInt) * [Float](#PrimitiveTypesFloat) -* [Double](#PrimitiveTypesDouble) +* [Double (Double Precision)](#PrimitiveTypesDouble) * [String](#PrimitiveTypesString) * [Binary](#PrimitiveTypesBinary) * [Point](#PrimitiveTypesPoint) @@ -35,27 +35,32 @@ * [Polygon](#PrimitiveTypesPolygon) * [Date](#PrimitiveTypesDate) * [Time](#PrimitiveTypesTime) -* [Datetime](#PrimitiveTypesDateTime) -* [Duration/Year-month-duration/Day-time-duration](#PrimitiveTypesDuration) +* [Datetime (Timestamp)](#PrimitiveTypesDateTime) +* [Duration/Year_month_duration/Day_time_duration](#PrimitiveTypesDuration) * [Interval](#PrimitiveTypesInterval) * [UUID](#PrimitiveTypesUUID) +* [Incomplete Information Types] (#IncompleteInformationTypesTypes) +* [Null](#IncompleteInformationTypesNull) +* [Missing](#IncompleteInformationTypesMissing) * [Derived Types](#DerivedTypes) * [Record](#DerivedTypesRecord) -* [OrderedList](#DerivedTypesOrderedList) -* [UnorderedList](#DerivedTypesUnorderedList) +* [Array](#DerivedTypesArray) +* [Multiset](#DerivedTypesMultiset) -An instance of Asterix data model (ADM) can be a _*primitive type*_ (`int32`, `int64`, `string`, `float`, `double`, `date`, `time`, `datetime`, etc. or `null`) or a _*derived type*_. +An instance of Asterix data model (ADM) can be a _*primitive type*_ (`boolean`, +`tinyint`, `smallint`, `integer`, `bigint`, `string`, `float`, `double`, `date`, +`time`, `datetime`, etc.), a _*special type*_ (`null` or `missing`), or a _*derived type*_. -## Primitive Types [Back to TOC] ## +The type names are case-insensitive, e.g., both `BIGINT` and `bigint` are acceptable. -### Boolean[Back to TOC] ### +## Primitive Types## + +### Boolean ### `boolean` data type can have one of the two values: _*true*_ or _*false*_. * Example: -let $t := true -let $f := false -return { "true": $t, "false": $f } +{ "true": true, "false": false }; * The expected result is: @@ -64,70 +69,61 @@ -### Int8 / Int16 / Int32 / Int64 [Back to TOC] ### +### Tinyint / Smallint / Integer (Int) / Bigint ### Integer types using 8, 16, 32, or 64 bits. The ranges of these types are: -- `int8`: -127 to 127 -- `int16`: -32767 to 32767 -- `int32`: -2147483647 to 2147483647 -- `int64`: -9223372036854775808 to 9223372036854775807 +- `tinyint`: -127 to 127 +- `smallint`: -32767 to 32767 +- `integer`: -2147483647 to 2147483647 +- `bigint`: -9223372036854775808 to 9223372036854775807 + +`int` is an abbreviated alias for integer. * Example: -let $v8 := int8("125") -let $v16 := int16("32765") -let $v32 := 294967295 -let $v64 := int64("170") -return { "int8": $v8, "int16": $v16, "int32": $v32, "int64": $v64} +{ "tinyint": tiny("125"), "smallint": smallint("32765"), "integer":
Change in asterixdb[master]: Revise the data model document.
Till Westmann has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 3: Code-Review+2 -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-Reviewer: Yingyi Bu Gerrit-HasComments: No
Change in asterixdb[master]: Revise the data model document.
Yingyi Bu has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 2: (1 comment) https://asterix-gerrit.ics.uci.edu/#/c/1206/2/asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md File asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md: Line 393: Multiset constructors are denoted by two opening curly braces followed by data and two closing flower braces, like "{{...}}". > one more s/flower/curly/ Done -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-Reviewer: Yingyi Bu Gerrit-HasComments: Yes
Change in asterixdb[master]: Revise the data model document.
Jenkins has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 3: Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/2806/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-Reviewer: Yingyi Bu Gerrit-HasComments: No
Change in asterixdb[master]: Revise the data model document.
Till Westmann has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 2: (1 comment) one more ... https://asterix-gerrit.ics.uci.edu/#/c/1206/2/asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md File asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md: Line 393: Multiset constructors are denoted by two opening curly braces followed by data and two closing flower braces, like "{{...}}". one more s/flower/curly/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-Reviewer: Yingyi Bu Gerrit-HasComments: Yes
Change in asterixdb[master]: Revise the data model document.
Jenkins has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 2: Integration-Tests+1 Integration Tests Successful https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/755/ : SUCCESS -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-Reviewer: Yingyi Bu Gerrit-HasComments: No
Change in asterixdb[master]: Revise the data model document.
Jenkins has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 2: Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/755/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-Reviewer: Yingyi Bu Gerrit-HasComments: No
Change in asterixdb[master]: Revise the data model document.
Jenkins has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 2: Integration-Tests-1 Integration Tests Timed Out https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/752/ : ABORTED -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-Reviewer: Yingyi Bu Gerrit-HasComments: No
Change in asterixdb[master]: Revise the data model document.
Jenkins has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 2: Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/752/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-Reviewer: Yingyi Bu Gerrit-HasComments: No
Change in asterixdb[master]: Revise the data model document.
Jenkins has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 2: Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/2799/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Revise the data model document.
Yingyi Bu has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 1: (9 comments) https://asterix-gerrit.ics.uci.edu/#/c/1206/1/asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md File asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md: Line 42: * [Special Types] (#SpecialTypes) > We can leave this as-is, but I don't like "special" as it's too generic. I Done Line 80: `int` is an abbreviated alias for integer. > Is this how it's implemented? I thought that we had started to equate integ Yes, this is what's in the master. >>" I thought that we had started to equate integer with int64 ..." We previously didn't have a type name "integer". What we did is to let a constant integer value to be a bigint(int64) by default. This is still the case in the current master. For example, if you say: 1+1; it will return: 2 the types of the constants are bigint. Since we removed suffixes like "i8", "i16", "i32", etc, a user wouldn't tell what the actual type those constants are. Line 112: { "v1": double("NaN"), "v2": double("INF"), "v3": double("-INF"), "v4": double("-2013.593823748327284") }; > It seems bad, that we don't have double literals, do we have an issue for t Done Line 339: A `null` represent an unknown value. > s/represent/represents/ Done Line 340: For example, a user might not be able to know the value of a field and initially set it to `null` > "Setting" the value sounds like we can modify the data model instances, but Done Line 357: Because AsterixDB does not enforce homogeneity for datasets or collections, > It would be nice if we could make this doc less system specific. E.g. "as n Done Line 359: so a field can be present in one document and `missing` in another. > s/document/record/? Or move to "object"? Done Line 393: A `multiset` is a generalization of the concept of a set that, unlike a set, allows multiple instances of the multiset's elements. Multiset constructors are denoted by two opening flower braces followed by data and two closing flower braces, like "{{...}}". > s/flower/curly/? Done https://asterix-gerrit.ics.uci.edu/#/c/1206/1/asterixdb/asterix-doc/src/site/markdown/index.md File asterixdb/asterix-doc/src/site/markdown/index.md: Line 29: * Two expressive and declarative query languages (SQL++ and AQL) that supports a broad > s/supports/support/ Done -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-Reviewer: Yingyi Bu Gerrit-HasComments: Yes
Change in asterixdb[master]: Revise the data model document.
Hello Jenkins, I'd like you to reexamine a change. Please visit https://asterix-gerrit.ics.uci.edu/1206 to look at the new patch set (#2). Change subject: Revise the data model document. .. Revise the data model document. Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d --- M asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md M asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md M asterixdb/asterix-doc/src/site/markdown/index.md M asterixdb/asterix-doc/src/site/site.xml 4 files changed, 140 insertions(+), 110 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/06/1206/2 -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann
Change in asterixdb[master]: Revise the data model document.
Till Westmann has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 1: (9 comments) https://asterix-gerrit.ics.uci.edu/#/c/1206/1/asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md File asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md: Line 42: * [Special Types] (#SpecialTypes) We can leave this as-is, but I don't like "special" as it's too generic. I came up with "incomplete information types", but that long and potentially confusing as well. Line 80: `int` is an abbreviated alias for integer. Is this how it's implemented? I thought that we had started to equate integer with int64 ... Line 112: { "v1": double("NaN"), "v2": double("INF"), "v3": double("-INF"), "v4": double("-2013.593823748327284") }; It seems bad, that we don't have double literals, do we have an issue for this? Line 339: A `null` represent an unknown value. s/represent/represents/ Line 340: For example, a user might not be able to know the value of a field and initially set it to `null` "Setting" the value sounds like we can modify the data model instances, but we cannot. Maybe we should start of by saying something like "null is a special value that is often used to represent an unknown value ..." and then talk about the application providing such a value? Not sure - maybe we can also just use is as-is and discuss a formulation that's short and precise with Mike. Line 357: Because AsterixDB does not enforce homogeneity for datasets or collections, It would be nice if we could make this doc less system specific. E.g. "as neither the datamodel nor the system enforce ..." Line 359: so a field can be present in one document and `missing` in another. s/document/record/? Or move to "object"? Line 393: A `multiset` is a generalization of the concept of a set that, unlike a set, allows multiple instances of the multiset's elements. Multiset constructors are denoted by two opening flower braces followed by data and two closing flower braces, like "{{...}}". s/flower/curly/? https://asterix-gerrit.ics.uci.edu/#/c/1206/1/asterixdb/asterix-doc/src/site/markdown/index.md File asterixdb/asterix-doc/src/site/markdown/index.md: Line 29: * Two expressive and declarative query languages (SQL++ and AQL) that supports a broad s/supports/support/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-HasComments: Yes
Change in asterixdb[master]: Revise the data model document.
Jenkins has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 1: Integration-Tests+1 Integration Tests Successful https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/730/ : SUCCESS -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Revise the data model document.
Jenkins has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 1: Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/730/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Revise the data model document.
Jenkins has posted comments on this change. Change subject: Revise the data model document. .. Patch Set 1: Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/2772/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1206 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-HasComments: No
Change in asterixdb[master]: Revise the data model document.
Yingyi Bu has uploaded a new change for review. https://asterix-gerrit.ics.uci.edu/1206 Change subject: Revise the data model document. .. Revise the data model document. Change-Id: I9c51f4f14ce7c16c98ea67503488e69e19d9195d --- M asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md M asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md M asterixdb/asterix-doc/src/site/markdown/index.md M asterixdb/asterix-doc/src/site/site.xml 4 files changed, 140 insertions(+), 110 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/06/1206/1 diff --git a/asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md b/asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md index c9e2acf..cb75d76 100644 --- a/asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md +++ b/asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md @@ -53,7 +53,6 @@ * [WITH clauses](#With_clauses) * [LET clauses](#Let_clauses) * [UNION ALL](#Union_all) - * [MISSING in query results](#Missing_in_query_results) * [SQL++ Vs. SQL-92](#Vs_SQL-92) * [4. DDL and DML statements](#DDL_and_DML_statements) * [Declarations](#Declarations) diff --git a/asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md b/asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md index 09d9177..705f1fd 100644 --- a/asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md +++ b/asterixdb/asterix-doc/src/site/markdown/aql/datamodel.md @@ -17,15 +17,15 @@ ! under the License. !--> -# Asterix Data Model (ADM) # +# The Asterix Data Model (ADM) # ## Table of Contents ## * [Primitive Types](#PrimitiveTypes) * [Boolean](#PrimitiveTypesBoolean) -* [Int8 / Int16 / Int32 / Int64](#PrimitiveTypesInt) +* [Tinyint / Smallint / Integer (Int) / Bigint](#PrimitiveTypesInt) * [Float](#PrimitiveTypesFloat) -* [Double](#PrimitiveTypesDouble) +* [Double (Double Precision)](#PrimitiveTypesDouble) * [String](#PrimitiveTypesString) * [Binary](#PrimitiveTypesBinary) * [Point](#PrimitiveTypesPoint) @@ -35,27 +35,32 @@ * [Polygon](#PrimitiveTypesPolygon) * [Date](#PrimitiveTypesDate) * [Time](#PrimitiveTypesTime) -* [Datetime](#PrimitiveTypesDateTime) -* [Duration/Year-month-duration/Day-time-duration](#PrimitiveTypesDuration) +* [Datetime (Timestamp)](#PrimitiveTypesDateTime) +* [Duration/Year_month_duration/Day_time_duration](#PrimitiveTypesDuration) * [Interval](#PrimitiveTypesInterval) * [UUID](#PrimitiveTypesUUID) +* [Special Types] (#SpecialTypes) +* [Null](#SpecialTypesNull) +* [Missing](#SpecialTypesMissing) * [Derived Types](#DerivedTypes) * [Record](#DerivedTypesRecord) -* [OrderedList](#DerivedTypesOrderedList) -* [UnorderedList](#DerivedTypesUnorderedList) +* [Array](#DerivedTypesArray) +* [Multiset](#DerivedTypesMultiset) -An instance of Asterix data model (ADM) can be a _*primitive type*_ (`int32`, `int64`, `string`, `float`, `double`, `date`, `time`, `datetime`, etc. or `null`) or a _*derived type*_. +An instance of Asterix data model (ADM) can be a _*primitive type*_ (`boolean`, +`tinyint`, `smallint`, `integer`, `bigint`, `string`, `float`, `double`, `date`, +`time`, `datetime`, etc.), a _*special type*_ (`null` or `missing`), or a _*derived type*_. -## Primitive Types [Back to TOC] ## +The type names are case-insensitive, e.g., both `BIGINT` and `bigint` are acceptable. -### Boolean[Back to TOC] ### +## Primitive Types## + +### Boolean ### `boolean` data type can have one of the two values: _*true*_ or _*false*_. * Example: -let $t := true -let $f := false -return { "true": $t, "false": $f } +{ "true": true, "false": false }; * The expected result is: @@ -64,70 +69,61 @@ -### Int8 / Int16 / Int32 / Int64 [Back to TOC] ### +### Tinyint / Smallint / Integer (Int) / Bigint ### Integer types using 8, 16, 32, or 64 bits. The ranges of these types are: -- `int8`: -127 to 127 -- `int16`: -32767 to 32767 -- `int32`: -2147483647 to 2147483647 -- `int64`: -9223372036854775808 to 9223372036854775807 +- `tinyint`: -127 to 127 +- `smallint`: -32767 to 32767 +- `integer`: -2147483647 to 2147483647 +- `bigint`: -9223372036854775808 to 9223372036854775807 + +`int` is an abbreviated alias for integer. * Example: -let $v8 := int8("125") -let $v16 := int16("32765") -let $v32 := 294967295 -let $v64 := int64("170") -return { "int8": $v8, "int16": $v16, "int32": $v32, "int64": $v64} +{ "tinyint": tiny("125"), "smallint": smallint("32765"), "integer": 294967295, "bigint": bigint("170")}; * The expected result is: -{ "int8": 125i8, "int16": 32765i16, "int32": 294967295, "int64": 170i64 } +{ "tinyint": 125, "smallint": 32765, "integer":