amrishlal commented on a change in pull request #7568:
URL: https://github.com/apache/pinot/pull/7568#discussion_r758809059



##########
File path: 
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
##########
@@ -519,6 +543,18 @@ private BrokerResponseNative handleSQLRequest(long 
requestId, String query, Json
     return brokerResponse;
   }
 
+  /** Set EXPLAIN PLAN query to route to only one server. */
+  private void setRoutingToOneServer(Map<ServerInstance, List<String>> 
routingTable) {
+    Set<Map.Entry<ServerInstance, List<String>>> servers = 
routingTable.entrySet();
+    // only send request to 1 server
+    Map.Entry<ServerInstance, List<String>> server = servers.iterator().next();
+    routingTable.clear();
+    List<String> segments = new ArrayList<>();
+    // only generate the plan for 1 segment
+    segments.add(server.getValue().get(0));
+    routingTable.put(server.getKey(), segments);

Review comment:
       Integration test (OfflineClusterIntegrationTest.testExplainPlanQuery) 
starts failing with this change due to explain plan output output having 
repeated AGGREGATE_GROUPBY_ORDERBY operators.




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