This is an automated email from the ASF dual-hosted git repository.

ankitsultana 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 c1cd47e7ea Enabling JSON column for groupBy in time series and proper 
handling for step 0s (#14141)
c1cd47e7ea is described below

commit c1cd47e7eaff7d1eb3f0399a9431c87161bf1533
Author: RAGHVENDRA KUMAR YADAV <[email protected]>
AuthorDate: Wed Oct 2 09:34:50 2024 -0700

    Enabling JSON column for groupBy in time series and proper handling for 
step 0s (#14141)
---
 .../apache/pinot/broker/requesthandler/TimeSeriesRequestHandler.java  | 4 +++-
 .../pinot/core/operator/timeseries/TimeSeriesAggregationOperator.java | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/TimeSeriesRequestHandler.java
 
b/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/TimeSeriesRequestHandler.java
index fa6b67be11..ade9d6c9a6 100644
--- 
a/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/TimeSeriesRequestHandler.java
+++ 
b/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/TimeSeriesRequestHandler.java
@@ -148,15 +148,17 @@ public class TimeSeriesRequestHandler extends 
BaseBrokerRequestHandler {
           break;
       }
     }
+    Long stepSeconds = getStepSeconds(step);
     Preconditions.checkNotNull(query, "Query cannot be null");
     Preconditions.checkNotNull(startTs, "Start time cannot be null");
     Preconditions.checkNotNull(endTs, "End time cannot be null");
+    Preconditions.checkState(stepSeconds != null && stepSeconds > 0, "Step 
must be a positive integer");
     Duration timeout = Duration.ofMillis(_brokerTimeoutMs);
     if (StringUtils.isNotBlank(timeoutStr)) {
       timeout = HumanReadableDuration.from(timeoutStr);
     }
     // TODO: Pass full raw query param string to the request
-    return new RangeTimeSeriesRequest(language, query, startTs, endTs, 
getStepSeconds(step), timeout, queryParamString);
+    return new RangeTimeSeriesRequest(language, query, startTs, endTs, 
stepSeconds, timeout, queryParamString);
   }
 
   public static Long getStepSeconds(@Nullable String step) {
diff --git 
a/pinot-core/src/main/java/org/apache/pinot/core/operator/timeseries/TimeSeriesAggregationOperator.java
 
b/pinot-core/src/main/java/org/apache/pinot/core/operator/timeseries/TimeSeriesAggregationOperator.java
index c67dbfe240..ca2b7a7009 100644
--- 
a/pinot-core/src/main/java/org/apache/pinot/core/operator/timeseries/TimeSeriesAggregationOperator.java
+++ 
b/pinot-core/src/main/java/org/apache/pinot/core/operator/timeseries/TimeSeriesAggregationOperator.java
@@ -94,6 +94,7 @@ public class TimeSeriesAggregationOperator extends 
BaseOperator<TimeSeriesResult
     for (int i = 0; i < _groupByExpressions.size(); i++) {
       blockValSet = 
transformBlock.getBlockValueSet(_groupByExpressions.get(i));
       switch (blockValSet.getValueType()) {
+        case JSON:
         case STRING:
           tagValues[i] = blockValSet.getStringValuesSV();
           break;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to