Uh oh!
There was an error while loading. Please reload this page.
[SPARK-17641][SQL] Collect_list/Collect_set should not collect null values. - #15208
Closed
hvanhovell wants to merge 2 commits into
Closed
[SPARK-17641][SQL] Collect_list/Collect_set should not collect null values.#15208hvanhovell wants to merge 2 commits into
hvanhovell wants to merge 2 commits into
Conversation
hvanhovell
commented
Sep 23, 2016
ContributorAuthor
cc @mengxr |
SparkQA
commented
Sep 23, 2016
Test build #65806 has finished for PR 15208 at commit
|
sameeragarwal
approved these changes
Sep 27, 2016
| override def update(b: MutableRow, input: InternalRow): Unit = { | ||
| buffer += child.eval(input) | ||
| val value = child.eval(input) | ||
| if (value != null) { |
There was a problem hiding this comment.
It'd be great to add a comment here that this mimics the hive semantics
SparkQA
commented
Sep 27, 2016
Test build #65992 has finished for PR 15208 at commit
|
hvanhovell
commented
Sep 27, 2016
ContributorAuthor
retest this please |
SparkQA
commented
Sep 27, 2016
Test build #66000 has finished for PR 15208 at commit
|
rxin
commented
Sep 28, 2016
Contributor
Merging in master/2.0. |
asfgit pushed a commit
that referenced
this pull request
Sep 28, 2016
…alues. ## What changes were proposed in this pull request? We added native versions of `collect_set` and `collect_list` in Spark 2.0. These currently also (try to) collect null values, this is different from the original Hive implementation. This PR fixes this by adding a null check to the `Collect.update` method. ## How was this patch tested? Added a regression test to `DataFrameAggregateSuite`. Author: Herman van Hovell <hvanhovell@databricks.com> Closes#15208 from hvanhovell/SPARK-17641. (cherry picked from commit 7d09232) Signed-off-by: Reynold Xin <rxin@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
We added native versions of
collect_setandcollect_listin Spark 2.0. These currently also (try to) collect null values, this is different from the original Hive implementation. This PR fixes this by adding a null check to theCollect.updatemethod.How was this patch tested?
Added a regression test to
DataFrameAggregateSuite.