public SimpleExpression<A> getValue() {
        if (value == null) {
            int size = 0;
            List<Expression<?>> args = new ArrayList<>();
            StringBuilder builder = new StringBuilder();
            builder.append("{0} over (");
            args.add(target);
            size++;
            if (!partitionBy.isEmpty()) {
                builder.append(PARTITION_BY);
                boolean first = true;
                for (Expression<?> expr : partitionBy) {
                    if (!first) {
                        builder.append(", ");
                    }
                    builder.append("{").append(size).append("}");
                    args.add(expr);
                    size++;
                    first = false;
                }

            }
            if (!orderBy.isEmpty()) {
                if (!partitionBy.isEmpty()) {
                    builder.append(" ");
                }
                builder.append(ORDER_BY);
                builder.append("{").append(size).append("}");
                args.add(ExpressionUtils.orderBy(orderBy));
                size++;
            }
            if (rowsOrRange != null) {
                builder.append(rowsOrRange);
                args.addAll(rowsOrRangeArgs);
                size += rowsOrRangeArgs.size();
            }
            builder.append(")");
            value = Expressions.template(target.getType(), builder.toString(), Collections.unmodifiableList(args));
        }
        return value;
    }
{@code WindowFunction} is a builder for window function expressions

@param <A> expression type

@author tiwe
querydsl-sql/src/main/java/com/querydsl/sql/WindowFunction.java