Class ConversionPatterns


  • public abstract class ConversionPatterns
    extends Object
    Utility functions to convert from Java-like map and list types to equivalent Parquet types.
    • Constructor Detail

      • ConversionPatterns

        public ConversionPatterns()
    • Method Detail

      • 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