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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0.0
    • 1.0.1, 1.1.0
    • SQL
    • None

    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

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

              Dates

                Created:
                Updated:
                Resolved: