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

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

vvysotskyi commented on pull request #484: DRILL-4576: Add PlannerCallback 
interface for additional planner initialization.
URL: https://github.com/apache/drill/pull/484#discussion_r304291621
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePluginRegistryImpl.java
 ##########
 @@ -186,12 +191,15 @@ public void init() throws DrillbitStartupException {
   @Override
   public void addPlugin(String name, StoragePlugin plugin) {
     plugins.put(name, plugin);
+    manuallyAddedPlugins.put(name, 0);
   }
 
   public void deletePlugin(String name) {
     StoragePlugin plugin = plugins.remove(name);
     closePlugin(plugin);
-    pluginSystemTable.delete(name);
+    if(manuallyAddedPlugins.remove(name) == null){
 
 Review comment:
   Is it required for now? Looks like `deletePlugin()` is called in 
`PluginConfigWrapper.deleteFromStorage()` method which checks that 
`StoragePluginConfig` for plugin is present (plugin exists in exist in the 
`PersistentStore`).
   So I think the problem with 
   
   > StoragePluginRegistryImpl which deletes manually added plugins from the 
registry since they don't exist in the PersistentStore
   
   is not actual anymore.
 
----------------------------------------------------------------
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]


> Add StoragePlugin API to register materialization into planner
> --------------------------------------------------------------
>
>                 Key: DRILL-4576
>                 URL: https://issues.apache.org/jira/browse/DRILL-4576
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Laurent Goujon
>            Priority: Major
>
> There's no currently a good way to register materializations into Drill 
> planner. Calcite's MaterializationService.instance() would be the way to go, 
> but the registration happens in 
> {{org.apache.calcite.prepare.Prepare.PreparedResult#prepareSql()}}, which is 
> not called by Drill.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to