Class SchemaExprParser

java.lang.Object
org.apache.drill.exec.record.metadata.schema.parser.SchemaExprParser

public class SchemaExprParser extends Object
  • Constructor Details

    • SchemaExprParser

      public SchemaExprParser()
  • Method Details

    • parseSchema

      public static TupleMetadata parseSchema(String schema) throws IOException
      Parses string definition of the schema and converts it into TupleMetadata instance.
      Parameters:
      schema - schema definition
      Returns:
      metadata description of the schema
      Throws:
      IOException - when unable to parse the schema
    • parseColumn

      public static ColumnMetadata parseColumn(String name, String type, TypeProtos.DataMode mode) throws IOException
      Parses given column name, type and mode into ColumnMetadata instance.
      Parameters:
      name - column name
      type - column type
      mode - column mode
      Returns:
      column metadata
      Throws:
      IOException - when unable to parse the column
    • parseColumn

      public static ColumnMetadata parseColumn(String column) throws IOException
      Parses string definition of the column and converts it into ColumnMetadata instance.
      Parameters:
      column - column definition
      Returns:
      metadata description of the column
      Throws:
      IOException - when unable to parse the column