use of org.apache.drill.exec.physical.impl.scan.v3.file.BaseFileScanTest.DummyFileWork in project drill by apache.
the class TestFileScanLifecycle method testNoImplicit.
/**
* Sanity test that the file scan framework works the same as the base framework
* when no implicit columns are present.
*/
@Test
public void testNoImplicit() {
FileScanLifecycleBuilder builder = new FileScanLifecycleBuilder();
builder.rootDir(MOCK_ROOT_PATH);
builder.fileSplits(Collections.singletonList(new DummyFileWork(MOCK_FILE_PATH)));
builder.readerFactory(new FileReaderFactory() {
@Override
public ManagedReader newReader(FileSchemaNegotiator negotiator) {
return new MockEarlySchemaReader(negotiator, 1);
}
});
ScanLifecycle scan = buildScan(builder);
assertSame(ProjectionType.ALL, scan.schemaTracker().projectionType());
RowBatchReader reader = scan.nextReader();
assertTrue(reader.open());
assertTrue(reader.next());
RowSetUtilities.verify(simpleExpected(0), fixture.wrap(reader.output()));
assertFalse(reader.next());
reader.close();
scan.close();
}
Aggregations