Package org.apache.orc.impl
Class ParserUtils
java.lang.Object
org.apache.orc.impl.ParserUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MaskDescriptionImplbuildMaskDescription(String value) static voidfindColumn(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.static voidfindColumn(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.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) static voidfindSubtype(TypeDescription schema, int goal, ParserUtils.TypeVisitor visitor) static TypeDescriptionfindSubtype(TypeDescription schema, ParserUtils.StringPosition source) static TypeDescriptionfindSubtype(TypeDescription schema, ParserUtils.StringPosition source, boolean isSchemaEvolutionCaseAware) static List<TypeDescription>findSubtypeList(TypeDescription schema, ParserUtils.StringPosition source) static voidparseKeys(ParserUtils.StringPosition source, TypeDescription schema) Annotate the given schema with the encryption information.static voidparseMasks(ParserUtils.StringPosition source, TypeDescription schema) Annotate the given schema with the masking information.static StringparseName(ParserUtils.StringPosition source) static TypeDescriptionparseType(ParserUtils.StringPosition source)
-
Constructor Details
-
ParserUtils
public ParserUtils()
-
-
Method Details
-
parseName
-
parseType
-
findSubtype
public static TypeDescription findSubtype(TypeDescription schema, ParserUtils.StringPosition source) -
findSubtype
public static TypeDescription findSubtype(TypeDescription schema, ParserUtils.StringPosition source, boolean isSchemaEvolutionCaseAware) -
findSubtype
-
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 insource- the name of the columnisSchemaEvolutionCaseAware- should the string compare be case sensitivevisitor- 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 innames- the name of the column broken into a list of names per levelisSchemaEvolutionCaseAware- should the string compare be case sensitivevisitor- 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
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 parseschema- the top level schema- Throws:
IllegalArgumentException- if there are conflicting keys for a field
-
parseMasks
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 parseschema- the top level schema- Throws:
IllegalArgumentException- if there are conflicting masks for a field
-
buildMaskDescription
-