This is an automated email from the ASF dual-hosted git repository.

Jackie-Jiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new e2d8babc568 Add an InstancePlanMakerImplV2 extension point for the 
combine plan node (#19461)
e2d8babc568 is described below

commit e2d8babc568ebbaf11098ac1d32933346e856a40
Author: scottlan0113 <[email protected]>
AuthorDate: Fri Sep 4 10:57:36 2026 -0500

    Add an InstancePlanMakerImplV2 extension point for the combine plan node 
(#19461)
---
 .../pinot/core/plan/maker/InstancePlanMakerImplV2.java    | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git 
a/pinot-core/src/main/java/org/apache/pinot/core/plan/maker/InstancePlanMakerImplV2.java
 
b/pinot-core/src/main/java/org/apache/pinot/core/plan/maker/InstancePlanMakerImplV2.java
index 0668a8aca0f..3a24e0ed51e 100644
--- 
a/pinot-core/src/main/java/org/apache/pinot/core/plan/maker/InstancePlanMakerImplV2.java
+++ 
b/pinot-core/src/main/java/org/apache/pinot/core/plan/maker/InstancePlanMakerImplV2.java
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ExecutorService;
+import javax.annotation.Nullable;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.MapUtils;
 import org.apache.commons.lang3.tuple.Pair;
@@ -225,7 +226,7 @@ public class InstancePlanMakerImplV2 implements PlanMaker {
       }
     }
 
-    CombinePlanNode combinePlanNode = new CombinePlanNode(planNodes, 
queryContext, executorService, null);
+    CombinePlanNode combinePlanNode = createCombinePlanNode(planNodes, 
queryContext, executorService, null);
     return new GlobalPlanImplV0(
         new InstanceResponsePlanNode(combinePlanNode, segmentContexts, 
fetchContexts, queryContext));
   }
@@ -395,7 +396,7 @@ public class InstancePlanMakerImplV2 implements PlanMaker {
       }
     }
 
-    CombinePlanNode combinePlanNode = new CombinePlanNode(planNodes, 
queryContext, executorService, streamer);
+    CombinePlanNode combinePlanNode = createCombinePlanNode(planNodes, 
queryContext, executorService, streamer);
     return new GlobalPlanImplV0(
         new StreamingInstanceResponsePlanNode(combinePlanNode, 
segmentContexts, fetchContexts, queryContext, streamer));
   }
@@ -411,6 +412,16 @@ public class InstancePlanMakerImplV2 implements PlanMaker {
     }
   }
 
+  /// Returns the combine plan node placed above the segment plan nodes, for 
both the streaming and the
+  /// non-streaming instance plan. `streamer` is null for a non-streaming 
query.
+  ///
+  /// Which combine operator that node builds is decided inside 
[CombinePlanNode] itself, per query type, so an
+  /// implementation substituting one query type does not have to reproduce 
the dispatch for the others.
+  protected CombinePlanNode createCombinePlanNode(List<PlanNode> planNodes, 
QueryContext queryContext,
+      ExecutorService executorService, @Nullable ResultsBlockStreamer 
streamer) {
+    return new CombinePlanNode(planNodes, queryContext, executorService, 
streamer);
+  }
+
   /// In-place rewrite QueryContext based on the information from local 
IndexSegment.
   ///
   /// @param queryContext


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to