Package io.substrait.relation
Class ImmutableAggregate
java.lang.Object
io.substrait.relation.AbstractRel
io.substrait.relation.SingleInputRel
io.substrait.relation.Aggregate
io.substrait.relation.ImmutableAggregate
- All Implemented Interfaces:
HasExtension,Rel
Immutable implementation of
Aggregate.
Use the builder to create immutable instances:
ImmutableAggregate.builder().
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class io.substrait.relation.Aggregate
Aggregate.Grouping, Aggregate.Measure -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableAggregate.Builderbuilder()Creates a builder forImmutableAggregate.static ImmutableAggregateCreates an immutable copy of aAggregatevalue.booleanThis instance is equal to all instances ofImmutableAggregatethat have equal attribute values.getHint()getInput()getRemap()inthashCode()Computes a hash code from attributes:extension,remap,commonExtension,hint,input,groupings,measures.toString()Prints the immutable valueAggregatewith attribute values.final ImmutableAggregateCopy the current immutable object by setting a present value for the optionalcommonExtensionattribute.final ImmutableAggregatewithCommonExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for thecommonExtensionattribute.final ImmutableAggregatewithExtension(AdvancedExtension value) Copy the current immutable object by setting a present value for the optionalextensionattribute.final ImmutableAggregatewithExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for theextensionattribute.final ImmutableAggregatewithGroupings(Aggregate.Grouping... elements) Copy the current immutable object with elements that replace the content ofgroupings.final ImmutableAggregatewithGroupings(Iterable<? extends Aggregate.Grouping> elements) Copy the current immutable object with elements that replace the content ofgroupings.final ImmutableAggregateCopy the current immutable object by setting a present value for the optionalhintattribute.final ImmutableAggregateCopy the current immutable object by setting an optional value for thehintattribute.final ImmutableAggregateCopy the current immutable object by setting a value for theinputattribute.final ImmutableAggregatewithMeasures(Aggregate.Measure... elements) Copy the current immutable object with elements that replace the content ofmeasures.final ImmutableAggregatewithMeasures(Iterable<? extends Aggregate.Measure> elements) Copy the current immutable object with elements that replace the content ofmeasures.final ImmutableAggregateCopy the current immutable object by setting a present value for the optionalremapattribute.final ImmutableAggregateCopy the current immutable object by setting an optional value for theremapattribute.Methods inherited from class io.substrait.relation.Aggregate
accept, deriveRecordTypeMethods inherited from class io.substrait.relation.SingleInputRel
getInputsMethods inherited from class io.substrait.relation.AbstractRel
getRecordType
-
Method Details
-
getExtension
- Returns:
- the
AdvancedExtensionassociated directly with the class
-
getRemap
- Returns:
- The value of the
remapattribute
-
getCommonExtension
- Returns:
- the
AdvancedExtensionassociated with aRelCommonmessage, if present
-
getHint
- Returns:
- The value of the
hintattribute
-
getInput
- Specified by:
getInputin classSingleInputRel- Returns:
- The value of the
inputattribute
-
getGroupings
- Specified by:
getGroupingsin classAggregate- Returns:
- The value of the
groupingsattribute
-
getMeasures
- Specified by:
getMeasuresin classAggregate- Returns:
- The value of the
measuresattribute
-
withExtension
Copy the current immutable object by setting a present value for the optionalextensionattribute.- Parameters:
value- The value for extension- Returns:
- A modified copy or
thisif not changed
-
withExtension
Copy the current immutable object by setting an optional value for theextensionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for extension- Returns:
- A modified copy or
thisif not changed
-
withRemap
Copy the current immutable object by setting a present value for the optionalremapattribute.- Parameters:
value- The value for remap- Returns:
- A modified copy or
thisif not changed
-
withRemap
Copy the current immutable object by setting an optional value for theremapattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for remap- Returns:
- A modified copy or
thisif not changed
-
withCommonExtension
Copy the current immutable object by setting a present value for the optionalcommonExtensionattribute.- Parameters:
value- The value for commonExtension- Returns:
- A modified copy or
thisif not changed
-
withCommonExtension
Copy the current immutable object by setting an optional value for thecommonExtensionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for commonExtension- Returns:
- A modified copy or
thisif not changed
-
withHint
Copy the current immutable object by setting a present value for the optionalhintattribute.- Parameters:
value- The value for hint- Returns:
- A modified copy or
thisif not changed
-
withHint
Copy the current immutable object by setting an optional value for thehintattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for hint- Returns:
- A modified copy or
thisif not changed
-
withInput
Copy the current immutable object by setting a value for theinputattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for input- Returns:
- A modified copy or the
thisobject
-
withGroupings
Copy the current immutable object with elements that replace the content ofgroupings.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withGroupings
Copy the current immutable object with elements that replace the content ofgroupings. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of groupings elements to set- Returns:
- A modified copy or
thisif not changed
-
withMeasures
Copy the current immutable object with elements that replace the content ofmeasures.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withMeasures
Copy the current immutable object with elements that replace the content ofmeasures. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of measures elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableAggregatethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:extension,remap,commonExtension,hint,input,groupings,measures. -
toString
Prints the immutable valueAggregatewith attribute values. -
copyOf
Creates an immutable copy of aAggregatevalue. 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 Aggregate instance
-
builder
Creates a builder forImmutableAggregate.ImmutableAggregate.builder() .extension(Optional<io.substrait.extension.AdvancedExtension>) // optionalextension.remap(Optional<io.substrait.relation.Rel.Remap>) // optionalremap.commonExtension(Optional<io.substrait.extension.AdvancedExtension>) // optionalcommonExtension.hint(Optional<io.substrait.hint.Hint>) // optionalhint.input(io.substrait.relation.Rel) // requiredinput.addGroupings|addAllGroupings(io.substrait.relation.Aggregate.Grouping) //groupingselements .addMeasures|addAllMeasures(io.substrait.relation.Aggregate.Measure) //measureselements .build();- Returns:
- A new ImmutableAggregate builder
-