[MCOL-1734] NOT IN subquery does not return rows with NULL qualifying column values Created: 2018-09-20 Updated: 2020-03-13 Resolved: 2020-02-13 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | PrimProc |
| Affects Version/s: | 1.1.6 |
| Fix Version/s: | 1.4.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Ravi Prakash (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Sub-Tasks: |
|
||||||||||||||||||||
| Sprint: | 2019-06, 2020-1, 2020-2 | ||||||||||||||||||||
| Description |
|
When an outer query column values is NULL and the subquery is returning an empty set, the outer query and the predicate is NULL, the row is supposed to be part of the result set. But the column store does not return such rows. For example: I got the following result from INNODB: {{select t1.c1,t1.c2, t1.c3 from t1 where t1.c1 not in (select t2.c1 from t2 where t2.c2 >100) -----
-----
----- Where for my column store "mydb" it produced the following result: select t1.c1,t1.c2, t1.c3 from t1 where t1.c1 not in (select t2.c1 from t2 where t2.c2 >100) -----
-----
----- To reproduce the problem: create database mydb; |
| Comments |
| Comment by Ravi Prakash (Inactive) [ 2018-10-02 ] | |||||||||||||||||||||||||
|
There is one more scenario where the column store is not processing the NOT IN queries correctly. It does not match the title but the query is as follows: MariaDB [mydb]> select t1.c2, t1.c3,t1.c1 ,t1.c4 from t1 where t1.c3 not in (select t2.c3 from t2 where t2.c2= t2.c2 and t2.c4 = t1.c4);
-----
----- It is returning an extra tuple : (75, null, null, char-row7-c4). | |||||||||||||||||||||||||
| Comment by Roman [ 2019-12-06 ] | |||||||||||||||||||||||||
|
Plz review. | |||||||||||||||||||||||||
| Comment by Patrick LeBlanc (Inactive) [ 2019-12-06 ] | |||||||||||||||||||||||||
|
Merged the code change. This one should have a corresponding test in the regression suite though, so sending back to Roman. | |||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2019-12-14 ] | |||||||||||||||||||||||||
|
Not including this in 1.4.2 release notes as it is still pending additions to regression suite. | |||||||||||||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2019-12-18 ] | |||||||||||||||||||||||||
|
Caused regression | |||||||||||||||||||||||||
| Comment by Roman [ 2020-01-09 ] | |||||||||||||||||||||||||
|
Plz review. | |||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2020-02-13 ] | |||||||||||||||||||||||||
|
Build verified: 1.2.6-1 source Build verified: 1.4.3-1 BB nightly Reproduced the issue in 1.2.0-1. The fix is in 1.4.3-1, but not 1.2.6-1 Clone the ticket |