TPCH-Q18 manually implemented, but Spark memory issues.