Yulei-Yang opened a new pull request, #33193:
URL: https://github.com/apache/doris/pull/33193
Two improvements:
1. for queries on doris inner table, sql like:
```sql
select type, _c1 from (SELECT `type`, count(*) FROM `db1`.`table1` GROUP BY
`type`) t1;
```
2. act like hive, for queries on hive view which use inner name, sql like:
```sql
#hive
create view v1 as
select r_name,
`_c1` as col1
from
(select r_name,
count(*)
from region
group by r_name) t1;
#doris
select * from hms_catalog.hms_db.v1;
```
**Restriction:**
Inner name can only be used for derived/calculated column, same with hive.
In the first sql example above, column type in inner query is not
derived/calculated column, below sql is error:
```sql
mysql> select _c0, _c1 from (SELECT `type`, count(*) FROM `db1`.`table1`
GROUP BY `type`) t1;
ERROR 1054 (42S22): errCode = 2, detailMessage = Unknown column '_c0' in
'table list'
```
## Proposed changes
Issue Number: close #xxx
<!--Describe your changes.-->
## Further comments
If this is a relatively large or complex change, kick off the discussion at
[[email protected]](mailto:[email protected]) by explaining why you
chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]