Search in sources :

Example 1 with OrderedSetAggregateFunctionExpression

use of org.hibernate.sql.ast.tree.expression.OrderedSetAggregateFunctionExpression in project hibernate-orm by hibernate.

the class AbstractSqlAstTranslator method visitOver.

@Override
public void visitOver(Over<?> over) {
    final Expression overExpression = over.getExpression();
    overExpression.accept(this);
    final boolean orderedSetAggregate;
    if (overExpression instanceof OrderedSetAggregateFunctionExpression) {
        final OrderedSetAggregateFunctionExpression expression = (OrderedSetAggregateFunctionExpression) overExpression;
        orderedSetAggregate = expression.getWithinGroup() != null && !expression.getWithinGroup().isEmpty();
    } else {
        orderedSetAggregate = false;
    }
    visitOverClause(over.getPartitions(), over.getOrderList(), over.getMode(), over.getStartKind(), over.getStartExpression(), over.getEndKind(), over.getEndExpression(), over.getExclusion(), orderedSetAggregate);
}
Also used : Expression(org.hibernate.sql.ast.tree.expression.Expression) BinaryArithmeticExpression(org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression) SelfRenderingExpression(org.hibernate.sql.ast.tree.expression.SelfRenderingExpression) OrderedSetAggregateFunctionExpression(org.hibernate.sql.ast.tree.expression.OrderedSetAggregateFunctionExpression) CaseSimpleExpression(org.hibernate.sql.ast.tree.expression.CaseSimpleExpression) SqlSelectionExpression(org.hibernate.sql.ast.tree.expression.SqlSelectionExpression) CaseSearchedExpression(org.hibernate.sql.ast.tree.expression.CaseSearchedExpression) ModifiedSubQueryExpression(org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression) OrderedSetAggregateFunctionExpression(org.hibernate.sql.ast.tree.expression.OrderedSetAggregateFunctionExpression)

Aggregations

BinaryArithmeticExpression (org.hibernate.sql.ast.tree.expression.BinaryArithmeticExpression)1 CaseSearchedExpression (org.hibernate.sql.ast.tree.expression.CaseSearchedExpression)1 CaseSimpleExpression (org.hibernate.sql.ast.tree.expression.CaseSimpleExpression)1 Expression (org.hibernate.sql.ast.tree.expression.Expression)1 ModifiedSubQueryExpression (org.hibernate.sql.ast.tree.expression.ModifiedSubQueryExpression)1 OrderedSetAggregateFunctionExpression (org.hibernate.sql.ast.tree.expression.OrderedSetAggregateFunctionExpression)1 SelfRenderingExpression (org.hibernate.sql.ast.tree.expression.SelfRenderingExpression)1 SqlSelectionExpression (org.hibernate.sql.ast.tree.expression.SqlSelectionExpression)1