drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] vdiravka commented on a change in pull request #1460: DRILL-6732: Queries are runnable on disable plugins
Date Fri, 07 Sep 2018 15:31:41 GMT
vdiravka commented on a change in pull request #1460: DRILL-6732: Queries are runnable on disable
plugins
URL: https://github.com/apache/drill/pull/1460#discussion_r215942017
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/calcite/jdbc/DynamicRootSchema.java
 ##########
 @@ -78,7 +78,7 @@ public void loadSchemaFactory(String schemaName, boolean caseSensitive)
{
     try {
       SchemaPlus schemaPlus = this.plus();
       StoragePlugin plugin = getSchemaFactories().getPlugin(schemaName);
-      if (plugin != null) {
+      if (plugin != null && plugin.getConfig().isEnabled()) {
 
 Review comment:
   In case of query for disabled plugin it would be good to throw an `UserException` with
an appropriate info that plugin is disabled.
   The current message is not accurate enough:
   ```
   org.apache.drill.common.exceptions.UserRemoteException: VALIDATION ERROR: Schema [[cp]]
is not valid with respect to either root schema or current default schema. Current default
schema: No default schema selected 
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message