Class BucketPartitioningDTO

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

public final class BucketPartitioningDTO extends Object implements Partitioning
Data transfer object representing bucket partitioning.
  • Method Details

    • of

      public static BucketPartitioningDTO of(int numBuckets, String[]... fieldNames)
      Creates a new instance of BucketPartitioningDTO.
      Parameters:
      numBuckets - The number of buckets.
      fieldNames - The field names.
      Returns:
      The new instance.
    • numBuckets

      public int numBuckets()
      Returns the number of buckets.
      Returns:
      The number of buckets.
    • fieldNames

      public String[][] fieldNames()
      Returns the field names.
      Returns:
      The field names.
    • 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.