Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-17369][SQL] MetastoreRelation toJSON throws AssertException due to missing otherCopyArgs #14928

Closed
wants to merge 1 commit into from

Conversation

clockfly
Copy link
Contributor

@clockfly clockfly commented Sep 1, 2016

What changes were proposed in this pull request?

TreeNode.toJSON requires a subclass to explicitly override otherCopyArgs to include currying construction arguments, otherwise it reports AssertException telling that the construction argument values' count doesn't match the construction argument names' count.

For class MetastoreRelation, it has a currying construction parameter client: HiveClient, but Spark forgets to add it to the list of otherCopyArgs.

How was this patch tested?

Unit tests.

@SparkQA
Copy link

SparkQA commented Sep 2, 2016

Test build #64812 has finished for PR 14928 at commit 4c4684e.

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

@rxin
Copy link
Contributor

rxin commented Sep 4, 2016

Can you update the pull request title / description to say more about the actual issue?

@clockfly clockfly changed the title [SPARK-17369][SQL] MetastoreRelation toJSON should not throws exception [SPARK-17369][SQL] MetastoreRelation toJSON throws AssertException due to missing otherCopyArgs Sep 5, 2016
@clockfly
Copy link
Contributor Author

clockfly commented Sep 5, 2016

Updated.

@cloud-fan
Copy link
Contributor

retest this please

@SparkQA
Copy link

SparkQA commented Sep 6, 2016

Test build #64957 has finished for PR 14928 at commit 4c4684e.

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

@asfgit asfgit closed this in afb3d5d Sep 6, 2016
asfgit pushed a commit that referenced this pull request Sep 6, 2016
…e to missing otherCopyArgs

## What changes were proposed in this pull request?

`TreeNode.toJSON` requires a subclass to explicitly override otherCopyArgs to include currying construction arguments, otherwise it reports AssertException telling that the construction argument values' count doesn't match the construction argument names' count.

For class `MetastoreRelation`, it has a currying construction parameter `client: HiveClient`, but Spark forgets to add it to the list of otherCopyArgs.

## How was this patch tested?

Unit tests.

Author: Sean Zhong <seanzhong@databricks.com>

Closes #14928 from clockfly/metastore_relation_toJSON.

(cherry picked from commit afb3d5d)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
@cloud-fan
Copy link
Contributor

LGTM, merging to master and 2.0!

@yhuai
Copy link
Contributor

yhuai commented Sep 6, 2016

Seems this breaks 2.0 build.

@yhuai
Copy link
Contributor

yhuai commented Sep 6, 2016

I will revert it from branch 2.0.

asfgit pushed a commit that referenced this pull request Sep 6, 2016
…on due to missing otherCopyArgs

backport #14928 to 2.0

## What changes were proposed in this pull request?

`TreeNode.toJSON` requires a subclass to explicitly override otherCopyArgs to include currying construction arguments, otherwise it reports AssertException telling that the construction argument values' count doesn't match the construction argument names' count.

For class `MetastoreRelation`, it has a currying construction parameter `client: HiveClient`, but Spark forgets to add it to the list of otherCopyArgs.

## How was this patch tested?

Unit tests.

Author: Sean Zhong <seanzhong@databricks.com>

Closes #14968 from clockfly/metastore_toJSON_fix_for_spark_2.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants