Fix ClassCastException (#11266)

Signed-off-by: frank chen <frank.chen021@outlook.com>
This commit is contained in:
frank chen 2021-05-28 12:25:51 +08:00 committed by GitHub
parent 31c811d894
commit 04fefb0ca3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

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