Return-Path: X-Original-To: apmail-calcite-commits-archive@www.apache.org Delivered-To: apmail-calcite-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 09F0E19151 for ; Sun, 17 Apr 2016 21:26:15 +0000 (UTC) Received: (qmail 94598 invoked by uid 500); 17 Apr 2016 21:26:15 -0000 Delivered-To: apmail-calcite-commits-archive@calcite.apache.org Received: (qmail 94569 invoked by uid 500); 17 Apr 2016 21:26:15 -0000 Mailing-List: contact commits-help@calcite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@calcite.apache.org Delivered-To: mailing list commits@calcite.apache.org Received: (qmail 94558 invoked by uid 99); 17 Apr 2016 21:26:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Apr 2016 21:26:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 69260C0C74 for ; Sun, 17 Apr 2016 21:26:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1 X-Spam-Level: * X-Spam-Status: No, score=1 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001, WEIRD_QUOTING=0.001] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id lmJlWCj3fbZd for ; Sun, 17 Apr 2016 21:26:10 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTP id E1D805FAF6 for ; Sun, 17 Apr 2016 21:26:09 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 2D807E5853 for ; Sun, 17 Apr 2016 21:26:07 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 13F663A17E2 for ; Sun, 17 Apr 2016 21:26:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1739659 [15/18] - in /calcite/site: ./ avatica/ avatica/community/ avatica/develop/ avatica/docs/ avatica/downloads/ avatica/news/ avatica/news/2016/03/03/separate-project/ avatica/news/2016/03/18/release-1.7.1/ avatica/news/releases/ comm... Date: Sun, 17 Apr 2016 21:26:05 -0000 To: commits@calcite.apache.org From: elserj@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160417212607.13F663A17E2@svn01-us-west.apache.org> Modified: calcite/site/docs/reference.html URL: http://svn.apache.org/viewvc/calcite/site/docs/reference.html?rev=1739659&r1=1739658&r2=1739659&view=diff ============================================================================== --- calcite/site/docs/reference.html (original) +++ calcite/site/docs/reference.html Sun Apr 17 21:26:04 2016 @@ -4,7 +4,7 @@ SQL language - + @@ -816,7 +816,7 @@

SQL grammar in BNF-like form.

-
statement:
+
statement:
       setStatement
   |   resetStatement
   |   explain
@@ -827,7 +827,7 @@ form.

| query setStatement: - [ ALTER ( SYSTEM | SESSION ) ] SET identifier '=' expression + [ ALTER ( SYSTEM | SESSION ) ] SET identifier '=' expression resetStatement: [ ALTER ( SYSTEM | SESSION ) ] RESET identifier @@ -841,7 +841,7 @@ form.

insert: ( INSERT | UPSERT ) INTO tablePrimary - [ '(' column [, column ]* ')' ] + [ '(' column [, column ]* ')' ] query update: @@ -850,14 +850,14 @@ form.

[ WHERE booleanExpression ] assign: - identifier '=' expression + identifier '=' expression merge: MERGE INTO tablePrimary [ [ AS ] alias ] USING tablePrimary ON booleanExpression [ WHEN MATCHED THEN UPDATE SET assign [, assign ]* ] - [ WHEN NOT MATCHED THEN INSERT VALUES '(' value [ , value ]* ')' ] + [ WHEN NOT MATCHED THEN INSERT VALUES '(' value [ , value ]* ')' ] delete: DELETE FROM tablePrimary [ [ AS ] alias ] @@ -878,8 +878,8 @@ form.

withItem: name - [ '(' column [, column ]* ')' ] - AS '(' query ')' + [ '(' column [, column ]* ')' ] + AS '(' query ')' orderItem: expression [ ASC | DESC ] [ NULLS FIRST | NULLS LAST ] @@ -903,30 +903,30 @@ form.

joinCondition: ON booleanExpression - | USING '(' column [, column ]* ')' + | USING '(' column [, column ]* ')' tableReference: [ LATERAL ] tablePrimary - [ [ AS ] alias [ '(' columnAlias [, columnAlias ]* ')' ] ] + [ [ AS ] alias [ '(' columnAlias [, columnAlias ]* ')' ] ] tablePrimary: [ TABLE ] [ [ catalogName . ] schemaName . ] tableName - | '(' query ')' + | '(' query ')' | values - | UNNEST '(' expression ')' [ WITH ORDINALITY ] - | TABLE '(' [ SPECIFIC ] functionName '(' expression [, expression ]* ')' ')' + | UNNEST '(' expression ')' [ WITH ORDINALITY ] + | TABLE '(' [ SPECIFIC ] functionName '(' expression [, expression ]* ')' ')' values: VALUES expression [, expression ]* groupItem: expression - | '(' ')' - | '(' expression [, expression ]* ')' - | CUBE '(' expression [, expression ]* ')' - | ROLLUP '(' expression [, expression ]* ')' - | GROUPING SETS '(' groupItem [, groupItem ]* ')' + | '(' ')' + | '(' expression [, expression ]* ')' + | CUBE '(' expression [, expression ]* ')' + | ROLLUP '(' expression [, expression ]* ')' + | GROUPING SETS '(' groupItem [, groupItem ]* ')' windowRef: windowName @@ -934,14 +934,14 @@ form.

windowSpec: [ windowName ] - '(' + '(' [ ORDER BY orderItem [, orderItem ]* ] [ PARTITION BY expression [, expression ]* ] [ RANGE numericOrIntervalExpression { PRECEDING | FOLLOWING } | ROWS numericExpression { PRECEDING | FOLLOWING } ] - ')'
+ ')'

In merge, at least one of the WHEN MATCHED and WHEN NOT MATCHED clauses must be present.

@@ -1526,11 +1526,11 @@ elements used in a SQL query.

only contain letters, digits, and underscores. They are implicitly converted to upper case.

-

Quoted identifiers, such as "Employee Name", start and end with +

Quoted identifiers, such as "Employee Name", start and end with double quotes. They may contain virtually any character, including spaces and other punctuation. If you wish to include a double quote in an identifier, use another double quote to escape it, like this: -"An employee called ""Fred"".".

+"An employee called ""Fred"".".

In Calcite, matching identifiers to the name of the referenced object is case-sensitive. But remember that unquoted identifiers are implicitly @@ -1651,8 +1651,8 @@ name will have been converted to upper c

Where:

-
timeUnit:
-  YEAR | MONTH | DAY | HOUR | MINUTE | SECOND
+
timeUnit:
+  YEAR | MONTH | DAY | HOUR | MINUTE | SECOND

Note:

@@ -2370,19 +2370,19 @@ the user or application to supply a time {fn CURDATE()} - Equivalent to CURRENT_DATE + Equivalent to CURRENT_DATE {fn CURTIME()} - Equivalent to LOCALTIME + Equivalent to LOCALTIME {fn NOW()} - Equivalent to LOCALTIMESTAMP + Equivalent to LOCALTIMESTAMP {fn QUARTER(date)} - Equivalent to EXTRACT(QUARTER FROM date). Returns an integer between 1 and 4. + Equivalent to EXTRACT(QUARTER FROM date). Returns an integer between 1 and 4. {fn TIMESTAMPADD(timeUnit, count, timestamp)} @@ -2426,14 +2426,14 @@ the user or application to supply a time

Syntax:

-
aggregateCall:
+
aggregateCall:
         agg( [ DISTINCT ] value [, value]* ) [ FILTER ( WHERE condition ) ]
-    |   agg(*) [ FILTER ( WHERE condition ) ]
+ | agg(*) [ FILTER ( WHERE condition ) ] -

If FILTER is present, the aggregate function only considers rows for which +

If FILTER is present, the aggregate function only considers rows for which condition evaluates to TRUE.

-

If DISTINCT is present, duplicate argument values are eliminated before being +

If DISTINCT is present, duplicate argument values are eliminated before being passed to the aggregate function.

@@ -2633,9 +2633,9 @@ varying from convenient to efficient.

To implement a scalar function, there are 3 options:

    -
  • Create a class with a public static eval method, +
  • Create a class with a public static eval method, and register the class;
  • -
  • Create a class with a public non-static eval method, +
  • Create a class with a public non-static eval method, and a public constructor with no arguments, and register the class;
  • Create a class with one or more public static methods, @@ -2645,14 +2645,14 @@ and register each class/method combinati

    To implement an aggregate function, there are 2 options:

      -
    • Create a class with public static init, add and result methods, +
    • Create a class with public static init, add and result methods, and register the class;
    • -
    • Create a class with public non-static init, add and result methods, +
    • Create a class with public non-static init, add and result methods, and a public constructor with no arguments, and register the class.
    -

    Optionally, add a public merge method to the class; this allows Calcite to +

    Optionally, add a public merge method to the class; this allows Calcite to generate code that merges sub-totals.

    Optionally, make your class implement the @@ -2663,12 +2663,12 @@ of aggregation, roll up from summary tab

    To implement a table function, there are 3 options:

      -
    • Create a class with a static eval method that returns +
    • Create a class with a static eval method that returns ScannableTable or QueryableTable, and register the class;
    • -
    • Create a class with a non-static eval method that returns +
    • Create a class with a non-static eval method that returns ScannableTable or QueryableTable, @@ -2683,10 +2683,10 @@ and register each class/method combinati

      To implement a table macro, there are 3 options:

        -
      • Create a class with a static eval method that returns +
      • Create a class with a static eval method that returns TranslatableTable, and register the class;
      • -
      • Create a class with a non-static eval method that returns +
      • Create a class with a non-static eval method that returns TranslatableTable, and register the class;
      • Create a class with one or more public static methods that return @@ -2710,47 +2710,47 @@ and especially if you want to add more p and to define parameters which are optional (that is, have a default value that is used if they are not specified).

        -

        Suppose you have a function f, declared as in the following pseudo syntax:

        +

        Suppose you have a function f, declared as in the following pseudo syntax:

        -

        FUNCTION f( +

        FUNCTION f( INTEGER a, INTEGER b DEFAULT NULL, INTEGER c, INTEGER d DEFAULT NULL, INTEGER e DEFAULT NULL) RETURNS INTEGER

        -

        All of the function’s parameters have names, and parameters b, d and e -have a default value of NULL and are therefore optional. -(In Calcite, NULL is the only allowable default value for optional parameters; +

        All of the function’s parameters have names, and parameters b, d and e +have a default value of NULL and are therefore optional. +(In Calcite, NULL is the only allowable default value for optional parameters; this may change in future.)

        When calling a function with optional parameters, -you can omit optional arguments at the end of the list, or use the DEFAULT +you can omit optional arguments at the end of the list, or use the DEFAULT keyword for any optional arguments. Here are some examples:

          -
        • f(1, 2, 3, 4, 5) provides a value to each parameter, in order;
        • -
        • f(1, 2, 3, 4) omits e, which gets its default value, NULL;
        • -
        • f(1, DEFAULT, 3) omits d and e, -and specifies to use the default value of b;
        • -
        • f(1, DEFAULT, 3, DEFAULT, DEFAULT) has the same effect as the previous +
        • f(1, 2, 3, 4, 5) provides a value to each parameter, in order;
        • +
        • f(1, 2, 3, 4) omits e, which gets its default value, NULL;
        • +
        • f(1, DEFAULT, 3) omits d and e, +and specifies to use the default value of b;
        • +
        • f(1, DEFAULT, 3, DEFAULT, DEFAULT) has the same effect as the previous example;
        • -
        • f(1, 2) is not legal, because c is not optional;
        • -
        • f(1, 2, DEFAULT, 4) is not legal, because c is not optional.
        • +
        • f(1, 2) is not legal, because c is not optional;
        • +
        • f(1, 2, DEFAULT, 4) is not legal, because c is not optional.
        -

        You can specify arguments by name using the => syntax. +

        You can specify arguments by name using the => syntax. If one argument is named, they all must be. Arguments may be in any other, but must not specify any argument more than once, and you need to provide a value for every parameter which is not optional. Here are some examples:

          -
        • f(c => 3, d => 1, a => 0) is equivalent to f(0, NULL, 3, 1, NULL);
        • -
        • f(c => 3, d => 1) is not legal, because you have not specified a value for -a and a is not optional.
        • +
        • f(c => 3, d => 1, a => 0) is equivalent to f(0, NULL, 3, 1, NULL);
        • +
        • f(c => 3, d => 1) is not legal, because you have not specified a value for +a and a is not optional.
        @@ -2827,74 +2827,50 @@ Here are some examples:

        - - - - - - - - - - - - - - - - - - - - - - - -
      • Background
      • @@ -2905,116 +2881,78 @@ Here are some examples:

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      • Tutorial
      • @@ -3025,20 +2963,14 @@ Here are some examples:

        - - - - - -
      • Algebra
      • @@ -3057,14 +2989,10 @@ Here are some examples:

        - - - -
      • Adapters
      • @@ -3075,104 +3003,70 @@ Here are some examples:

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      • Streaming
      • @@ -3183,80 +3077,54 @@ Here are some examples:

        - - - - - - - - - - - - - - - - - - - - - - - - - -
      • Lattices
      • @@ -3275,38 +3143,26 @@ Here are some examples:

        - - - - - - - - - - - -
      • Overview
      • @@ -3317,50 +3173,34 @@ Here are some examples:

        - - - - - - - - - - - - - - - -
      • Roadmap
      • @@ -3371,32 +3211,22 @@ Here are some examples:

        - - - - - - - - - -
      • JSON Reference
      • @@ -3407,44 +3237,30 @@ Here are some examples:

        - - - - - - - - - - - - - -
      • Protobuf Reference
      • @@ -3463,98 +3279,66 @@ Here are some examples:

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      • SQL language
      • @@ -3565,86 +3349,58 @@ Here are some examples:

        - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      • JSON models
      • @@ -3655,68 +3411,46 @@ Here are some examples:

        - - - - - - - - - - - - - - - - - - - - - -
      • HOWTO
      • @@ -3735,62 +3469,42 @@ Here are some examples:

        - - - - - - - - - - - - - - - - - - - -
      • History
      • @@ -3801,92 +3515,62 @@ Here are some examples:

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      • Powered By Calcite
      • @@ -3897,143 +3581,161 @@ Here are some examples:

        - - - - - - - - -
      • API
      • - - - - - - - - - - - + + - - - + + + - + + + - + + + - + + + - + + + - + + + + + + + + + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + -
      • Test API
      • - + + +