siriume commented on issue #14372:
URL: https://github.com/apache/doris/issues/14372#issuecomment-1320125895

   > Group by gives higher priority to column name than alias, but order by 
prefer alias. This is the same as mysql. Master branch has corrected this 
behavior recently.
   
   query like this
   ```sql
   SELECT date_format(date, '%x%v') AS `date`, count(date) AS `diff_days`
   FROM tb_holiday
   where `date` between 20220101 AND 20220106
   GROUP BY `date`
   ORDER BY date;
   ```
   
   in 1.1.4-rc01, result like this
   ```sql
   202152,2
   202201,4
   ```
   
   in master f49a0daf543d843297aeaa7571aaa27ebaf6d5cb, even before this commit.
   ```sql
   202152,2
   202201,4
   ```
   
   in master 9de1fec6cc21aa81d744955f8cd1dca2a1148a57
   ```sql
   202152,1
   202152,1
   202201,1
   202201,1
   202201,1
   202201,1
   ```
   
   if doris change this action in 1.2.0 stable release, Please confirm as soon 
as possible and reply to this issue, cause we need to modify a lot of code to 
avoid inconsistent results after the upgrade(1.2.0 stable).


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