Class SchemaBuilder


public class SchemaBuilder extends Object
Builder of a row set schema expressed as a list of materialized fields. Optimized for use when creating schemas by hand in tests.

Example usage to create the following schema:
(c: INT, a: MAP(b: VARCHAR, d: INT, e: MAP(f: VARCHAR), g: INT), h: UNION(INT, MAP(h1: INT), LIST(BIGINT)), i: BIGINT[], j: VARCHAR[][][])


     TupleMetadata schema = new SchemaBuilder()
        .add("c", MinorType.INT)
          .addNullable("b", MinorType.VARCHAR)
          .add("d", MinorType.INT)
          .addMap("e") // or .addMapArray("e")
            .add("f", MinorType.VARCHAR)
          .add("g", MinorType.INT)
        .addUnion("h") // or .addList("h")
            .add("h1", MinorType.INT)
        .addArray("i", MinorType.BIGINT)