use of org.apache.drill.exec.physical.impl.scan.v3.ManagedReader.EarlyEofException in project drill by apache.
the class TestScanLifecycleBasics method testEarlyEOF.
/**
* Single reader, late schema, early EOF.
* The scan never has a valid schema in this case.
*/
@Test
public void testEarlyEOF() {
ScanLifecycleBuilder builder = new ScanLifecycleBuilder();
builder.readerFactory(new SingleReaderFactory() {
@Override
public ManagedReader next(SchemaNegotiator negotiator) throws EarlyEofException {
return new NoDataReader(negotiator);
}
});
ScanLifecycle scan = buildScan(builder);
RowBatchReader reader = scan.nextReader();
assertFalse(reader.open());
reader.close();
assertFalse(scan.hasOutputSchema());
scan.close();
}
Aggregations