morrySnow opened a new pull request, #9745:
URL: https://github.com/apache/incubator-doris/pull/9745

   # Proposed changes
   
   Issue Number: close #9740 
   
   ## Problem Summary:
   
   Current, we process `order by` and `limit` in Doris only way:
   
https://github.com/apache/incubator-doris/blob/d97e2b1eb21b1026ef95f0cb5b87e0138c704de8/fe/fe-core/src/main/cup/sql_parser.cup#L3174-L3191
   
   I think we need to change it behavior to standard SQL. query organization 
need to be executed at last.
   
   change syntax to match standard sql:
   
   ```
   query = ctes? set_operand_list order_by limit
   set_operand_list = set_operand | set_operand_list set_op set_operand
   set_operand = selectClause fromClause? whereClause? aggregationClause? 
havingClause?
       | values
       | LEFT_PAREN query RIGHT_PAREN
   ```
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes)
   2. Has unit tests been added: (No)
   3. Has document been added or modified: (No Need)
   4. Does it need to update dependencies: (No)
   5. Are there any changes that cannot be rolled back: (No)
   
   ## Further comments
   
   add unit test and regression test later
   


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

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