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

   should not push down topn distinct through join when the output columns of 
the corresponding child of join is more than aggregate distinct columns.
   
   for example for LEFT_OUTER_JOIN:
   
   left child of join's output is: c1, c2, c3.
   distinct columns is: c1, c2
   topn: limit 2
   
   if we push down topn distinct, we could get result of join like this:
   
   ```
   c1    c2    c3, ...
   1     2     1
   1     2     2
   ```
   
   and the final result we get is:
   
   ```
   c1    c2
   1     2
   ```
   
   this is wrong, because we need 2 lines, but only return 1.
   
   ## Proposed changes
   
   Issue Number: close #xxx
   
   <!--Describe your changes.-->
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[[email protected]](mailto:[email protected]) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   
   


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