mirror of https://github.com/apache/druid.git
squigglies ftw
This commit is contained in:
parent
c68bd66945
commit
8eec41f934
|
@ -284,7 +284,9 @@ public class JavaScriptAggregatorFactory implements AggregatorFactory
|
|||
|
||||
@Override
|
||||
public void close() {
|
||||
if(Context.getCurrentContext() != null) Context.exit();
|
||||
if(Context.getCurrentContext() != null) {
|
||||
Context.exit();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -301,7 +301,10 @@ public class GroupByQueryEngine
|
|||
public boolean hasNext()
|
||||
{
|
||||
boolean hasNext = delegate.hasNext() || !cursor.isDone();
|
||||
if(!hasNext) for(BufferAggregator agg : aggregators) agg.close();
|
||||
if(!hasNext) {
|
||||
// cleanup
|
||||
for(BufferAggregator agg : aggregators) agg.close();
|
||||
}
|
||||
return hasNext;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue