Search in sources :

Example 66 with SchemaChangeException

use of org.apache.drill.exec.exception.SchemaChangeException in project drill by apache.

the class TestOutputMutator method removeField.

public void removeField(MaterializedField field) throws SchemaChangeException {
    ValueVector vector = fieldVectorMap.remove(field);
    if (vector == null) {
        throw new SchemaChangeException("Failure attempting to remove an unknown field.");
    }
    container.remove(vector);
    vector.close();
}
Also used : ValueVector(org.apache.drill.exec.vector.ValueVector) SchemaChangeException(org.apache.drill.exec.exception.SchemaChangeException)

Aggregations

SchemaChangeException (org.apache.drill.exec.exception.SchemaChangeException)66 IOException (java.io.IOException)23 MaterializedField (org.apache.drill.exec.record.MaterializedField)20 ErrorCollector (org.apache.drill.common.expression.ErrorCollector)18 ErrorCollectorImpl (org.apache.drill.common.expression.ErrorCollectorImpl)18 LogicalExpression (org.apache.drill.common.expression.LogicalExpression)18 ValueVector (org.apache.drill.exec.vector.ValueVector)18 ClassTransformationException (org.apache.drill.exec.exception.ClassTransformationException)16 TransferPair (org.apache.drill.exec.record.TransferPair)9 HoldingContainer (org.apache.drill.exec.expr.ClassGenerator.HoldingContainer)8 TypedFieldId (org.apache.drill.exec.record.TypedFieldId)8 ExecutionSetupException (org.apache.drill.common.exceptions.ExecutionSetupException)7 Ordering (org.apache.drill.common.logical.data.Order.Ordering)7 JConditional (com.sun.codemodel.JConditional)6 NamedExpression (org.apache.drill.common.logical.data.NamedExpression)6 ValueVectorWriteExpression (org.apache.drill.exec.expr.ValueVectorWriteExpression)6 RecordBatchLoader (org.apache.drill.exec.record.RecordBatchLoader)6 VectorContainer (org.apache.drill.exec.record.VectorContainer)6 SchemaPath (org.apache.drill.common.expression.SchemaPath)5 RecordBatchData (org.apache.drill.exec.physical.impl.sort.RecordBatchData)5