GitHub user hvanhovell opened a pull request: https://github.com/apache/spark/pull/16873
[SPARK-19509][SQL] Grouping Sets do not respect nullable grouping columns ## What changes were proposed in this pull request? The analyzer currently does not check if a column used in grouping sets is actually nullable itself. This can cause the nullability of the column to be incorrect, which can cause null pointer exceptions down the line. This PR fixes that by also consider the nullability of the column. This is only a problem for Spark 2.1 and below. The latest master uses a different approach. ## How was this patch tested? Added a regression test to `SQLQueryTestSuite.grouping_set`. You can merge this pull request into a Git repository by running: $ git pull https://github.com/hvanhovell/spark SPARK-19509 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/16873.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #16873 ---- commit b54ef732d9b6a680bc73f3a27e7fed68df75c68c Author: Herman van Hovell <hvanhov...@databricks.com> Date: 2017-02-09T12:45:42Z Grouping set should respect nullability of input. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org