Package org.apache.parquet.schema
Class ConversionPatterns
- java.lang.Object
-
- org.apache.parquet.schema.ConversionPatterns
-
public abstract class ConversionPatterns extends Object
Utility functions to convert from Java-like map and list types to equivalent Parquet types.
-
-
Constructor Summary
Constructors Constructor Description ConversionPatterns()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static GroupTypelistOfElements(Type.Repetition listRepetition, String name, Type elementType)Creates a 3-level list structure annotated with LIST with elements of the given elementType.static GroupTypelistType(Type.Repetition repetition, String alias, Type nestedType)Deprecated.use listOfElements insteadstatic GroupTypemapType(Type.Repetition repetition, String alias, String mapAlias, Type keyType, Type valueType)static GroupTypemapType(Type.Repetition repetition, String alias, Type keyType, Type valueType)static GroupTypestringKeyMapType(Type.Repetition repetition, String alias, String mapAlias, Type valueType)static GroupTypestringKeyMapType(Type.Repetition repetition, String alias, Type valueType)
-
-
-
Method Detail
-
mapType
public static GroupType mapType(Type.Repetition repetition, String alias, Type keyType, Type valueType)
-
stringKeyMapType
public static GroupType stringKeyMapType(Type.Repetition repetition, String alias, String mapAlias, Type valueType)
-
stringKeyMapType
public static GroupType stringKeyMapType(Type.Repetition repetition, String alias, Type valueType)
-
mapType
public static GroupType mapType(Type.Repetition repetition, String alias, String mapAlias, Type keyType, Type valueType)
-
listType
@Deprecated public static GroupType listType(Type.Repetition repetition, String alias, Type nestedType)
Deprecated.use listOfElements instead- Parameters:
repetition- repetition for the listalias- name of the fieldnestedType- type of elements in the list- Returns:
- a group representing the list using a 2-level representation
-
listOfElements
public static GroupType listOfElements(Type.Repetition listRepetition, String name, Type elementType)
Creates a 3-level list structure annotated with LIST with elements of the given elementType. The repeated level is inserted automatically and the elementType's repetition should be the correct repetition of the elements, required for non-null and optional for nullable.- Parameters:
listRepetition- the repetition of the entire list structurename- the name of the list structure typeelementType- the type of elements contained by the list- Returns:
- a GroupType that represents the list
-
-