Class DistributionDTO

java.lang.Object
org.apache.gravitino.dto.rel.DistributionDTO
All Implemented Interfaces:
Distribution, Expression

public class DistributionDTO extends Object implements Distribution
Data transfer object representing distribution information.
  • Field Details

    • NONE

      public static final DistributionDTO NONE
      A DistributionDTO instance that represents no distribution.
  • Method Details

    • builder

      public static DistributionDTO.Builder builder()
      Creates a new instance of DistributionDTO.Builder.
      Returns:
      The new instance.
    • args

      public FunctionArg[] args()
      Returns the arguments of the function.
      Returns:
      The arguments of the function.
    • strategy

      public Strategy strategy()
      Returns the strategy of the distribution.
      Specified by:
      strategy in interface Distribution
      Returns:
      The strategy of the distribution.
    • number

      public int number()
      Returns the number of buckets.
      Specified by:
      number in interface Distribution
      Returns:
      The number of buckets.
    • expressions

      public Expression[] expressions()
      Returns the name of the distribution.
      Specified by:
      expressions in interface Distribution
      Returns:
      The name of the distribution.
    • validate

      public void validate(ColumnDTO[] columns) throws IllegalArgumentException
      Validates the distribution.
      Parameters:
      columns - The columns to be validated.
      Throws:
      IllegalArgumentException - If the distribution is invalid.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object