[ 
https://issues.apache.org/jira/browse/DRILL-6732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16607262#comment-16607262
 ] 

ASF GitHub Bot commented on DRILL-6732:
---------------------------------------

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:
[email protected]


> Queries are runnable on disable plugins
> ---------------------------------------
>
>                 Key: DRILL-6732
>                 URL: https://issues.apache.org/jira/browse/DRILL-6732
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Security
>    Affects Versions: 1.13.0, 1.14.0
>            Reporter: shuifeng lu
>            Priority: Critical
>
> Queries are not allowed to run on disable plugins: (1.10 works fine, 1.13 and 
> 1.14 has the same problem. Not checked for 1.11 and 1.12)
> 1) It is not allowed
> 2) the plugin rules cannot be applied on queries, but queries are runnable



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to