Issue while executing series of nested queries and subqueries in dremio (Got UnsupportedOperationException)