Class TruncatePartitioningDTO

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

public final class TruncatePartitioningDTO extends Object implements Partitioning
Represents the truncate partitioning.
  • Method Details

    • of

      public static TruncatePartitioningDTO of(int width, String[] fieldName)
      Constructs a truncate partitioning.
      Parameters:
      width - The width of the truncate partitioning.
      fieldName - The name of the field to partition.
      Returns:
      The truncate partitioning.
    • width

      public int width()
      Returns:
      The width of the partitioning.
    • fieldName

      public String[] fieldName()
      Returns:
      The name of the field to partition.
    • 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

      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.