[MCOL-3677] outer join query returned incorrect result Created: 2019-12-17  Updated: 2019-12-26  Resolved: 2019-12-26

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: 1.4.2
Fix Version/s: 1.4.2

Type: Bug Priority: Critical
Reporter: Daniel Lee (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MCOL-1734 NOT IN subquery does not return rows ... Closed
Sprint: 2019-06

 Description   

Build tested: 1.4.2-1 (first combined build from Azura)
OS: centos 7
Stack: single server

Autopilot.features.outerJoin test case failed, returned incorrect result. The same test case passed in 1.4.1-1. The following is a simplified version of the test case

Table rows:

MariaDB [ojref]> select * from nation
-> ;
--------------------------------------------------------------------------------------------------------------------------------------------+

n_nationkey n_name n_regionkey n_comment

--------------------------------------------------------------------------------------------------------------------------------------------+

-1 ARGENTINA -100 al foxes promise slyly according to the regular accounts. bold requests alon
-2 BRAZIL -100 y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special
-3 CANADA -100 eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold
NULL ARGENTINA NULL al foxes promise slyly according to the regular accounts. bold requests alon
NULL BRAZIL NULL y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special
NULL CANADA NULL eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold

--------------------------------------------------------------------------------------------------------------------------------------------+
6 rows in set (0.001 sec)

MariaDB [ojref]> select * from region;
---------------------------------------------------

r_regionkey r_name r_comment

---------------------------------------------------

-1 AMERICA hs use ironic, even requests. s
-2 ASIA ges. thinly even pinto beans ca
NULL AMERICA hs use ironic, even requests. s
NULL ASIA ges. thinly even pinto beans ca

---------------------------------------------------
4 rows in set (0.001 sec)

ColumnStore tables returned two rows:
MariaDB [ojtest]> select r.* from region r where not exists (select null from nation n where n.n_regionkey = r.r_regionkey) order by 1, 2, 3
-> ;
---------------------------------------------------

r_regionkey r_name r_comment

---------------------------------------------------

-2 ASIA ges. thinly even pinto beans ca
-1 AMERICA hs use ironic, even requests. s

---------------------------------------------------
2 rows in set (0.032 sec)

InnoDB tables returned 4 rows:

MariaDB [ojref]> select r.* from region r where not exists (select null from nation n where n.n_regionkey = r.r_regionkey) order by 1, 2, 3
-> ;
---------------------------------------------------

r_regionkey r_name r_comment

---------------------------------------------------

NULL AMERICA hs use ironic, even requests. s
NULL ASIA ges. thinly even pinto beans ca
-2 ASIA ges. thinly even pinto beans ca
-1 AMERICA hs use ironic, even requests. s

---------------------------------------------------
4 rows in set (0.001 sec)



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2019-12-18 ]

I think this may have been caused by the fix for MCOL-1734. Assigning Roman.

Comment by Daniel Lee (Inactive) [ 2019-12-26 ]

Build verified: Azure 20191224.6

Issue has been fixed. outerJoin test cased passed.

Generated at Thu Feb 08 02:44:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.