Postgresql Moving Average Window Functions In Spark