Yingyi Bu has posted comments on this change.

Change subject: Adding a new 101 tutorial for SQL++.
......................................................................


Patch Set 1:

(4 comments)

https://asterix-gerrit.ics.uci.edu/#/c/1131/1/asterixdb/asterix-doc/src/site/markdown/sqlpp/primer-sqlpp.md
File asterixdb/asterix-doc/src/site/markdown/sqlpp/primer-sqlpp.md:

Line 194:         SELECT VALUE ds FROM Metadata.`Dataset` ds;
> why there are two `ds` here?
The first ds is an alias (i.e., variable) reference while the second is a 
binding alias (i.e., variable) definition.  This query is equivalent to

for $ds in dataset Metadata.Dataset
return $ds;

(There are two $ds's in the AQL query:-))


Line 195:         SELECT VALUE ix FROM Metadata.`Index` ix;
> why are we using backquote?
Backticks are used for delimited identifiers, as double-quoted strings are 
pervasive in the JSON world...


Line 434:         SELECT user.name AS uname, msg.message AS message
> why we don't have VALUE if accessing the field?
SELECT VALUE (the two keywords together) is similar to "return" in AQL, and 
SQL-styte SELECT is similar to "return {...}" in AQL.

Here is a brief explanation:
https://ci.apache.org/projects/asterixdb/sqlpp/manual.html#Select_clauses


Line 532:         { "uname": "IsbelDull", "message": " like t-mobile its 
platform is mind-blowing" }
> what would be the result be if the select without `AS` ? 
For this query, the result stays the same.

Here is a brief explanation:
https://ci.apache.org/projects/asterixdb/sqlpp/manual.html#Unnamed_projections


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I299b4947b928f301e8fdca8522d9a9f1e6a772cb
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Carey <[email protected]>
Gerrit-Reviewer: Ian Maxon <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Jianfeng Jia <[email protected]>
Gerrit-Reviewer: Taewoo Kim <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>
Gerrit-HasComments: Yes

Reply via email to