Files
doris/regression-test/data/query_p0/join/test_join5.out
starocean999 479d57df88 [fix](planner) the project expr should be calculated in join node in some case (#17035)
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.
2023-02-24 15:20:05 +08:00

27 lines
274 B
Plaintext

-- This file is automatically generated. You should know what you did if you want to edit this
-- !join1 --
0
1
9999
-- !join2 --
0 1 9999
-- !join3 --
53 \N \N
-- !join4 --
53 \N \N
-- !join5 --
A p 2 -1
B q 0 -1
C \N \N \N
-- !join5 --
1 1 1 1
-- !join6 --
1 1 1 1