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

Spark SQL DSL support for simple aggregations such as SUM and AVG

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.1, 1.1.0
    • Component/s: SQL
    • Labels:
      None
    • Target Version/s:

      Description

      Inspired by this thread (http://apache-spark-user-list.1001560.n3.nabble.com/Patterns-for-making-multiple-aggregations-in-one-pass-td7874.html): Spark SQL doesn't seem to have DSL support for simple aggregations such as AVG and SUM. It'd be nice if the user could avoid writing a SQL query and instead write something like:

      data.select('country, 'age.avg, 'hits.sum).groupBy('country).collect()
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ConcreteVitamin Zongheng Yang
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: