squigglies ftw

This commit is contained in:
xvrl 2013-03-20 11:41:40 -07:00
parent c68bd66945
commit 8eec41f934
2 changed files with 7 additions and 2 deletions

View File

@ -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();
}
}
};
}

View File

@ -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;
}