Github user jihoonson commented on the pull request:

    https://github.com/apache/tajo/pull/543#issuecomment-94330635
  
    Ok. I found following quotes from the link you shard.
    ```
    ... A sort_expression can also be the column label or number of an output 
column, ...
    ```
    ```
    ... There is still ambiguity if an ORDER BY item is a simple name that 
could match either an output column name or a column from the table expression. 
The output column is used in such cases. This would only cause confusion if you 
use AS to rename an output column to match some other table column's name.
    
    ORDER BY can be applied to the result of a UNION, INTERSECT, or EXCEPT 
combination, but in this case it is only permitted to sort by output column 
names or numbers, not by expressions.
    ```
    The second quote looks to give a description related to this issue. 
According to this quote, column labels, expressions, and numbers of each output 
column can be resolved with the columns in the query's select list.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to