gortiz commented on code in PR #14946:
URL: https://github.com/apache/pinot/pull/14946#discussion_r1935366628


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java:
##########
@@ -176,7 +184,28 @@ protected BrokerResponse handleRequest(long requestId, 
String query, SqlNodeAndO
           return constructMultistageExplainPlan(query, plan);
         case SELECT:
         default:
-          queryPlanResult = queryEnvironment.planQuery(query, 
sqlNodeAndOptions, requestId);
+          // Run the query planning in a separate thread so that we can 
enforce a timeout on it (in some rare cases,
+          // we can see query compilation taking a very long time).
+          Future<QueryEnvironment.QueryPlannerResult> queryPlanResultFuture = 
_queryCompileExecutor.submit(
+              () -> queryEnvironment.planQuery(query, sqlNodeAndOptions, 
requestId));
+

Review Comment:
   we need to do the same with explain plan



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to