xiangfu0 commented on code in PR #11201:
URL: https://github.com/apache/pinot/pull/11201#discussion_r1277849480


##########
pinot-query-planner/src/main/java/org/apache/pinot/query/routing/WorkerManager.java:
##########
@@ -129,6 +130,11 @@ private void assignWorkersToLeafFragment(PlanFragment 
fragment, DispatchablePlan
         Preconditions.checkState(tableTypeToSegmentListMap.put(tableType, 
serverEntry.getValue()) == null,
             "Entry for server {} and table type: {} already exist!", 
serverEntry.getKey(), tableType);
       }
+
+      // attach unavailable segments to metadata
+      if (!routingTable.getUnavailableSegments().isEmpty()) {
+        metadata.addTableToUnavailableSegmentsMap(logicalTableName, 
routingTable.getUnavailableSegments());
+      }

Review Comment:
   In the last step of query planning, we need to construct 
`DispatchableSubPlan` from `PlanFragment` `subPlanRoot` and  
`DispatchablePlanContext` `dispatchablePlanContext`
   ```
   private static DispatchableSubPlan finalizeDispatchableSubPlan(PlanFragment 
subPlanRoot,
         DispatchablePlanContext dispatchablePlanContext) {
       return new DispatchableSubPlan(dispatchablePlanContext.getResultFields(),
           
dispatchablePlanContext.constructDispatchablePlanFragmentList(subPlanRoot),
           dispatchablePlanContext.getTableNames());
     }
   ```
   
   So if we don't populate unavailable segments to `PlanFragment` , then we 
need to add a new field into `DispatchableSubPlan`



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to