Skip to content

Conversation

@hvanhovell
Copy link
Contributor

@hvanhovell hvanhovell commented Feb 9, 2017

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.

Closes #16874

How was this patch tested?

Added a regression test to SQLQueryTestSuite.grouping_set.

@hvanhovell
Copy link
Contributor Author

cc @cloud-fan @jiangxb1987

@hvanhovell
Copy link
Contributor Author

also cc @stanzhai

@SparkQA
Copy link

SparkQA commented Feb 9, 2017

Test build #72645 has finished for PR 16873 at commit b54ef73.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.



DROP VIEW IF EXISTS grouping;
DROP VIEW IF EXISTS grouping_null;
Copy link
Contributor

@jiangxb1987 jiangxb1987 Feb 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Should we leave an extra empty line for the end of this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah lemme fix that.

@jiangxb1987
Copy link
Contributor

Thank you for ccing me @hvanhovell ! This PR looks good to me.

@SparkQA
Copy link

SparkQA commented Feb 9, 2017

Test build #72653 has finished for PR 16873 at commit d85aed7.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@hvanhovell
Copy link
Contributor Author

I am merging this.

asfgit pushed a commit that referenced this pull request Feb 9, 2017
…umns

## 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.

Closes #16874

## How was this patch tested?
Added a regression test to `SQLQueryTestSuite.grouping_set`.

Author: Herman van Hovell <[email protected]>

Closes #16873 from hvanhovell/SPARK-19509.
asfgit pushed a commit that referenced this pull request Feb 9, 2017
…umns

## 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.

Closes #16874

## How was this patch tested?
Added a regression test to `SQLQueryTestSuite.grouping_set`.

Author: Herman van Hovell <[email protected]>

Closes #16873 from hvanhovell/SPARK-19509.

(cherry picked from commit a3d5300)
Signed-off-by: Herman van Hovell <[email protected]>
@hvanhovell hvanhovell closed this Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants