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

grouping set throws NPE

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0, 2.0.1
    • 2.0.3, 2.1.0
    • SQL
    • None

    Description

      spark sql grouping sets throws NullPointerException.
      This problem can be recreated using the following lines of code:
      case class point(a:String, b:String, c:String)
      val data = Seq(
      point("1","2","3"),
      point("4","5","6"),
      point("7","8","9")
      )
      sc.parallelize(data).toDF().registerTempTable("table")
      spark.sql("select a, b, count(c) from table group by a, b GROUPING SETS (()) ").show()

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Yang Wang Yang Wang
            Yang Wang Yang Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment