You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by DonnyZone <gi...@git.apache.org> on 2017/08/11 11:29:45 UTC
[GitHub] spark pull request #18919: [SPARK-19471][SQL]AggregationIterator does not in...
GitHub user DonnyZone opened a pull request:
https://github.com/apache/spark/pull/18919
[SPARK-19471][SQL]AggregationIterator does not initialize the generated result projection before using it
## What changes were proposed in this pull request?
Recently, we have also encountered such NPE issues in our production environment as introduced in:
https://issues.apache.org/jira/browse/SPARK-19471
This issue can be reproduced by the following examples:
` val df = spark.createDataFrame(Seq(("1", 1), ("1", 2), ("2", 3), ("2", 4))).toDF("x", "y")
//HashAggregate, SQLConf.WHOLESTAGE_CODEGEN_ENABLED.key=false
df.groupBy("x").agg(rand(),sum("y")).show()
//ObjectHashAggregate, SQLConf.WHOLESTAGE_CODEGEN_ENABLED.key=false
df.groupBy("x").agg(rand(),collect_list("y")).show()
//SortAggregate, SQLConf.WHOLESTAGE_CODEGEN_ENABLED.key=false &&SQLConf.USE_OBJECT_HASH_AGG.key=false
df.groupBy("x").agg(rand(),collect_list("y")).show()`
This PR is based on PR-16820(https://github.com/apache/spark/pull/16820) with test cases for all aggregation paths.
> When AggregationIterator generates result projection, it does not call the initialize method of the Projection class. This will cause a runtime NullPointerException when the projection involves nondeterministic expressions.
## How was this patch tested?
unit test
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/DonnyZone/spark Branch-SPARK-19471
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/18919.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 #18919
----
commit 9a22b71f428f4e78978a8f87445949080edfc717
Author: donnyzone <we...@gmail.com>
Date: 2017-08-11T10:03:12Z
SPARK-19471 with test cases
commit 8f813cfac545a9ee77802fc691f1a16167f6cf3d
Author: donnyzone <we...@gmail.com>
Date: 2017-08-11T11:07:31Z
error fix
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #18919: [SPARK-19471][SQL]AggregationIterator does not in...
Posted by DonnyZone <gi...@git.apache.org>.
Github user DonnyZone closed the pull request at:
https://github.com/apache/spark/pull/18919
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #18919: [SPARK-19471][SQL]AggregationIterator does not initializ...
Posted by DonnyZone <gi...@git.apache.org>.
Github user DonnyZone commented on the issue:
https://github.com/apache/spark/pull/18919
There are some confilicts, close it first
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org