Skip to content

Conversation

@cloud-fan
Copy link
Contributor

Most of cases we should propagate null when call NewInstance, and so far there is only one case we should stop null propagation: create product/java bean. So I think it makes more sense to propagate null by dafault.

This also fixes a bug when encode null array/map, which is firstly discovered in #10401

@cloud-fan
Copy link
Contributor Author

cc @marmbrus @viirya

@SparkQA
Copy link

SparkQA commented Dec 23, 2015

Test build #48233 has finished for PR 10443 at commit de214af.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

a small fix: we should not go into this branch if argGen is empty, or the argsNonNull will be !(), which is wrong.

I found this when I leave the propagateNull true for NewInstance of UDT.

Copy link
Member

Choose a reason for hiding this comment

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

Good catch!

@SparkQA
Copy link

SparkQA commented Dec 23, 2015

Test build #48242 has finished for PR 10443 at commit ac3a88b.

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

@SparkQA
Copy link

SparkQA commented Dec 29, 2015

Test build #48389 has finished for PR 10443 at commit a6b826c.

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

@marmbrus
Copy link
Contributor

Thanks, merging to master.

@asfgit asfgit closed this in aa48164 Dec 30, 2015
marmbrus pushed a commit to marmbrus/spark that referenced this pull request Jan 7, 2016
…Instance

Most of cases we should propagate null when call `NewInstance`, and so far there is only one case we should stop null propagation: create product/java bean. So I think it makes more sense to propagate null by dafault.

This also fixes a bug when encode null array/map, which is firstly discovered in apache#10401

Author: Wenchen Fan <[email protected]>

Closes apache#10443 from cloud-fan/encoder.
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.

4 participants