Github user jihoonson commented on the pull request:
https://github.com/apache/tajo/pull/543#issuecomment-94567939
Thanks @dongjoon-hyun. The newly added test looks good, but have a
limitation. That is, it cannot test that the qualifier is properly guessed for
the simple column name in order-by clause. So, we need a test case to check the
query execution result in addition to the plan test.
In addition, I found that this patch cannot handle the case when there are
a column and an alias of same name. Please see the following example.
*Postgresql*
```
# explain select r_name as n_name from nation, region order by n_name;
QUERY PLAN
-------------------------------------------------------------------------
Sort (cost=284.00..293.25 rows=3700 width=32)
Sort Key: region.r_name
-> Nested Loop (cost=0.00..64.71 rows=3700 width=32)
-> Seq Scan on nation (cost=0.00..17.40 rows=740 width=0)
-> Materialize (cost=0.00..1.07 rows=5 width=32)
-> Seq Scan on region (cost=0.00..1.05 rows=5 width=32)
(6 rows)
```
*Tajo*
```
default> explain select r_name as n_name from nation, region order by
n_name;
ERROR: Ambiguous column name: n_name
```
I think that this case also handled in this patch.
---
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.
---