fixed issue with explain output with union
Added a util for additional functionality while testing Modified tests for simple and derived query