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

suneet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 04fefb0  Fix ClassCastException (#11266)
04fefb0 is described below

commit 04fefb0ca3d07e61f76a7aea50828b77d2629dad
Author: frank chen <[email protected]>
AuthorDate: Fri May 28 12:25:51 2021 +0800

    Fix ClassCastException (#11266)
    
    Signed-off-by: frank chen <[email protected]>
---
 .../apache/druid/query/movingaverage/MovingAverageQueryRunner.java   | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/extensions-contrib/moving-average-query/src/main/java/org/apache/druid/query/movingaverage/MovingAverageQueryRunner.java
 
b/extensions-contrib/moving-average-query/src/main/java/org/apache/druid/query/movingaverage/MovingAverageQueryRunner.java
index 3d704de..5cc0964 100644
--- 
a/extensions-contrib/moving-average-query/src/main/java/org/apache/druid/query/movingaverage/MovingAverageQueryRunner.java
+++ 
b/extensions-contrib/moving-average-query/src/main/java/org/apache/druid/query/movingaverage/MovingAverageQueryRunner.java
@@ -55,7 +55,6 @@ import javax.annotation.Nullable;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
-import java.util.concurrent.atomic.AtomicLong;
 import java.util.stream.Collectors;
 
 /**
@@ -123,11 +122,11 @@ public class MovingAverageQueryRunner implements 
QueryRunner<Row>
       GroupByQuery gbq = builder.build();
 
       ResponseContext gbqResponseContext = ResponseContext.createEmpty();
+      gbqResponseContext.merge(responseContext);
       gbqResponseContext.put(
           ResponseContext.Key.QUERY_FAIL_DEADLINE_MILLIS,
           System.currentTimeMillis() + QueryContexts.getTimeout(gbq)
       );
-      gbqResponseContext.put(ResponseContext.Key.QUERY_TOTAL_BYTES_GATHERED, 
new AtomicLong());
 
       Sequence<ResultRow> results = 
gbq.getRunner(walker).run(QueryPlus.wrap(gbq), gbqResponseContext);
       try {
@@ -164,11 +163,11 @@ public class MovingAverageQueryRunner implements 
QueryRunner<Row>
           maq.getContext()
       );
       ResponseContext tsqResponseContext = ResponseContext.createEmpty();
+      tsqResponseContext.merge(responseContext);
       tsqResponseContext.put(
           ResponseContext.Key.QUERY_FAIL_DEADLINE_MILLIS,
           System.currentTimeMillis() + QueryContexts.getTimeout(tsq)
       );
-      tsqResponseContext.put(ResponseContext.Key.QUERY_TOTAL_BYTES_GATHERED, 
new AtomicLong());
 
       Sequence<Result<TimeseriesResultValue>> results = 
tsq.getRunner(walker).run(QueryPlus.wrap(tsq), tsqResponseContext);
       try {

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

Reply via email to