Package org.apache.parquet.schema
Class GroupType
java.lang.Object
org.apache.parquet.schema.Type
org.apache.parquet.schema.GroupType
- Direct Known Subclasses:
MessageType
Represents a group type: a list of fields
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.parquet.schema.Type
Type.ID, Type.Repetition -
Constructor Summary
ConstructorsConstructorDescriptionGroupType(Type.Repetition repetition, String name, List<Type> fields) GroupType(Type.Repetition repetition, String name, OriginalType originalType, List<Type> fields) Deprecated.GroupType(Type.Repetition repetition, String name, OriginalType originalType, Type... fields) Deprecated.GroupType(Type.Repetition repetition, String name, Type... fields) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(TypeVisitor visitor) Visits this type with the given visitorbooleancontainsField(String name) protected booleancontainsPath(String[] path, int depth) protected <T> List<T>convertChildren(List<GroupType> path, TypeConverter<T> converter) protected booleanintintgetFieldIndex(String name) getFieldName(int index) returns the name of the corresponding fieldprotected intgetMaxDefinitionLevel(String[] path, int depth) protected intgetMaxRepetitionLevel(String[] path, int depth) getPaths(int depth) getType(int index) protected TypeinthashCode()booleanprotected booleantypeEquals(Type other) Deprecated.protected intDeprecated.protected Typeprotected TypewithId(int id) withNewFields(List<Type> newFields) withNewFields(Type... newFields) voidwriteToStringBuilder(StringBuilder sb, String indent) Writes a string representation to the provided StringBuilderMethods inherited from class org.apache.parquet.schema.Type
asGroupType, asPrimitiveType, eqOrBothNull, equals, getId, getLogicalTypeAnnotation, getName, getOriginalType, getRepetition, isRepetition, toString
-
Constructor Details
-
GroupType
- Parameters:
repetition- OPTIONAL, REPEATED, REQUIREDname- the name of the fieldfields- the contained fields
-
GroupType
- Parameters:
repetition- OPTIONAL, REPEATED, REQUIREDname- the name of the fieldfields- the contained fields
-
GroupType
@Deprecated public GroupType(Type.Repetition repetition, String name, OriginalType originalType, Type... fields) Deprecated.- Parameters:
repetition- OPTIONAL, REPEATED, REQUIREDname- the name of the fieldoriginalType- (optional) the original type to help with cross schema conversion (LIST, MAP, ...)fields- the contained fields
-
GroupType
@Deprecated public GroupType(Type.Repetition repetition, String name, OriginalType originalType, List<Type> fields) Deprecated.- Parameters:
repetition- OPTIONAL, REPEATED, REQUIREDname- the name of the fieldoriginalType- (optional) the original type to help with cross schema conversion (LIST, MAP, ...)fields- the contained fields
-
-
Method Details
-
withId
-
withNewFields
- Parameters:
newFields- a list of types to use as fields in a copy of this group- Returns:
- a group with the same attributes and new fields.
-
withNewFields
- Parameters:
newFields- an array of types to use as fields in a copy of this group- Returns:
- a group with the same attributes and new fields.
-
getFieldName
returns the name of the corresponding field- Parameters:
index- the index of the desired field in this type- Returns:
- the name of the field at this index
-
containsField
- Parameters:
name- the requested name- Returns:
- whether this type contains a field with that name
-
getFieldIndex
- Parameters:
name- string name of a field- Returns:
- the index of the field with that name
-
getFields
- Returns:
- the fields contained in this type
-
getFieldCount
public int getFieldCount()- Returns:
- the number of fields in this type
-
isPrimitive
public boolean isPrimitive()- Specified by:
isPrimitivein classType- Returns:
- false
-
getType
- Parameters:
fieldName- string name of a field- Returns:
- the type of this field by name
-
getType
- Parameters:
index- integer index of a field- Returns:
- the type of this field by index
-
writeToStringBuilder
Writes a string representation to the provided StringBuilder- Specified by:
writeToStringBuilderin classType- Parameters:
sb- the StringBuilder to write itself toindent- indentation level
-
accept
Visits this type with the given visitor -
typeHashCode
Deprecated.- Specified by:
typeHashCodein classType
-
typeEquals
Deprecated.- Specified by:
typeEqualsin classType
-
hashCode
public int hashCode() -
equals
-
getMaxRepetitionLevel
- Specified by:
getMaxRepetitionLevelin classType
-
getMaxDefinitionLevel
- Specified by:
getMaxDefinitionLevelin classType
-
getType
-
containsPath
- Specified by:
containsPathin classType
-
getPaths
-
convertChildren
-
union
-
union
-