use of org.hibernate.sql.ast.tree.expression.FunctionExpression in project hibernate-orm by hibernate.
the class OracleSqlAstTranslator method visitOver.
@Override
public void visitOver(Over<?> over) {
final Expression expression = over.getExpression();
if (expression instanceof FunctionExpression && "row_number".equals(((FunctionExpression) expression).getFunctionName())) {
if (over.getPartitions().isEmpty() && over.getOrderList().isEmpty() && over.getStartKind() == FrameKind.UNBOUNDED_PRECEDING && over.getEndKind() == FrameKind.CURRENT_ROW && over.getExclusion() == FrameExclusion.NO_OTHERS) {
// Oracle doesn't allow an empty over clause for the row_number() function
append("rownum");
return;
}
}
super.visitOver(over);
}
Aggregations