gravitino.api.rel.expressions.distributions.distribution.Distribution

class gravitino.api.rel.expressions.distributions.distribution.Distribution

Bases: Expression

An interface that defines how data is distributed across partitions.

__init__()

Methods

__init__()

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.

abstract expressions() List[Expression]

Return The expressions passed to the distribution function.

abstract 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.

abstract strategy() Strategy

Return the distribution strategy name.