Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-41635

GROUP BY ALL

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.4.0
    • SQL

    Description

      This patch implements GROUP BY ALL, similar to the one initially implemented in DuckDB. When specified, the analyzer automatically infers the grouping columns based on the expressions specified in the select clause: all expressions that don't include any aggregate expressions are pulled implicitly into the grouping columns. This avoids users having to specify individually the list of grouping columns in most cases.

      Examples: 

      select key, count, sum(score) from table group by all
      -- rewritten to
      select key, count, sum(score) from table group by key

      Attachments

        Activity

          People

            rxin Reynold Xin
            rxin Reynold Xin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: