Package io.substrait.relation
Class ImmutableGrouping
java.lang.Object
io.substrait.relation.Aggregate.Grouping
io.substrait.relation.ImmutableGrouping
Immutable implementation of
Aggregate.Grouping.
Use the builder to create immutable instances:
ImmutableGrouping.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableGrouping.Builderbuilder()Creates a builder forImmutableGrouping.static ImmutableGroupingcopyOf(Aggregate.Grouping instance) Creates an immutable copy of aAggregate.Groupingvalue.booleanThis instance is equal to all instances ofImmutableGroupingthat have equal attribute values.inthashCode()Computes a hash code from attributes:expressions.toString()Prints the immutable valueGroupingwith attribute values.final ImmutableGroupingwithExpressions(Expression... elements) Copy the current immutable object with elements that replace the content ofexpressions.final ImmutableGroupingwithExpressions(Iterable<? extends Expression> elements) Copy the current immutable object with elements that replace the content ofexpressions.
-
Method Details
-
getExpressions
- Specified by:
getExpressionsin classAggregate.Grouping- Returns:
- The value of the
expressionsattribute
-
withExpressions
Copy the current immutable object with elements that replace the content ofexpressions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withExpressions
Copy the current immutable object with elements that replace the content ofexpressions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of expressions elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableGroupingthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:expressions. -
toString
Prints the immutable valueGroupingwith attribute values. -
copyOf
Creates an immutable copy of aAggregate.Groupingvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Grouping instance
-
builder
Creates a builder forImmutableGrouping.ImmutableGrouping.builder() .addExpressions|addAllExpressions(io.substrait.expression.Expression) //expressionselements .build();- Returns:
- A new ImmutableGrouping builder
-