Package org.apache.orc.impl
Class ParserUtils
java.lang.Object
org.apache.orc.impl.ParserUtils
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static interface
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MaskDescriptionImpl
buildMaskDescription
(String value) 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.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.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 void
findSubtype
(TypeDescription schema, int goal, ParserUtils.TypeVisitor visitor) static TypeDescription
findSubtype
(TypeDescription schema, ParserUtils.StringPosition source) static TypeDescription
findSubtype
(TypeDescription schema, ParserUtils.StringPosition source, boolean isSchemaEvolutionCaseAware) static List<TypeDescription>
findSubtypeList
(TypeDescription schema, ParserUtils.StringPosition source) static void
parseKeys
(ParserUtils.StringPosition source, TypeDescription schema) Annotate the given schema with the encryption information.static void
parseMasks
(ParserUtils.StringPosition source, TypeDescription schema) Annotate the given schema with the masking information.static String
parseName
(ParserUtils.StringPosition source) static TypeDescription
parseType
(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
-