Change in asterixdb[master]: Address Don's comments in the expression doc.
Yingyi Bu has posted comments on this change. Change subject: Address Don's comments in the expression doc. .. Patch Set 2: Code-Review+2 Fwd Till's +2. -- To view, visit https://asterix-gerrit.ics.uci.edu/1327 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 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]: Address Don's comments in the expression doc.
Yingyi Bu has posted comments on this change. Change subject: Address Don's comments in the expression doc. .. Patch Set 2: Fwd +2. -- To view, visit https://asterix-gerrit.ics.uci.edu/1327 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 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]: Address Don's comments in the expression doc.
Yingyi Bu has submitted this change and it was merged. Change subject: Address Don's comments in the expression doc. .. Address Don's comments in the expression doc. Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 Reviewed-on: https://asterix-gerrit.ics.uci.edu/1327 Sonar-Qube: JenkinsTested-by: Jenkins Integration-Tests: Jenkins Reviewed-by: Yingyi Bu --- M asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md M asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md M asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj 3 files changed, 224 insertions(+), 162 deletions(-) Approvals: Yingyi Bu: Looks good to me, approved Jenkins: Verified; No violations found; Verified 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 b04ea6a..ff31357 100644 --- a/asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md +++ b/asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md @@ -23,13 +23,6 @@ * [1. Introduction](#Introduction) * [2. Expressions](#Expressions) - * [Primary expressions](#Primary_expressions) - * [Literals](#Literals) - * [Variable references](#Variable_references) - * [Parenthesized expressions](#Parenthesized_expressions) - * [Function call expressions](#Function_call_expressions) - * [Constructors](#Constructors) - * [Path expressions](#Path_expressions) * [Operator expressions](#Operator_expressions) * [Arithmetic operators](#Arithmetic_operators) * [Collection operators](#Collection_operators) @@ -37,6 +30,13 @@ * [Logical operators](#Logical_operators) * [Case expressions](#Case_expressions) * [Quantified expressions](#Quantified_expressions) + * [Path expressions](#Path_expressions) + * [Primary expressions](#Primary_expressions) + * [Literals](#Literals) + * [Variable references](#Variable_references) + * [Parenthesized expressions](#Parenthesized_expressions) + * [Function call expressions](#Function_call_expressions) + * [Constructors](#Constructors) * [3. Queries](#Queries) * [SELECT statements](#SELECT_statements) * [SELECT clauses](#Select_clauses) 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 17cf9bf..f3d4311 100644 --- a/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md +++ b/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md @@ -21,152 +21,16 @@ Expression ::= OperatorExpression | CaseExpression | QuantifiedExpression -SQL++ is a highly composable expression language. Each SQL++ expression returns zero or more data model instances. There are three major kinds of expressions in SQL++. At the topmost level, a SQL++ expression can be an OperatorExpression (similar to a mathematical expression), an ConditionalExpression (to choose between alternative values), or a QuantifiedExpression (which yields a boolean value). Each will be detailed as we explore the full SQL++ grammar. +SQL++ is a highly composable expression language. Each SQL++ expression returns zero or more data model instances. +There are three major kinds of expressions in SQL++. At the topmost level, a SQL++ expression can be an +OperatorExpression (similar to a mathematical expression), an ConditionalExpression (to choose between +alternative values), or a QuantifiedExpression (which yields a boolean value). Each will be detailed as we +explore the full SQL++ grammar. -## Primary Expressions +Note that in the following text, words enclosed in angle brackets denote keywords that are not case-sensitive. -PrimaryExpr ::= Literal - | VariableReference - | ParenthesizedExpression - | FunctionCallExpression - | Constructor -The most basic building block for any SQL++ expression is PrimaryExpression. This can be a simple literal (constant) -value, a reference to a query variable that is in scope, a parenthesized expression, a function call, or a newly -constructed instance of the data model (such as a newly constructed object, array, or multiset of data model instances). - -### Literals - -Literal::= StringLiteral - | IntegerLiteral - | FloatLiteral - | DoubleLiteral - | - | - | - | -StringLiteral ::= "\'" ( | ~["\'"])* "\'" - | "\"" ( | ~["\'"])* "\"" - ::= "\\\'" - ::= "\\\"" -IntegerLiteral ::= - ::= ["0" - "9"]+ -
Change in asterixdb[master]: Address Don's comments in the expression doc.
Jenkins has posted comments on this change. Change subject: Address Don's comments in the expression doc. .. Patch Set 2: Integration-Tests+1 Integration Tests Successful https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/1112/ : SUCCESS -- To view, visit https://asterix-gerrit.ics.uci.edu/1327 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 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]: Address Don's comments in the expression doc.
Jenkins has posted comments on this change. Change subject: Address Don's comments in the expression doc. .. Patch Set 2: Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/1112/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1327 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 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]: Address Don's comments in the expression doc.
Jenkins has posted comments on this change. Change subject: Address Don's comments in the expression doc. .. Patch Set 2: Integration-Tests-1 Integration Tests Timed Out https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests// : ABORTED -- To view, visit https://asterix-gerrit.ics.uci.edu/1327 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 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]: Address Don's comments in the expression doc.
Jenkins has posted comments on this change. Change subject: Address Don's comments in the expression doc. .. Patch Set 2: Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/3273/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1327 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 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]: Address Don's comments in the expression doc.
Hello Till Westmann, Jenkins, I'd like you to reexamine a change. Please visit https://asterix-gerrit.ics.uci.edu/1327 to look at the new patch set (#2). Change subject: Address Don's comments in the expression doc. .. Address Don's comments in the expression doc. Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 --- M asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md M asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md M asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj 3 files changed, 224 insertions(+), 162 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/27/1327/2 -- To view, visit https://asterix-gerrit.ics.uci.edu/1327 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-Reviewer: Yingyi Bu
Change in asterixdb[master]: Address Don's comments in the expression doc.
Till Westmann has posted comments on this change. Change subject: Address Don's comments in the expression doc. .. Patch Set 1: Code-Review+2 -- To view, visit https://asterix-gerrit.ics.uci.edu/1327 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 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: No
Change in asterixdb[master]: Address Don's comments in the expression doc.
Yingyi Bu has posted comments on this change. Change subject: Address Don's comments in the expression doc. .. Patch Set 1: (1 comment) https://asterix-gerrit.ics.uci.edu/#/c/1327/1/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md File asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md: Line 196: A type error will be raised if the first expression in a quantified expression does not return a collection. > How is this done in other languages? I think that XQuery/JSONiq would not c AQL does the same as SQL++. N1QL does implicit scalar to singleton coercion. -- To view, visit https://asterix-gerrit.ics.uci.edu/1327 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 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]: Address Don's comments in the expression doc.
Till Westmann has posted comments on this change. Change subject: Address Don's comments in the expression doc. .. Patch Set 1: (1 comment) https://asterix-gerrit.ics.uci.edu/#/c/1327/1/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md File asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md: Line 196: A type error will be raised if the first expression in a quantified expression does not return a collection. How is this done in other languages? I think that XQuery/JSONiq would not care. Do you know what AQL and N1QL do in this case? -- To view, visit https://asterix-gerrit.ics.uci.edu/1327 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 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]: Address Don's comments in the expression doc.
Jenkins has posted comments on this change. Change subject: Address Don's comments in the expression doc. .. Patch Set 1: Integration-Tests+1 Integration Tests Successful https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/1054/ : SUCCESS -- To view, visit https://asterix-gerrit.ics.uci.edu/1327 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-HasComments: No
Change in asterixdb[master]: Address Don's comments in the expression doc.
Jenkins has posted comments on this change. Change subject: Address Don's comments in the expression doc. .. Patch Set 1: Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/1054/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1327 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-HasComments: No
Change in asterixdb[master]: Address Don's comments in the expression doc.
Jenkins has posted comments on this change. Change subject: Address Don's comments in the expression doc. .. Patch Set 1: Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/3202/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1327 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi BuGerrit-Reviewer: Jenkins Gerrit-HasComments: No
Change in asterixdb[master]: Address Don's comments in the expression doc.
Yingyi Bu has uploaded a new change for review. https://asterix-gerrit.ics.uci.edu/1327 Change subject: Address Don's comments in the expression doc. .. Address Don's comments in the expression doc. Change-Id: I224a706aa987a0d938ab22b9ae28660ef6433991 --- M asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md M asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md M asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj 3 files changed, 224 insertions(+), 162 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/27/1327/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 b04ea6a..ff31357 100644 --- a/asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md +++ b/asterixdb/asterix-doc/src/main/markdown/sqlpp/0_toc.md @@ -23,13 +23,6 @@ * [1. Introduction](#Introduction) * [2. Expressions](#Expressions) - * [Primary expressions](#Primary_expressions) - * [Literals](#Literals) - * [Variable references](#Variable_references) - * [Parenthesized expressions](#Parenthesized_expressions) - * [Function call expressions](#Function_call_expressions) - * [Constructors](#Constructors) - * [Path expressions](#Path_expressions) * [Operator expressions](#Operator_expressions) * [Arithmetic operators](#Arithmetic_operators) * [Collection operators](#Collection_operators) @@ -37,6 +30,13 @@ * [Logical operators](#Logical_operators) * [Case expressions](#Case_expressions) * [Quantified expressions](#Quantified_expressions) + * [Path expressions](#Path_expressions) + * [Primary expressions](#Primary_expressions) + * [Literals](#Literals) + * [Variable references](#Variable_references) + * [Parenthesized expressions](#Parenthesized_expressions) + * [Function call expressions](#Function_call_expressions) + * [Constructors](#Constructors) * [3. Queries](#Queries) * [SELECT statements](#SELECT_statements) * [SELECT clauses](#Select_clauses) 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 17cf9bf..f3d4311 100644 --- a/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md +++ b/asterixdb/asterix-doc/src/main/markdown/sqlpp/2_expr.md @@ -21,152 +21,16 @@ Expression ::= OperatorExpression | CaseExpression | QuantifiedExpression -SQL++ is a highly composable expression language. Each SQL++ expression returns zero or more data model instances. There are three major kinds of expressions in SQL++. At the topmost level, a SQL++ expression can be an OperatorExpression (similar to a mathematical expression), an ConditionalExpression (to choose between alternative values), or a QuantifiedExpression (which yields a boolean value). Each will be detailed as we explore the full SQL++ grammar. +SQL++ is a highly composable expression language. Each SQL++ expression returns zero or more data model instances. +There are three major kinds of expressions in SQL++. At the topmost level, a SQL++ expression can be an +OperatorExpression (similar to a mathematical expression), an ConditionalExpression (to choose between +alternative values), or a QuantifiedExpression (which yields a boolean value). Each will be detailed as we +explore the full SQL++ grammar. -## Primary Expressions +Note that in the following text, words enclosed in angle brackets denote keywords that are not case-sensitive. -PrimaryExpr ::= Literal - | VariableReference - | ParenthesizedExpression - | FunctionCallExpression - | Constructor -The most basic building block for any SQL++ expression is PrimaryExpression. This can be a simple literal (constant) -value, a reference to a query variable that is in scope, a parenthesized expression, a function call, or a newly -constructed instance of the data model (such as a newly constructed object, array, or multiset of data model instances). - -### Literals - -Literal::= StringLiteral - | IntegerLiteral - | FloatLiteral - | DoubleLiteral - | - | - | - | -StringLiteral ::= "\'" ( | ~["\'"])* "\'" - | "\"" ( | ~["\'"])* "\"" - ::= "\\\'" - ::= "\\\"" -IntegerLiteral ::= - ::= ["0" - "9"]+ -FloatLiteral ::= ( "f" | "F" ) - | ( "." ( "f" | "F" ) )? - | "." ( "f" | "F" ) -DoubleLiteral ::= - | ( "." )? - | "." - -Literals (constants) in SQL++ can be strings,