Skip to content

Conversation

liufengdb
Copy link

What changes were proposed in this pull request?

If the target database name is as same as the current database, we should be able to skip one metastore access.

How was this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

Please review http://spark.apache.org/contributing.html before opening a pull request.

@SparkQA
Copy link

SparkQA commented Feb 10, 2018

Test build #87276 has finished for PR 20565 at commit 71df831.

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

Copy link
Member

@gatorsmile gatorsmile left a comment

Choose a reason for hiding this comment

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

LGTM

Could you fix the title?

Copy link
Member

Choose a reason for hiding this comment

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

This PR uses an additional getCurrentDatabase to avoid databaseExists. Can we have a more specific in the title?

@liufengdb liufengdb changed the title SPAR[SPARK-23379][SQL] remove redundant metastore access [SPARK-23379][SQL] remove redundant metastore access when set current database Feb 12, 2018
@liufengdb liufengdb changed the title [SPARK-23379][SQL] remove redundant metastore access when set current database [SPARK-23379][SQL] skip one metastore access when setting the same current database in HiveClientImpl Feb 12, 2018
@liufengdb liufengdb changed the title [SPARK-23379][SQL] skip one metastore access when setting the same current database in HiveClientImpl [SPARK-23379][SQL] skip when setting the same current database in HiveClientImpl Feb 12, 2018
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM, too.

@SparkQA
Copy link

SparkQA commented Feb 13, 2018

Test build #87356 has finished for PR 20565 at commit 2b52771.

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

@gatorsmile
Copy link
Member

Thanks! Merged to master.

@asfgit asfgit closed this in ed4e78b Feb 13, 2018
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