This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 635c2fb96e Fix NPE when nested query doesn't have gapfill (#11155)
635c2fb96e is described below
commit 635c2fb96e6901d0a0660e1a8878d9d493852791
Author: Xiaotian (Jackie) Jiang <[email protected]>
AuthorDate: Sun Jul 23 21:32:44 2023 -0700
Fix NPE when nested query doesn't have gapfill (#11155)
---
.../java/org/apache/pinot/core/query/reduce/BrokerReduceService.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/pinot-core/src/main/java/org/apache/pinot/core/query/reduce/BrokerReduceService.java
b/pinot-core/src/main/java/org/apache/pinot/core/query/reduce/BrokerReduceService.java
index f8302e4d3e..e89978625a 100644
---
a/pinot-core/src/main/java/org/apache/pinot/core/query/reduce/BrokerReduceService.java
+++
b/pinot-core/src/main/java/org/apache/pinot/core/query/reduce/BrokerReduceService.java
@@ -34,6 +34,7 @@ import
org.apache.pinot.core.query.request.context.utils.QueryContextConverterUt
import org.apache.pinot.core.transport.ServerRoutingInstance;
import org.apache.pinot.core.util.GapfillUtils;
import org.apache.pinot.spi.env.PinotConfiguration;
+import org.apache.pinot.spi.exception.BadQueryRequestException;
import org.apache.pinot.spi.exception.EarlyTerminationException;
import org.apache.pinot.spi.utils.CommonConstants;
import org.apache.pinot.spi.utils.builder.TableNameBuilder;
@@ -120,6 +121,9 @@ public class BrokerReduceService extends BaseReduceService {
} else {
queryContext =
QueryContextConverterUtils.getQueryContext(brokerRequest.getPinotQuery());
GapfillUtils.GapfillType gapfillType =
GapfillUtils.getGapfillType(queryContext);
+ if (gapfillType == null) {
+ throw new BadQueryRequestException("Nested query is not supported
without gapfill");
+ }
BaseGapfillProcessor gapfillProcessor =
GapfillProcessorFactory.getGapfillProcessor(queryContext,
gapfillType);
gapfillProcessor.process(brokerResponseNative);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]