[SPARK-15140][SQL] make the semantics of null input object for encoder clear#13469
Closed
cloud-fan wants to merge 3 commits intoapache:masterfrom
Closed
[SPARK-15140][SQL] make the semantics of null input object for encoder clear#13469cloud-fan wants to merge 3 commits intoapache:masterfrom
cloud-fan wants to merge 3 commits intoapache:masterfrom
Conversation
Contributor
Author
Contributor
Author
There was a problem hiding this comment.
I tried to also disallow null input object for flat type, but failed as some other tests already depend on this feature. e.g. ParquetIOSuite.null and non-null strings
|
Test build #59854 has finished for PR 13469 at commit
|
|
Test build #59860 has finished for PR 13469 at commit
|
| inputObject | ||
| } else { | ||
| // For input object of non-flat type, we can't encode it to row if it's null, as Spark SQL | ||
| // doesn't allow row to be null, only its columns can be null. |
Contributor
There was a problem hiding this comment.
... doesn't allow top-level row to be null, ...
Contributor
|
LGTM except for minor comments. |
Contributor
|
Let's wait for #13269 first. |
Contributor
|
LGTM pending Jenkins. |
|
Test build #59941 has finished for PR 13469 at commit
|
Contributor
|
Merging to master and branch-2.0. |
asfgit
pushed a commit
that referenced
this pull request
Jun 3, 2016
…r clear ## What changes were proposed in this pull request? For input object of non-flat type, we can't encode it to row if it's null, as Spark SQL doesn't allow row to be null, only its columns can be null. This PR explicitly add this constraint and throw exception if users break it. ## How was this patch tested? several new tests Author: Wenchen Fan <wenchen@databricks.com> Closes #13469 from cloud-fan/null-object. (cherry picked from commit 11c83f8) Signed-off-by: Cheng Lian <lian@databricks.com>
asfgit
pushed a commit
that referenced
this pull request
Nov 30, 2016
## What changes were proposed in this pull request? For input object of non-flat type, we can't encode it to row if it's null, as Spark SQL doesn't allow the entire row to be null, only its columns can be null. That's the reason we forbid users to use top level null objects in #13469 However, if users wrap non-flat type with `Option`, then we may still encoder top level null object to row, which is not allowed. This PR fixes this case, and suggests users to wrap their type with `Tuple1` if they do wanna top level null objects. ## How was this patch tested? new test Author: Wenchen Fan <wenchen@databricks.com> Closes #15979 from cloud-fan/option.
asfgit
pushed a commit
that referenced
this pull request
Nov 30, 2016
## What changes were proposed in this pull request? For input object of non-flat type, we can't encode it to row if it's null, as Spark SQL doesn't allow the entire row to be null, only its columns can be null. That's the reason we forbid users to use top level null objects in #13469 However, if users wrap non-flat type with `Option`, then we may still encoder top level null object to row, which is not allowed. This PR fixes this case, and suggests users to wrap their type with `Tuple1` if they do wanna top level null objects. ## How was this patch tested? new test Author: Wenchen Fan <wenchen@databricks.com> Closes #15979 from cloud-fan/option. (cherry picked from commit f135b70) Signed-off-by: Cheng Lian <lian@databricks.com>
robert3005
pushed a commit
to palantir/spark
that referenced
this pull request
Dec 2, 2016
## What changes were proposed in this pull request? For input object of non-flat type, we can't encode it to row if it's null, as Spark SQL doesn't allow the entire row to be null, only its columns can be null. That's the reason we forbid users to use top level null objects in apache#13469 However, if users wrap non-flat type with `Option`, then we may still encoder top level null object to row, which is not allowed. This PR fixes this case, and suggests users to wrap their type with `Tuple1` if they do wanna top level null objects. ## How was this patch tested? new test Author: Wenchen Fan <wenchen@databricks.com> Closes apache#15979 from cloud-fan/option.
uzadude
pushed a commit
to uzadude/spark
that referenced
this pull request
Jan 27, 2017
## What changes were proposed in this pull request? For input object of non-flat type, we can't encode it to row if it's null, as Spark SQL doesn't allow the entire row to be null, only its columns can be null. That's the reason we forbid users to use top level null objects in apache#13469 However, if users wrap non-flat type with `Option`, then we may still encoder top level null object to row, which is not allowed. This PR fixes this case, and suggests users to wrap their type with `Tuple1` if they do wanna top level null objects. ## How was this patch tested? new test Author: Wenchen Fan <wenchen@databricks.com> Closes apache#15979 from cloud-fan/option.
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 free
to 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?
For input object of non-flat type, we can't encode it to row if it's null, as Spark SQL doesn't allow row to be null, only its columns can be null.
This PR explicitly add this constraint and throw exception if users break it.
How was this patch tested?
several new tests