Jackie-Jiang commented on code in PR #19418:
URL: https://github.com/apache/pinot/pull/19418#discussion_r3908266735


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/plan/server/ServerPlanRequestUtils.java:
##########
@@ -111,7 +111,14 @@ public static OpChain compileLeafStage(
     pinotQuery.setExplain(explain);
 
     if (MapUtils.isNotEmpty(rowFilters)) {
-      pinotQuery.setQueryOptions(rowFilters);
+      // Merge, never replace: the plan visitor may already have stamped 
SERVER_RETURN_FINAL_RESULT[_KEY_UNPARTITIONED]
+      // here, and updateQueryOptions() below does not restore them. Copy the 
map, it belongs to the caller.
+      Map<String, String> queryOptions = pinotQuery.getQueryOptions();
+      if (queryOptions != null) {
+        queryOptions.putAll(rowFilters);
+      } else {
+        pinotQuery.setQueryOptions(new HashMap<>(rowFilters));

Review Comment:
   Do we need to make a clone here?



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