wutiangan opened a new pull request #3476:
URL: https://github.com/apache/incubator-doris/pull/3476


   **1. phenomenon:**
   
   The following two statements are the same, but a query has results and the 
other query has no results
   
   mysql> select * from (select '积极' as kk1, sum(k2) from table_range where k1 
= '2013-01-01' group by kk1)tt where kk1 = '积极';        
   +--------+-----------+
   | kk1    | sum(`k2`) |
   +--------+-----------+
   | 积极 |         1 |
   +--------+-----------+
   1 row in set (0.01 sec)
   
   mysql> select * from (select '积极' as kk1, sum(k2) from table_range where k1 
= '2013-01-01' group by kk1)tt where kk1 in ('积极');     
   Empty set (0.01 sec)
   
   
   **2. reason:**
   
   In partition prune, constant in predicate(‘积极’ in ‘积极’) is mistakenly 
considered to meet partition prune conditions, and mistakenly regarded as 
partition prune column. Then in partition prune , no partition is considered to 
meet the requirements, so it is planned to be 0 partition in query planning
   
   @morningman 
   


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

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