Well, take a look at ResultColumnList.java. It has special logic to generate a result column name if either side of a UNION has a generated name or have implied or user specified names that don't match. I believe documentation should match intended behavior of the current code. Of course, the intended behavior of the code could be changed, and if and when it changes, the documentation could change then.
Satheesh >The code needs to be corrected. The documentation is correct. > >The rule explained by the doc is also why expressions in the first >SelectExpression need to have aliases whereas expressions in the subsequent >SelectExpressions do not require aliases. > > > > >