You are seeing those results because it is a UNION query. It is entirely possible that such a query could do something like
SELECT Col1 AS Field1 FROM Table1
UNION
SELECT Col2 AS Field1 FROM Table2
In that case there is no single "correct" answer if getColumnName
was to try and return the name of the underlying column in the result: Should it return 'Col1' or 'Col2'?
Since any column in the result set of a UNION query can be derived from more than one underlying column, getColumnName
can only return the effective name of that column, which is Field1
in the example above.