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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to