Class ListPartitioningDTO

java.lang.Object
org.apache.gravitino.dto.rel.partitioning.ListPartitioningDTO
All Implemented Interfaces:
Partitioning, Expression, Transform

public final class ListPartitioningDTO extends Object implements Partitioning
Data transfer object representing a list partitioning.
  • Method Details

    • of

      public static ListPartitioningDTO of(String[][] fieldNames)
      Creates a new ListPartitioningDTO with no pre-assigned partitions.
      Parameters:
      fieldNames - The names of the fields to partition.
      Returns:
      The new ListPartitioningDTO.
    • of

      public static ListPartitioningDTO of(String[][] fieldNames, ListPartitionDTO[] assignments)
      Creates a new ListPartitioningDTO.
      Parameters:
      fieldNames - The names of the fields to partition.
      assignments - The pre-assigned list partitions.
      Returns:
      The new ListPartitioningDTO.
    • fieldNames

      public String[][] fieldNames()
      Returns:
      The names of the fields to partition.
    • assignments

      public ListPartitionDTO[] assignments()
      Specified by:
      assignments in interface Transform
      Returns:
      The preassigned partitions in the partitioning. Currently, only Transforms.ListTransform and Transforms.RangeTransform need to deal with assignments
    • strategy

      public Partitioning.Strategy strategy()
      Description copied from interface: Partitioning
      Returns the name of the partitioning strategy.
      Specified by:
      strategy in interface Partitioning
      Returns:
      The strategy of the partitioning.
    • validate

      public void validate(ColumnDTO[] columns) throws IllegalArgumentException
      Validates the partitioning columns.
      Specified by:
      validate in interface Partitioning
      Parameters:
      columns - The columns to be validated.
      Throws:
      IllegalArgumentException - If the columns are invalid, this exception is thrown.
    • name

      public String name()
      Specified by:
      name in interface Transform
      Returns:
      The name of the partitioning strategy.
    • arguments

      public Expression[] arguments()
      Specified by:
      arguments in interface Transform
      Returns:
      The arguments of the partitioning strategy.