dgrinchenko commented on a change in 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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to