}
assertEquals(1.0f, exec.getProgress(), 0);
assertEquals(numTuple, cnt);
TableStats tableStats = exec.getInputStats();
assertNotNull(tableStats);
assertEquals(testDataStats.getNumBytes().longValue(), tableStats.getNumBytes().longValue());
assertEquals(cnt, testDataStats.getNumRows().longValue());
assertEquals(cnt, tableStats.getNumRows().longValue());
assertEquals(testDataStats.getNumBytes().longValue(), tableStats.getReadBytes().longValue());
// for rescan test
preVal = null;
exec.rescan();
cnt = 0;
while ((tuple = exec.next()) != null) {
curVal = tuple;
if (preVal != null) {
assertTrue("prev: " + preVal + ", but cur: " + curVal, comparator.compare(preVal, curVal) <= 0);
}
preVal = curVal;
cnt++;
}
assertEquals(1.0f, exec.getProgress(), 0);
assertEquals(numTuple, cnt);
exec.close();
assertEquals(1.0f, exec.getProgress(), 0);
tableStats = exec.getInputStats();
assertNotNull(tableStats);
assertEquals(testDataStats.getNumBytes().longValue(), tableStats.getNumBytes().longValue());
assertEquals(cnt, testDataStats.getNumRows().longValue());
assertEquals(cnt, tableStats.getNumRows().longValue());
assertEquals(testDataStats.getNumBytes().longValue(), tableStats.getReadBytes().longValue());
}