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

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

dgrinchenko commented on pull request #1794: DRILL-7196: Queries are still 
runnable on disabled plugins
URL: https://github.com/apache/drill/pull/1794#discussion_r286370101
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/calcite/jdbc/DynamicRootSchema.java
 ##########
 @@ -76,19 +72,19 @@ protected CalciteSchema getImplicitSubSchema(String 
schemaName,
    * @param schemaName the name of the schema
    * @param caseSensitive whether matching for the schema name is case 
sensitive
    */
-  public void loadSchemaFactory(String schemaName, boolean caseSensitive) {
+  private void loadSchemaFactory(String schemaName, boolean caseSensitive) {
     try {
       SchemaPlus schemaPlus = this.plus();
-      StoragePlugin plugin = getSchemaFactories().getPlugin(schemaName);
-      if (plugin != null && plugin.getConfig().isEnabled()) {
+      StoragePlugin plugin = storages.getPlugin(schemaName);
 
 Review comment:
   `getSchemaFactories()` was an function to access `storages`. No need to use 
external assessor for the internal function, it is only adding not wanted 
overhead. 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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 still runnable on disabled plugins
> ----------------------------------------------
>
>                 Key: DRILL-7196
>                 URL: https://issues.apache.org/jira/browse/DRILL-7196
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 1.12.0
>            Reporter: Dmytriy Grinchenko
>            Assignee: Dmytriy Grinchenko
>            Priority: Major
>             Fix For: 1.17.0
>
>
> The issue were partially addressed with the DRILL-6732 task. However when 
> issuing select request with full path to the table, select still able to 
> process it regardless of the plugin state:
> {code}
> 0: jdbc:drill:zk=local> select * from `mongo.my_binaries`.`master.files`;
> +-----------------------------------+------------+
> |                md5                | chunkSize  |
> +-----------------------------------+------------+
> | 4e30dc965bb8aa064af4f2a9608fa7ae  | 261120     |
> | b223e44347e63fcae296e8432755e07c  | 261120     |
> | 2720c5e10e739142d1b28996349a1d7e  | 261120     |
> +-----------------------------------+------------+
> 0: jdbc:drill:zk=local> show schemas;
> +---------------------+
> |     SCHEMA_NAME     |
> +---------------------+
> | cp.default          |
> | dfs.default         |
> | dfs.root            |
> | dfs.test            |
> | dfs.tmp             |
> | hive.default        |
> | information_schema  |
> | sys                 |
> +---------------------+
> 8 rows selected (0.127 seconds)
> {code}



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

Reply via email to