Change in asterixdb[master]: Polish the SQL++ reference doc.

2016-11-23 Thread Yingyi Bu (Code Review)
Yingyi Bu has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1358

Change subject: Polish the SQL++ reference doc.
..

Polish the SQL++ reference doc.

Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
---
M asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md
M asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
2 files changed, 41 insertions(+), 24 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/58/1358/1

diff --git a/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md 
b/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md
index f3d4311..3fb3121 100644
--- a/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md
+++ b/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md
@@ -286,9 +286,8 @@
 FloatLiteral   ::=  ( "f" | "F" )
  |  ( "."  ( "f" | "F" ) )?
  | "."  ( "f" | "F" )
-DoubleLiteral  ::= 
- |  ( "."  )?
- | "." 
+DoubleLiteral  ::=  "." 
+   | "." 
 
 Literals (constants) in SQL++ can be strings, integers, floating point values, 
double values, boolean constants, or special constant values like `NULL` and 
`MISSING`. The `NULL` value is like a `NULL` in SQL; it is used to represent an 
unknown field value. The specialy value `MISSING` is only meaningful in the 
context of SQL++ field accesses; it occurs when the accessed field simply does 
not exist at all in a object being accessed.
 
diff --git a/asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md 
b/asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
index dc760ba..ed4a8d0 100644
--- a/asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
+++ b/asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
@@ -96,6 +96,19 @@
 ### SELECT VALUE Clause
 The `SELECT VALUE` clause in SQL++ returns a collection that contains the 
results of evaluating the `VALUE` expression, with one evaluation being 
performed per "binding tuple" (i.e., per `FROM` clause item) satisfying the 
statement's selection criteria.
 For historical reasons SQL++ also allows the keywords `ELEMENT` or `RAW` to be 
used in place of `VALUE` (not recommended).
+
+The following example shows a standard-alone SELECT.
+
+# Example
+
+SELECT VALUE 1;
+
+This query return:
+
+[
+  1
+]
+
 The following example shows a query that selects one user from the 
GleambookUsers collection.
 
 # Example
@@ -745,9 +758,10 @@
 
 # Example
 
-SELECT uid, (SELECT VALUE m.msg FROM msgs m) AS msgs
-FROM GleambookMessages message
-GROUP BY message.authorId AS uid GROUP AS msgs(message AS msg);
+   SELECT uid, (SELECT VALUE g.msg FROM g) AS msgs
+   FROM GleambookMessages gbm
+   GROUP BY gbm.authorId AS uid
+   GROUP AS g(gbm as msg);
 
 This variant of the example query returns:
 
@@ -835,9 +849,10 @@
 
 # Example
 
-SELECT uid, msg AS msgs
-FROM GleambookMessages message
-GROUP BY message.authorId AS uid GROUP AS msgs(message AS msg);
+   SELECT uid, msg AS msgs
+   FROM GleambookMessages gbm
+   GROUP BY gbm.authorId AS uid
+   GROUP AS g(gbm as msg);
 
 This variant of the query exploits a bit of SQL-style "syntactic sugar" that 
SQL++ offers to shorten some user queries.
 In particular, in the `SELECT` list, the reference to the `GROUP` variable 
field `msg` -- because it references a field of the group variable -- is 
allowed but is "pluralized". As a result, the `msg` reference in the `SELECT` 
list is
@@ -849,13 +864,14 @@
 # Example
 
 SELECT uid,
-   (SELECT VALUE m.msg
-FROM msgs m
-WHERE m.msg.message LIKE '% like%'
-ORDER BY m.msg.messageId
+   (SELECT VALUE g.msg
+FROM g
+WHERE g.msg.message LIKE '% like%'
+ORDER BY g.msg.messageId
 LIMIT 2) AS msgs
-FROM GleambookMessages message
-GROUP BY message.authorId AS uid GROUP AS msgs(message AS msg);
+FROM GleambookMessages gbm
+GROUP BY gbm.authorId AS uid
+GROUP AS g(gbm as msg);
 
 This example query returns:
 
@@ -912,14 +928,15 @@
 
 # Example
 
-SELECT authorId,
-   (SELECT VALUE g.msg
-FROM g
-WHERE g.msg.message LIKE '% like%'
-ORDER BY g.msg.messageId
-LIMIT 2) AS msgs
-FROM GleambookMessages gbm
-GROUP BY gbm.authorId GROUP AS g(gbm as msg);
+SELECT authorId,
+   (SELECT VALUE g.msg
+FROM g
+WHERE g.msg.message LIKE '% like%'
+ORDER BY g.msg.messageId
+LIMIT 2) AS msgs
+FROM GleambookMessages gbm
+GROUP BY gbm.authorId
+GROUP AS g(gbm as msg);
 
 This query returns:
 
@@ -1020,7 +1037,7 @@
 
 ### Aggregation functions
 In traditional SQL, which doesn't support nested data, grouping always also 
involves the use 

Change in asterixdb[master]: Polish the SQL++ reference doc.

2016-11-23 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Polish the SQL++ reference doc.
..


Patch Set 1:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/3353/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1358
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-HasComments: No


Change in asterixdb[master]: Polish the SQL++ reference doc.

2016-11-23 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Polish the SQL++ reference doc.
..


Patch Set 2:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/3354/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1358
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-HasComments: No


Change in asterixdb[master]: Polish the SQL++ reference doc.

2016-11-23 Thread Yingyi Bu (Code Review)
Yingyi Bu has uploaded a new patch set (#2).

Change subject: Polish the SQL++ reference doc.
..

Polish the SQL++ reference doc.

Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
---
M asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md
M asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
2 files changed, 41 insertions(+), 24 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/58/1358/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1358
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 


Change in asterixdb[master]: Polish the SQL++ reference doc.

2016-11-23 Thread Till Westmann (Code Review)
Till Westmann has posted comments on this change.

Change subject: Polish the SQL++ reference doc.
..


Patch Set 2:

(3 comments)

https://asterix-gerrit.ics.uci.edu/#/c/1358/2/asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
File asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md:

Line 761:SELECT uid, (SELECT VALUE g.msg FROM g) AS msgs
Why this indentation change?


Line 852:SELECT uid, msg AS msgs
Why this indentation change?


Line 931: SELECT authorId,
Why this indentation change?


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1358
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-HasComments: Yes


Change in asterixdb[master]: Polish the SQL++ reference doc.

2016-11-23 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Polish the SQL++ reference doc.
..


Patch Set 2:

Integration Tests Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/1168/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1358
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-HasComments: No


Change in asterixdb[master]: Polish the SQL++ reference doc.

2016-11-23 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Polish the SQL++ reference doc.
..


Patch Set 2: Integration-Tests+1

Integration Tests Successful

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/1168/ 
: SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1358
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-HasComments: No


Change in asterixdb[master]: Polish the SQL++ reference doc.

2016-11-23 Thread Yingyi Bu (Code Review)
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/1358

to look at the new patch set (#3).

Change subject: Polish the SQL++ reference doc.
..

Polish the SQL++ reference doc.

Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
---
M asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md
M asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
2 files changed, 38 insertions(+), 21 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/58/1358/3
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1358
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 


Change in asterixdb[master]: Polish the SQL++ reference doc.

2016-11-23 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Polish the SQL++ reference doc.
..


Patch Set 3:

Build Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/3355/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1358
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-HasComments: No


Change in asterixdb[master]: Polish the SQL++ reference doc.

2016-11-23 Thread Yingyi Bu (Code Review)
Yingyi Bu has posted comments on this change.

Change subject: Polish the SQL++ reference doc.
..


Patch Set 2:

(3 comments)

https://asterix-gerrit.ics.uci.edu/#/c/1358/2/asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
File asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md:

Line 761:SELECT uid, (SELECT VALUE g.msg FROM g) AS msgs
> Why this indentation change?
Done


Line 852:SELECT uid, msg AS msgs
> Why this indentation change?
Done


Line 931: SELECT authorId,
> Why this indentation change?
Done


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1358
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-HasComments: Yes


Change in asterixdb[master]: Polish the SQL++ reference doc.

2016-11-23 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Polish the SQL++ reference doc.
..


Patch Set 3:

Integration Tests Started 
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/1169/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1358
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-HasComments: No


Change in asterixdb[master]: Polish the SQL++ reference doc.

2016-11-23 Thread Till Westmann (Code Review)
Till Westmann has posted comments on this change.

Change subject: Polish the SQL++ reference doc.
..


Patch Set 3: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1358
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-HasComments: No


Change in asterixdb[master]: Polish the SQL++ reference doc.

2016-11-23 Thread Yingyi Bu (Code Review)
Yingyi Bu has submitted this change and it was merged.

Change subject: Polish the SQL++ reference doc.
..


Polish the SQL++ reference doc.

Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1358
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Reviewed-by: Till Westmann 
---
M asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md
M asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
2 files changed, 38 insertions(+), 21 deletions(-)

Approvals:
  Till Westmann: Looks good to me, approved
  Jenkins: Verified; No violations found



diff --git a/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md 
b/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md
index f3d4311..3fb3121 100644
--- a/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md
+++ b/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md
@@ -286,9 +286,8 @@
 FloatLiteral   ::=  ( "f" | "F" )
  |  ( "."  ( "f" | "F" ) )?
  | "."  ( "f" | "F" )
-DoubleLiteral  ::= 
- |  ( "."  )?
- | "." 
+DoubleLiteral  ::=  "." 
+   | "." 
 
 Literals (constants) in SQL++ can be strings, integers, floating point values, 
double values, boolean constants, or special constant values like `NULL` and 
`MISSING`. The `NULL` value is like a `NULL` in SQL; it is used to represent an 
unknown field value. The specialy value `MISSING` is only meaningful in the 
context of SQL++ field accesses; it occurs when the accessed field simply does 
not exist at all in a object being accessed.
 
diff --git a/asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md 
b/asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
index dc760ba..b90eb06 100644
--- a/asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
+++ b/asterixdb/asterix-doc/src/main/markdown/sqlpp/3_query.md
@@ -96,6 +96,19 @@
 ### SELECT VALUE Clause
 The `SELECT VALUE` clause in SQL++ returns a collection that contains the 
results of evaluating the `VALUE` expression, with one evaluation being 
performed per "binding tuple" (i.e., per `FROM` clause item) satisfying the 
statement's selection criteria.
 For historical reasons SQL++ also allows the keywords `ELEMENT` or `RAW` to be 
used in place of `VALUE` (not recommended).
+
+The following example shows a standard-alone `SELECT VALUE`, which wraps a 
value into an array.
+
+# Example
+
+SELECT VALUE 1;
+
+This query return:
+
+[
+  1
+]
+
 The following example shows a query that selects one user from the 
GleambookUsers collection.
 
 # Example
@@ -745,9 +758,10 @@
 
 # Example
 
-SELECT uid, (SELECT VALUE m.msg FROM msgs m) AS msgs
-FROM GleambookMessages message
-GROUP BY message.authorId AS uid GROUP AS msgs(message AS msg);
+SELECT uid, (SELECT VALUE g.msg FROM g) AS msgs
+FROM GleambookMessages gbm
+GROUP BY gbm.authorId AS uid
+GROUP AS g(gbm as msg);
 
 This variant of the example query returns:
 
@@ -836,8 +850,9 @@
 # Example
 
 SELECT uid, msg AS msgs
-FROM GleambookMessages message
-GROUP BY message.authorId AS uid GROUP AS msgs(message AS msg);
+FROM GleambookMessages gbm
+GROUP BY gbm.authorId AS uid
+GROUP AS g(gbm as msg);
 
 This variant of the query exploits a bit of SQL-style "syntactic sugar" that 
SQL++ offers to shorten some user queries.
 In particular, in the `SELECT` list, the reference to the `GROUP` variable 
field `msg` -- because it references a field of the group variable -- is 
allowed but is "pluralized". As a result, the `msg` reference in the `SELECT` 
list is
@@ -849,13 +864,14 @@
 # Example
 
 SELECT uid,
-   (SELECT VALUE m.msg
-FROM msgs m
-WHERE m.msg.message LIKE '% like%'
-ORDER BY m.msg.messageId
+   (SELECT VALUE g.msg
+FROM g
+WHERE g.msg.message LIKE '% like%'
+ORDER BY g.msg.messageId
 LIMIT 2) AS msgs
-FROM GleambookMessages message
-GROUP BY message.authorId AS uid GROUP AS msgs(message AS msg);
+FROM GleambookMessages gbm
+GROUP BY gbm.authorId AS uid
+GROUP AS g(gbm as msg);
 
 This example query returns:
 
@@ -913,13 +929,14 @@
 # Example
 
 SELECT authorId,
-   (SELECT VALUE g.msg
-FROM g
-WHERE g.msg.message LIKE '% like%'
-ORDER BY g.msg.messageId
-LIMIT 2) AS msgs
+   (SELECT VALUE g.msg
+FROM g
+WHERE g.msg.message LIKE '% like%'
+ORDER BY g.msg.messageId
+LIMIT 2) AS msgs
 FROM GleambookMessages gbm
-GROUP BY gbm.authorId GROUP AS g(gbm as msg);
+GROUP BY gbm.authorId
+GROUP AS g(gbm as msg);
 
 This query returns:
 
@@ -1020,7 +1037,7 @@
 
 ### Aggregation functions
 In traditional SQL, which doesn't support nested data, grouping always also 
i

Change in asterixdb[master]: Polish the SQL++ reference doc.

2016-11-23 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Polish the SQL++ reference doc.
..


Patch Set 3:

Integration Tests Successful

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/1169/ 
: SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1358
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb3cc23ebbf9e390d6eabf9386b15550aa5d6d43
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Yingyi Bu 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Till Westmann 
Gerrit-Reviewer: Yingyi Bu 
Gerrit-HasComments: No