Skip to content

Conversation

@cloud-fan
Copy link
Contributor

What changes were proposed in this pull request?

Previous code mistakenly use table.properties.get("comment") to read the existing table comment, we should use table.comment

How was this patch tested?

new regression test

@cloud-fan
Copy link
Contributor Author

cloud-fan commented Jun 16, 2017

cc @gatorsmile @wzhfy @viirya

Copy link
Member

Choose a reason for hiding this comment

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

Does this work for Hive table? When CatalogTable's comment is None, we will ignore it when converting it to Hive table metadata. So seems it will not be unset?

table.comment.foreach { c => hiveTable.setProperty("comment", c) }

Copy link
Member

Choose a reason for hiding this comment

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

Oh. I see. It goes to override the original table metadata if no comment is set.

@gatorsmile
Copy link
Member

LGTM

Copy link
Member

@viirya viirya Jun 16, 2017

Choose a reason for hiding this comment

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

In above code not shown in this diff, we check if a prop key exists in table.properties or not when ifExists is false. As comment is not in table.properties, I think it will cause AnalysisException when unset comment?

@SparkQA
Copy link

SparkQA commented Jun 16, 2017

Test build #78162 has finished for PR 18325 at commit c84582a.

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

@SparkQA
Copy link

SparkQA commented Jun 16, 2017

Test build #78180 has finished for PR 18325 at commit dd7e1fa.

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

@viirya
Copy link
Member

viirya commented Jun 16, 2017

LGTM

@gatorsmile
Copy link
Member

Thanks! Merging to master.

@asfgit asfgit closed this in d1c333a Jun 16, 2017
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