feelshana opened a new issue, #31402:
URL: https://github.com/apache/doris/issues/31402

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   master
   
   ### What's Wrong?
   
   in our usage scenario, Doris is provided as a data source similar to MySQL 
and Clickhouse for data developers to write SQL and generate sql data models. 
the  operations personnel  dynamically choice the  dimensions and measures  
from the sql modle   to form dynamic reports, the sql from the model  is in the 
inner level as  subquery sql ;
   eg:
   
![374fe9416035ad82cf30ec3427fa51f](https://github.com/apache/doris/assets/10239391/5ee11daa-2f07-4da3-bf14-719cf5ee9276)
   Dimensions and measures are support user's dynamic  choice ,
   in this case   the sql will be  generated as   select dimension1,measure  
from (the sql from model)  as subQueryTable ,the EliminateSortUnderSubquery  
from rewrite rule will result in the loss of subquery sorting and the report is 
abnormal 
   eg:
   
![d02f9cdd277cda01453ecd07c3c4b7f](https://github.com/apache/doris/assets/10239391/73f7f508-d3a3-4a45-aeff-b21e76c1dcec)
   
   I used the disable_nereids_rules from the session parameter  to disable the 
EliminateSortUnderSubquery rule,but i found that  the rule share the same  
ruleType with EliminateOrderByConstant, thi disable will leads to 
EliminateOrderByConstant unavailable
   
   
   
   ### What You Expected?
   
   The EliminateSortUnderSubquery  will not affect the EliminateOrderByConstant 
rule
   
   ### How to Reproduce?
   
   _No response_
   
   ### 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: commits-unsubscr...@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to