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 Details

    • ConversionPatterns

      public ConversionPatterns()
  • Method Details

    • 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 list
      alias - name of the field
      nestedType - 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 structure
      name - the name of the list structure type
      elementType - the type of elements contained by the list
      Returns:
      a GroupType that represents the list