doris icon indicating copy to clipboard operation
doris copied to clipboard

[Bug] The result of left join operator is empty

Open gongzexin opened this issue 2 years ago • 1 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Version

1.1.1

What's Wrong?

The result of left join operator is empty

What You Expected?

The result set is: CW20210501005770-CN CW20210521029956-CN CW20210521030543-CN2 CW20210521030543-CN3 CW20210527001972-CN CW20210528047020-CN CW20210528047872-CN CW20210528060253-CN2 CW20210615000339-CN CW20210615001054-CN CW20210615001354-CN CW20210615001648-CN CW20210616000480-CN CW20210616000562-CN CW20210616000786-TL CW20210616001075-DE CW20210616001220-DE CW20210616001611-AU CW20210616003135-TL CW20210616003200-TL CW20210617001525-CN CW20210621000107-CN CW20210621000228-CN CW20210621000440-CN CW20210621000571-CN CW20210621000850-CN6 CW20210622002707-CN CW20210628000595-CN2 CW20210628000595-CN3 CW20210628000949-CN CW20210629000528-DE2 CW20210629000909-DE2 CW20210629001025-DE2 DE20210628001 DE20210628003 DE20210628004 DE20210628005 DE20210629003 DE20210629010 DE20210630003 NC20210618002 NC20210618004 NC20210621001 NC20210621003 NC20210621005 NC20210621007 NC20210621009 NC20210622002 NC20210624001 NC20210630002 NC20210630003

How to Reproduce?

test_doris.txt After the test_doris.txt file is executed, the following SQL is executed with no result SELECT a.column_31 FROM table1 AS a LEFT JOIN table2 AS g ON g.column_1=a.column_3 LEFT JOIN table5 AS s ON s.column_6=g.column_97 AND g.column_97 > 1 WHERE a.column_66=0 AND (CASE WHEN a.column_61>0 AND a.column_87>0 THEN 1 WHEN a.column_61=0 THEN 1 ELSE 0 END)=1 AND a.column_74=0 AND a.column_71 in (0,2) ORDER BY a.column_31 ASC;

Anything Else?

No response

Are you willing to submit PR?

  • [X] Yes I am willing to submit a PR!

Code of Conduct

gongzexin avatar Aug 04 '22 03:08 gongzexin

fixed in https://github.com/apache/doris/pull/11515

englefly avatar Aug 10 '22 08:08 englefly

Solved, close it

jackwener avatar Aug 14 '22 15:08 jackwener

nice!

gongzexin avatar Aug 16 '22 07:08 gongzexin