Skip to content

[SPARK-28331][SQL] Catalogs.load() should be able to load built-in catalogs - #25094

Closed
gengliangwang wants to merge 1 commit into
apache:masterfrom
gengliangwang:fixCatalogLoad
Closed

[SPARK-28331][SQL] Catalogs.load() should be able to load built-in catalogs#25094
gengliangwang wants to merge 1 commit into
apache:masterfrom
gengliangwang:fixCatalogLoad

Conversation

@gengliangwang

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

In Catalogs.load, the pluginClassName in the following code

String pluginClassName = conf.getConfString("spark.sql.catalog." + name, null);

is always null for built-in catalogs, e.g there is a SQLConf entry spark.sql.catalog.session.

This is because of #18852: SQLConf.conf.getConfString(key, null) always returns null.

How was this patch tested?

Apply code changes of #24768 and tried loading session catalog.

@gengliangwang

Copy link
Copy Markdown
MemberAuthor

@cloud-fan@rdblue

@SparkQA

Copy link
Copy Markdown

Test build #107454 has finished for PR 25094 at commit fdf9d35.

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

@gengliangwanggengliangwang changed the title [SPARK-28331][SQL] Catalogs.load always throws CatalogNotFoundException on loading built-in catalogs[SPARK-28331][SQL] Catalogs.load() should be able to load built-in catalogsJul 10, 2019
public static CatalogPlugin load(String name, SQLConf conf)
throws CatalogNotFoundException, SparkException {
String pluginClassName = conf.getConfString("spark.sql.catalog." + name, null);
if (pluginClassName == null) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you add a regression test case for this?

@rdblue

Copy link
Copy Markdown
Contributor

Let's wait on this. The problem it fixes hasn't been committed yet.

@gengliangwanggengliangwang changed the title [SPARK-28331][SQL] Catalogs.load() should be able to load built-in catalogs[WIP][SPARK-28331][SQL] Catalogs.load() should be able to load built-in catalogsJul 11, 2019
@brkyvz

Copy link
Copy Markdown
Contributor

cc @gengliangwang Do you have time to update this?

@rdblue

Copy link
Copy Markdown
Contributor

Also, do we need both this and #25104?

@brkyvz

Copy link
Copy Markdown
Contributor

retest this please

@gengliangwanggengliangwang changed the title [WIP][SPARK-28331][SQL] Catalogs.load() should be able to load built-in catalogs[SPARK-28331][SQL] Catalogs.load() should be able to load built-in catalogsAug 5, 2019
@SparkQA

Copy link
Copy Markdown

Test build #108677 has finished for PR 25094 at commit fdf9d35.

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

@brkyvz

Copy link
Copy Markdown
Contributor

LGTM. Merging this to master. Tests in @cloud-fan's refactoring should catch these.

@asfgitasfgit closed this in c88df2cAug 7, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@gengliangwang@SparkQA@rdblue@brkyvz@dongjoon-hyun