gravitino.api.rel.expressions.distributions.distributions.DistributionImpl

class gravitino.api.rel.expressions.distributions.distributions.DistributionImpl(strategy: Strategy, number: int, expressions: List[Expression])

Bases: Distribution

__init__(strategy: Strategy, number: int, expressions: List[Expression])

Methods

__init__(strategy, number, expressions)

children()

Returns the child expressions.

equals(other)

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

expressions()

Return The expressions passed to the distribution function.

number()

Return The number of buckets/distribution.

references()

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

strategy()

Return the distribution strategy name.

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.

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.

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[Expression]

Return The expressions passed to the distribution function.

number() int

Return The number of buckets/distribution. For example, if the distribution strategy is HASH and the number is 10, then the data is distributed across 10 buckets.

references() List[NamedReference]

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

strategy() Strategy

Return the distribution strategy name.