weixiangsun commented on a change in pull request #8029:
URL: https://github.com/apache/pinot/pull/8029#discussion_r830718303



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/query/reduce/BrokerReduceService.java
##########
@@ -103,11 +104,23 @@ public BrokerResponseNative 
reduceOnDataTable(BrokerRequest brokerRequest,
       return brokerResponseNative;
     }
 
-    QueryContext queryContext = 
BrokerRequestToQueryContextConverter.convert(brokerRequest);
-    DataTableReducer dataTableReducer = 
ResultReducerFactory.getResultReducer(queryContext);
+    QueryContext serverQueryContext = 
BrokerRequestToQueryContextConverter.convert(serverBrokerRequest);
+    DataTableReducer dataTableReducer = 
ResultReducerFactory.getResultReducer(serverQueryContext);
     dataTableReducer.reduceAndSetResults(rawTableName, cachedDataSchema, 
dataTableMap, brokerResponseNative,
         new DataTableReducerContext(_reduceExecutorService, 
_maxReduceThreadsPerQuery, reduceTimeOutMs,
             _groupByTrimThreshold), brokerMetrics);
+    QueryContext queryContext;
+    if (brokerRequest == serverBrokerRequest) {
+      queryContext = serverQueryContext;
+    } else {
+      queryContext = 
BrokerRequestToQueryContextConverter.convert(brokerRequest);
+    }
+
+    GapfillUtils.GapfillType gapfillType = 
GapfillUtils.getGapfillType(queryContext);
+    if (gapfillType != null) {
+      GapfillProcessor gapfillProcessor = new GapfillProcessor(queryContext, 
gapfillType);
+      gapfillProcessor.process(brokerResponseNative);
+    }

Review comment:
       Fixed




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