xiangfu0 commented on code in PR #18529:
URL: https://github.com/apache/pinot/pull/18529#discussion_r3292749526
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java:
##########
@@ -798,6 +851,46 @@ protected BrokerResponse doHandleRequest(long requestId,
String query, SqlNodeAn
// Execute the query
// TODO: Replace ServerStats with ServerRoutingStatsEntry.
ServerStats serverStats = new ServerStats();
+
+ /// MV Split: attempt parallel base + materialized view queries; on
success return early, on
+ /// failure fall through to the standard non-split path with the route
restored.
+ if (materializedViewContext.isSplitRewrite()) {
Review Comment:
This split-rewrite branch now runs before the existing
`pinotQuery.isExplain()` handling below, so an `EXPLAIN PLAN FOR ...` query
that matches a split MV will execute the full dual scatter-gather/reduce path
instead of staying on the explain-only flow. That is a behavior regression:
explain queries should not read live data or return a normal broker response
just because MV split matched. Please short-circuit `isExplain()` before
entering `tryExecuteMaterializedViewSplit()`, or teach the split path to build
explain output rather than executing the query.
--
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]