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

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/SqlHandlerConfig.java
 ##########
 @@ -45,11 +49,28 @@ public QueryContext getContext() {
   }
 
   public RuleSet getRules(PlannerPhase phase) {
+    return phase.getRules(context, getPlugins());
+  }
+
+  public PlannerCallback getPlannerCallback(PlannerPhase phase){
+    List<PlannerCallback> callbacks = Lists.newArrayList();
+    for(StoragePlugin plugin: getPlugins()){
+      if(plugin instanceof AbstractStoragePlugin){
+        PlannerCallback callback = 
((AbstractStoragePlugin)plugin).getPlannerCallback(context, phase);
 
 Review comment:
   Can we add `getPlannerCallback()` method to `StoragePlugin` interface, so 
there is no cast would be required?

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to