Hi Mani
As Soubhik mentiones, setting the initial-heap and max-heap parameters should set the relevant parameters in the Resource Manager that will avoid OOM. We also are working on changes to minimize intermediate data and stream results when possible (if the queries don't have order-by/distinct/group-by that require all required data first).
(there was some glitch in the forum notifications so there was a delay in replies)
thanks
sumedh