gravitino.dto.rel.distribution_dto.DistributionDTO

class gravitino.dto.rel.distribution_dto.DistributionDTO(strategy: Strategy, number: int, args: List[FunctionArg])

Bases: Distribution

Data transfer object representing distribution information.

Attributes:
NONE (DistributionDTO):

A DistributionDTO instance that represents no distribution.

__init__(strategy: Strategy, number: int, args: List[FunctionArg])

Methods

__init__(strategy, number, args)

args()

Returns the arguments of the function.

children()

Returns the child expressions.

equals(other)

Indicates whether some other object is "equal to" this one.

expressions()

Returns the name of the distribution.

number()

Returns the number of buckets.

references()

Returns a list of fields or columns that are referenced by this expression.

strategy()

Returns the strategy of the distribution.

validate(columns)

Validates the distribution.

Attributes

EMPTY_EXPRESSION

EMPTY_EXPRESSION is only used as an input when the default children method builds the result.

EMPTY_NAMED_REFERENCE

EMPTY_NAMED_REFERENCE is only used as an input when the default references method builds the result array to avoid repeatedly allocating an empty array.

NONE

EMPTY_EXPRESSION: List[Expression] = []

EMPTY_EXPRESSION is only used as an input when the default children method builds the result.

EMPTY_NAMED_REFERENCE: List[NamedReference] = []

EMPTY_NAMED_REFERENCE is only used as an input when the default references method builds the result array to avoid repeatedly allocating an empty array.

args() List[FunctionArg]

Returns the arguments of the function.

Returns:

List[FunctionArg]: The arguments of the function.

children() List[Expression]

Returns the child expressions.

equals(other: Distribution) bool

Indicates whether some other object is “equal to” this one.

Args:

other (Distribution): The reference distribution object with which to compare.

Returns:

bool: True if this object is the same as the other; False otherwise.

expressions() List[FunctionArg]

Returns the name of the distribution.

Returns:

List[FunctionArg]: The name of the distribution.

number() int

Returns the number of buckets.

Returns:

int: The number of buckets.

references() List[NamedReference]

Returns a list of fields or columns that are referenced by this expression.

strategy() Strategy

Returns the strategy of the distribution.

Returns:

Strategy: The strategy of the distribution.

validate(columns: List[ColumnDTO]) None

Validates the distribution.

Args:

columns (List[ColumnDTO]): The columns to be validated.

Raises:

IllegalArgumentException: If the distribution is invalid.