Search in sources :

Example 1 with VariantSchema

use of org.apache.drill.exec.record.metadata.VariantSchema in project drill by apache.

the class SingleSchemaInference method inferListSchema.

private VariantSchema inferListSchema(ListVector vector) {
    final ValueVector dataVector = vector.getDataVector();
    if (dataVector instanceof UnionVector) {
        return inferUnionSchema((UnionVector) dataVector);
    }
    final VariantSchema schema = new VariantSchema();
    if (!vector.isEmptyType()) {
        schema.addType(inferVector(dataVector));
    }
    return schema;
}
Also used : ValueVector(org.apache.drill.exec.vector.ValueVector) VariantSchema(org.apache.drill.exec.record.metadata.VariantSchema) UnionVector(org.apache.drill.exec.vector.complex.UnionVector)

Aggregations

VariantSchema (org.apache.drill.exec.record.metadata.VariantSchema)1 ValueVector (org.apache.drill.exec.vector.ValueVector)1 UnionVector (org.apache.drill.exec.vector.complex.UnionVector)1