use of org.apache.drill.exec.record.metadata.UnionBuilder in project drill by apache.
the class TestSchemaBuilder method testStandaloneUnionBuilder.
@Test
public void testStandaloneUnionBuilder() {
ColumnMetadata columnMetadata = new UnionBuilder("u", MinorType.UNION).addType(MinorType.INT).addType(MinorType.VARCHAR).buildColumn();
assertEquals("u", columnMetadata.name());
assertTrue(columnMetadata.isVariant());
VariantMetadata variantMetadata = columnMetadata.variantSchema();
assertTrue(variantMetadata.hasType(MinorType.INT));
assertTrue(variantMetadata.hasType(MinorType.VARCHAR));
}
Aggregations