mirror of https://github.com/apache/druid.git
small optimization in timeseries if 'skipEmptyBuckets' is true and cursor completed (#5178)
This commit is contained in:
parent
f18eba50ee
commit
1181411901
|
@ -62,6 +62,10 @@ public class TimeseriesQueryEngine
|
|||
@Override
|
||||
public Result<TimeseriesResultValue> apply(Cursor cursor)
|
||||
{
|
||||
if (skipEmptyBuckets && cursor.isDone()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Aggregator[] aggregators = new Aggregator[aggregatorSpecs.size()];
|
||||
String[] aggregatorNames = new String[aggregatorSpecs.size()];
|
||||
|
||||
|
@ -70,10 +74,6 @@ public class TimeseriesQueryEngine
|
|||
aggregatorNames[i] = aggregatorSpecs.get(i).getName();
|
||||
}
|
||||
|
||||
if (skipEmptyBuckets && cursor.isDone()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
while (!cursor.isDone()) {
|
||||
for (Aggregator aggregator : aggregators) {
|
||||
|
|
Loading…
Reference in New Issue