NullPointerException in Sorter.logTuples
SergeySD opened this issue · comments
Sergey Stepanov commented
In OrderFunDef.evaluateList there is code that makes all lists except ArrayTupleList null
public TupleList evaluateList( Evaluator evaluator ) {
evaluator.getTiming().markStart( TIMING_NAME );
try {
final TupleIterable iterable = iterCalc.evaluateIterable( evaluator );
// REVIEW: If iterable happens to be a list, we'd like to pass it,
// but we cannot yet guarantee that it is mutable.
final TupleList list = iterable instanceof ArrayTupleList && false ? (TupleList) iterable : null;
// go by size of keySpecList before purging
and if logging enabled this null pass to Sorter.LogTuples and create NullPointerException.
I can't understand how to fix it better, should I add a check for null in LogTuples, or OrderFunDef works incorrectly.