Class ParserUtils

java.lang.Object
org.apache.orc.impl.ParserUtils

public class ParserUtils extends Object
  • Constructor Details

    • ParserUtils

      public ParserUtils()
  • Method Details

    • parseName

      public static String parseName(ParserUtils.StringPosition source)
    • parseType

      public static TypeDescription parseType(ParserUtils.StringPosition source)
    • findSubtype

      public static TypeDescription findSubtype(TypeDescription schema, ParserUtils.StringPosition source)
    • findSubtype

      public static TypeDescription findSubtype(TypeDescription schema, ParserUtils.StringPosition source, boolean isSchemaEvolutionCaseAware)
    • findSubtype

      public static void findSubtype(TypeDescription schema, int goal, ParserUtils.TypeVisitor visitor)
    • findColumn

      public static void findColumn(TypeDescription schema, ParserUtils.StringPosition source, boolean isSchemaEvolutionCaseAware, ParserUtils.TypeVisitor visitor)
      Find a column in a schema by walking down the type tree to find the right column.
      Parameters:
      schema - the schema to look in
      source - the name of the column
      isSchemaEvolutionCaseAware - should the string compare be case sensitive
      visitor - The visitor, which is called on each level
    • findColumn

      public static void findColumn(TypeDescription schema, List<String> names, boolean isSchemaEvolutionCaseAware, ParserUtils.TypeVisitor visitor)
      Find a column in a schema by walking down the type tree to find the right column.
      Parameters:
      schema - the schema to look in
      names - the name of the column broken into a list of names per level
      isSchemaEvolutionCaseAware - should the string compare be case sensitive
      visitor - The visitor, which is called on each level
    • findColumnVectors

      public static org.apache.hadoop.hive.ql.exec.vector.ColumnVector[] findColumnVectors(TypeDescription schema, ParserUtils.StringPosition source, boolean isCaseSensitive, org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch)
    • findSubtypeList

      public static List<TypeDescription> findSubtypeList(TypeDescription schema, ParserUtils.StringPosition source)
    • parseKeys

      public static void parseKeys(ParserUtils.StringPosition source, TypeDescription schema)
      Annotate the given schema with the encryption information. Format of the string is a key-list.
      • key-list = key (';' key-list)?
      • key = key-name ':' field-list
      • field-list = field-name ( ',' field-list )?
      • field-name = number | field-part ('.' field-name)?
      • field-part = quoted string | simple name
      Parameters:
      source - the string to parse
      schema - the top level schema
      Throws:
      IllegalArgumentException - if there are conflicting keys for a field
    • parseMasks

      public static void parseMasks(ParserUtils.StringPosition source, TypeDescription schema)
      Annotate the given schema with the masking information. Format of the string is a mask-list.
      • mask-list = mask (';' mask-list)?
      • mask = mask-name (',' parameter)* ':' field-list
      • field-list = field-name ( ',' field-list )?
      • field-name = number | field-part ('.' field-name)?
      • field-part = quoted string | simple name
      Parameters:
      source - the string to parse
      schema - the top level schema
      Throws:
      IllegalArgumentException - if there are conflicting masks for a field
    • buildMaskDescription

      public static MaskDescriptionImpl buildMaskDescription(String value)