Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1652

Allow GROUPING to have multiple arguments, like GROUPING_ID

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.12.0
    • Component/s: None
    • Labels:
      None

      Description

      When initially added to the SQL standard GROUPING took one argument, a column reference. Now it can have multiple arguments, like the GROUPING_ID function.

      In SQL standard 2014, see section 6.9 <set function specification>, and feature T433, "Multiargument GROUPING function".

      This change would extend GROUPING to allow one or more arguments (i.e. what GROUPING_ID currently does), and make GROUPING_ID a synonym for GROUPING. GROUP_ID is not affected, and continues to take zero arguments.

        Issue Links

          Activity

          Show
          julianhyde Julian Hyde added a comment - Jesus Camacho Rodriguez , Can you please review https://github.com/julianhyde/calcite/commit/f31d7550e6cbc6fe486b818bd1bcf059fb862b6f .
          Hide
          jcamachorodriguez Jesus Camacho Rodriguez added a comment -

          Changes LGTM Julian Hyde, +1.

          I have updated the description of the issue: GROUPING function accepts 'one or more' arguments instead of 'zero or more'.

          Show
          jcamachorodriguez Jesus Camacho Rodriguez added a comment - Changes LGTM Julian Hyde , +1. I have updated the description of the issue: GROUPING function accepts 'one or more' arguments instead of 'zero or more'.
          Hide
          julianhyde Julian Hyde added a comment -

          You're right. I was mistaken. GROUPING (and GROUPING_ID) accepts 1 or more arguments.

          Show
          julianhyde Julian Hyde added a comment - You're right. I was mistaken. GROUPING (and GROUPING_ID) accepts 1 or more arguments.
          Show
          julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/abfcc79b .
          Hide
          julianhyde Julian Hyde added a comment -

          Resolved in release 1.12.0 (2017-03-24).

          Show
          julianhyde Julian Hyde added a comment - Resolved in release 1.12.0 (2017-03-24).

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              julianhyde Julian Hyde
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development