luozenglin opened a new issue #7492:
URL: https://github.com/apache/incubator-doris/issues/7492


   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Version
   
   0.15
   
   ### What's Wrong?
   
   When I set the table name to be stored in lowercase, I get an error 'Unknown 
column' when I set the alias for query.
   
   ### What You Expected?
   
   Aliases are also case-insensitive when lower_case_table_names=1 is set.
   
   ### How to Reproduce?
   
   Set 'lower_case_table_names=1' in fe.conf
   sql:
   ```
   create database test;
   
   CREATE TABLE test.fin_setl_brch_pick_amt(
     `setl_dt` date NULL COMMENT "",
     `rtn_pre_amt` decimal(18, 6) NULL COMMENT ""
   ) ENGINE=OLAP
   DUPLICATE KEY(`setl_dt`)
   DISTRIBUTED BY HASH(`setl_dt`) BUCKETS 1
   properties(
       "replication_allocation" = "tag.location.default: 1"
   );
   
   mysql> explain SELECT t.`setl_dt` , sum(T.`rtn_pre_amt`) AS 
'sum(rtn_pre_amt)' FROM (select setl_dt,rtn_pre_amt from 
test.fin_setl_brch_pick_amt) T GROUP BY `setl_dt`;
   ERROR 1054 (42S22): errCode = 2, detailMessage = Unknown column 'setl_dt' in 
't'
   ```
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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]

Reply via email to