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

   # Proposed changes
   
   Issue Number: close #xxx
   
   Consider the sql bellow:
   select
       sum(cc.qlnm) as qlnm
   FROM
       outerjoin_A 
       left join (
           SELECT
               outerjoin_B.b,
               **coalesce(outerjoin_C.c, 0)** AS `qlnm`
           FROM
               outerjoin_B
           inner JOIN 
               outerjoin_C
                       ON outerjoin_B.b = outerjoin_C.c
       ) cc on outerjoin_A.a = cc.b
   group by
       outerjoin_A.a;
   
   The **coalesce(outerjoin_C.c, 0)**  was calculated in the agg node, which is 
wrong. This pr correct this, and the expr is calculated in the inner join node 
now.
   
   Describe your changes.
   
   ## Checklist(Required)
   
   * [ ] Does it affect the original behavior
   * [ ] Has unit tests been added
   * [ ] Has document been added or modified
   * [ ] Does it need to update dependencies
   * [ ] Is this PR support rollback (If NO, please explain WHY)
   
   ## 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