File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
sql/catalyst/src/main/java/org/apache/spark/sql/catalog/v2 Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 2626import java .lang .reflect .InvocationTargetException ;
2727import java .util .HashMap ;
2828import java .util .Map ;
29+ import java .util .NoSuchElementException ;
2930import java .util .regex .Matcher ;
3031import java .util .regex .Pattern ;
3132
@@ -50,8 +51,10 @@ private Catalogs() {
5051 */
5152 public static CatalogPlugin load (String name , SQLConf conf )
5253 throws CatalogNotFoundException , SparkException {
53- String pluginClassName = conf .getConfString ("spark.sql.catalog." + name , null );
54- if (pluginClassName == null ) {
54+ String pluginClassName ;
55+ try {
56+ pluginClassName = conf .getConfString ("spark.sql.catalog." + name );
57+ } catch (NoSuchElementException e ){
5558 throw new CatalogNotFoundException (String .format (
5659 "Catalog '%s' plugin class not found: spark.sql.catalog.%s is not defined" , name , name ));
5760 }
You can’t perform that action at this time.
0 commit comments