object AggregateLibrary {
val Avg = new SqlFunction("avg")
}
def avg[T : JdbcType](c: Rep[T]) = agg.AggFuncRep[T](AggLibrary.Avg, List(c.toNode))
...
avg(salary).over.partitionBy(dept).orderBy(dept,salary)
.rowsFrame(RowCursor.UnboundPreceding, RowCursor.CurrentRow)
<=> avg(salary) over (partition by dept order by dept, salary rows between unbounded preceding and current row)
pg window function support, usage: