Make sure UNION queries have columns

Fixes problem where text output from a UNION query always seemed to be empty.
Merge pull request #826 from systay/union-output

Make sure UNION queries have columns