Package org.apache.parquet.schema
Class MessageType
- java.lang.Object
-
- org.apache.parquet.schema.Type
-
- org.apache.parquet.schema.GroupType
-
- org.apache.parquet.schema.MessageType
-
public final class MessageType extends GroupType
The root of a schema
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.parquet.schema.Type
Type.ID, Type.Repetition
-
-
Constructor Summary
Constructors Constructor Description MessageType(String name, List<Type> fields)MessageType(String name, Type... fields)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(TypeVisitor visitor)Visits this type with the given visitorvoidcheckContains(Type subType)booleancontainsPath(String[] path)<T> TconvertWith(TypeConverter<T> converter)ColumnDescriptorgetColumnDescription(String[] path)List<ColumnDescriptor>getColumns()intgetMaxDefinitionLevel(String... path)intgetMaxRepetitionLevel(String... path)List<String[]>getPaths()TypegetType(String... path)MessageTypeunion(MessageType toMerge)MessageTypeunion(MessageType toMerge, boolean strict)voidwriteToStringBuilder(StringBuilder sb, String indent)Writes a string representation to the provided StringBuilder-
Methods inherited from class org.apache.parquet.schema.GroupType
containsField, containsPath, convertChildren, equals, getFieldCount, getFieldIndex, getFieldName, getFields, getMaxDefinitionLevel, getMaxRepetitionLevel, getPaths, getType, getType, getType, hashCode, isPrimitive, typeEquals, typeHashCode, union, union, withId, withNewFields, withNewFields
-
Methods inherited from class org.apache.parquet.schema.Type
asGroupType, asPrimitiveType, eqOrBothNull, equals, getId, getLogicalTypeAnnotation, getName, getOriginalType, getRepetition, isRepetition, toString
-
-
-
-
Method Detail
-
accept
public void accept(TypeVisitor visitor)
Visits this type with the given visitor
-
writeToStringBuilder
public void writeToStringBuilder(StringBuilder sb, String indent)
Writes a string representation to the provided StringBuilder- Overrides:
writeToStringBuilderin classGroupType- Parameters:
sb- the StringBuilder to write itself toindent- indentation level
-
getMaxRepetitionLevel
public int getMaxRepetitionLevel(String... path)
- Parameters:
path- an array of strings representing the name path in this type- Returns:
- the max repetition level that might be needed to encode the type at 'path'.
-
getMaxDefinitionLevel
public int getMaxDefinitionLevel(String... path)
- Parameters:
path- an array of strings representing the name path in this type- Returns:
- the max repetition level that might be needed to encode the type at 'path'.
-
getColumnDescription
public ColumnDescriptor getColumnDescription(String[] path)
-
getColumns
public List<ColumnDescriptor> getColumns()
-
checkContains
public void checkContains(Type subType)
-
convertWith
public <T> T convertWith(TypeConverter<T> converter)
-
containsPath
public boolean containsPath(String[] path)
-
union
public MessageType union(MessageType toMerge)
-
union
public MessageType union(MessageType toMerge, boolean strict)
-
-