use of org.apache.drill.exec.physical.resultSet.impl.ProjectionFilter in project drill by apache.
the class TestSchemaTrackerProjection method testExplicit.
@Test
public void testExplicit() {
ProjectionSchemaTracker tracker = schemaTracker(RowSetTestUtils.projectList("a", "b", "c"));
assertSame(ScanSchemaTracker.ProjectionType.SOME, tracker.projectionType());
assertTrue(0 < tracker.schemaVersion());
TupleMetadata schema = tracker.internalSchema().toSchema();
assertEquals(3, schema.size());
assertTrue(schema.metadata(0).isDynamic());
ProjectionFilter filter = tracker.projectionFilter(ERROR_CONTEXT);
assertTrue(filter instanceof DynamicSchemaFilter);
}
use of org.apache.drill.exec.physical.resultSet.impl.ProjectionFilter in project drill by apache.
the class TestSchemaTrackerProjection method testWildcardAndCols.
@Test
public void testWildcardAndCols() {
ProjectionSchemaTracker tracker = schemaTracker(RowSetTestUtils.projectList("a", SchemaPath.DYNAMIC_STAR, "b"));
assertFalse(tracker.isResolved());
assertTrue(0 < tracker.schemaVersion());
assertSame(ScanSchemaTracker.ProjectionType.ALL, tracker.projectionType());
assertNotNull(tracker.columnProjection("a"));
assertNotNull(tracker.columnProjection("b"));
TupleMetadata schema = tracker.internalSchema().toSchema();
assertEquals(2, schema.size());
assertTrue(schema.metadata(0).isDynamic());
ProjectionFilter filter = tracker.projectionFilter(ERROR_CONTEXT);
assertTrue(filter instanceof DynamicSchemaFilter);
}
Aggregations