Skip to content

Conversation

@gengliangwang
Copy link
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
Member Author

@cloud-fan @rdblue

@SparkQA
Copy link

SparkQA commented Jul 10, 2019

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.

@gengliangwang gengliangwang 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 catalogs Jul 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
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
Contributor

rdblue commented Jul 10, 2019

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

@gengliangwang gengliangwang 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 catalogs Jul 11, 2019
@brkyvz
Copy link
Contributor

brkyvz commented Jul 17, 2019

cc @gengliangwang Do you have time to update this?

@rdblue
Copy link
Contributor

rdblue commented Jul 17, 2019

Also, do we need both this and #25104?

@brkyvz
Copy link
Contributor

brkyvz commented Aug 5, 2019

retest this please

@gengliangwang gengliangwang 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 catalogs Aug 5, 2019
@SparkQA
Copy link

SparkQA commented Aug 5, 2019

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
Contributor

brkyvz commented Aug 7, 2019

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

@asfgit asfgit closed this in c88df2c Aug 7, 2019
Sign up for free to 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