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()