mirror of https://github.com/apache/druid.git
Optimization
This commit is contained in:
parent
cce917ab84
commit
45e95bb1f4
|
@ -259,13 +259,14 @@ public class ScanQueryEngine
|
|||
}
|
||||
|
||||
/**
|
||||
* If we're performing time-ordering, we want to scan through every row in the segment (hence the maximum limit)
|
||||
* If we're performing time-ordering, we want to scan through the first `limit` rows ignoring the number
|
||||
* of rows already counted on other segments.
|
||||
*/
|
||||
private long calculateLimit(ScanQuery query, Map<String, Object> responseContext)
|
||||
{
|
||||
if (query.getTimeOrder().equals(ScanQuery.TimeOrder.NONE)) {
|
||||
return query.getLimit() - (long) responseContext.get(ScanQueryRunnerFactory.CTX_COUNT);
|
||||
}
|
||||
return Long.MAX_VALUE;
|
||||
return query.getLimit();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue