[MCOL-2096] IN clause not properly evaluated in where Created: 2019-01-21 Updated: 2020-11-12 Resolved: 2020-04-30 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | MariaDB Server |
| Affects Version/s: | 1.1.6 |
| Fix Version/s: | 1.4.4, 1.5.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | antoine | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
debian9 |
||
| Sprint: | 2020-2, 2020-3, 2020-4, 2020-5, 2020-6, 2020-7 |
| Description |
|
IN() clause does not evaluate properly on some columns with a window function in the example below, the column r is computed with the function DENSE_RANK in a subselect, and there is a where r in (...). The where clause does not filter rows as expected. Note that rows are properly filtered if the where clause is rewritten as (r=1 or r=2) create table t(a int, b int) engine=ColumnStore; select => returns instead of just the first 2 rows |
| Comments |
| Comment by Jose Rojas (Inactive) [ 2020-03-19 ] | ||||||
|
After a large amount of investigation the culprit was the IN clause was not filtering for the combination of window function and IN clause. It worked with 1 value inside IN clause because that is treated as "= value" | ||||||
| Comment by Roman [ 2020-04-07 ] | ||||||
|
4QA. There was a relevant test added: working_tpch1/misc/ | ||||||
| Comment by Daniel Lee (Inactive) [ 2020-04-30 ] | ||||||
|
1.4.4-1 /root/ColumnStore/buildColumnstoreFromGithubSource/server /root/ColumnStore/buildColumnstoreFromGithubSource/server/engine 1.5.0-1 /root/ColumnStore/buildColumnstoreFromGithubSource/server commit 6ad38ccc28d31a099d052e5de827543808843a3c MariaDB [mytest]> insert into t(a,b) values(1,4),(2,3),(3,2),(4,1); MariaDB [mytest]> select
-----
----- |