Skip to content

Commit

Permalink
[spark] Fix autoFillConfigurations in SparkGenericCatalog
Browse files Browse the repository at this point in the history
  • Loading branch information
Zouxxyy committed Dec 16, 2023
1 parent e90b13a commit 2ae1be3
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
import java.util.concurrent.Callable;

import static org.apache.paimon.options.CatalogOptions.METASTORE;
import static org.apache.paimon.options.CatalogOptions.URI;
import static org.apache.paimon.options.CatalogOptions.WAREHOUSE;
import static org.apache.paimon.utils.Preconditions.checkNotNull;

Expand Down Expand Up @@ -254,13 +253,10 @@ private CaseInsensitiveStringMap autoFillConfigurations(
String warehouse = conf.warehousePath();
newOptions.put(WAREHOUSE.key(), warehouse);
}
String metastore = conf.getConf(StaticSQLConf.CATALOG_IMPLEMENTATION());
if (HiveCatalogOptions.IDENTIFIER.equals(metastore)) {
newOptions.put(METASTORE.key(), metastore);
String uri;
if ((uri = conf.getConfString("spark.sql.catalog.spark_catalog.uri", null)) != null
&& !options.containsKey(URI.key())) {
newOptions.put(URI.key(), uri);
if (!options.containsKey(METASTORE.key())) {
String metastore = conf.getConf(StaticSQLConf.CATALOG_IMPLEMENTATION());
if (HiveCatalogOptions.IDENTIFIER.equals(metastore)) {
newOptions.put(METASTORE.key(), metastore);
}
}

Expand Down

0 comments on commit 2ae1be3

Please sign in to comment.