
com.sap.cds.ql.cqn.transformation.CqnGroupByTransformation Maven / Gradle / Ivy
/*******************************************************************
* © 2023 SAP SE or an SAP affiliate company. All rights reserved. *
*******************************************************************/
package com.sap.cds.ql.cqn.transformation;
import java.util.List;
import com.google.common.annotations.Beta;
import com.sap.cds.ql.cqn.CqnElementRef;
/**
* Transformation that groups the result set according to specified dimensions
* and applies given transformations to each group.
*
* The result set is the grouped input set after applying the transformations.
*
* Two scenarios are common:
*
* 1. the list of transformations is empty -> the output set contains the
* distinct values of the dimensions
*
* 2. a single {@link CqnAggregateTransformation aggregate} transformation is
* specified -> the output set contains the aggregated values per dimension
*/
@Beta
public interface CqnGroupByTransformation extends CqnTransformation {
/**
* Returns the dimensions by which the input set is grouped.
*
* @return the dimensions by which the input set is grouped.
*/
List dimensions();
/**
* Returns the pipeline of transformations, which is applied to the grouped
* input set.
*
* @return the pipeline of transformations
*/
default List transformations() {
return List.of();
}
@Override
default Kind kind() {
return Kind.GROUPBY;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy