[MCOL-5418] LIKE appears not to work with short (<8) string columns Created: 2023-02-08  Updated: 2023-09-22  Resolved: 2023-05-23

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: None
Fix Version/s: 23.10.0

Type: Bug Priority: Major
Reporter: Sergey Zefirov Assignee: Sergey Zefirov
Resolution: Fixed Votes: 0
Labels: rm_invalid_data


 Description   

It was discovered when working on MCOL-271. So I use slightly modified script and results from the comments there.

The script:

use test;
drop table if exists ti;
drop table if exists tcs;
create table ti(d1 char(6), d2 char(6)) engine=innodb;
create table tcs(d1 char(6), d2 char(6)) engine=columnstore;
insert into ti(d1, d2) values (NULL,NULL), (NULL, ''), (NULL, 'a'), ('', NULL), ('',''), ('', 'a'), ('a',NULL), ('a',''), ('a','a');
insert into tcs(d1, d2) values (NULL,NULL), (NULL, ''), (NULL, 'a'), ('', NULL), ('',''), ('', 'a'), ('a',NULL), ('a',''), ('a','a');
select 'innodb like', d1, d2 from ti where (d1 like d2);
select 'columnstore like', d1, d2 from tcs where (d1 like d2);
select 'innodb not like', d1, d2 from ti where (d1 not like d2);
select 'columnstore not like', d1, d2 from tcs where (d1 not like d2);
select 'innodb not (like)', d1, d2 from ti where not (d1 like d2);
select 'columnstore not (like)', d1, d2 from tcs where not (d1 like d2);

The answer for current develop:

# mysql <0.sql
innodb like     d1      d2
innodb like
innodb like     a       a
innodb not like d1      d2
innodb not like         a
innodb not like a
innodb not (like)       d1      d2
innodb not (like)               a
innodb not (like)       a

Notice the absence of Columnstore's output for (NOT) LIKE queries. LIKE does not work properly under current develop, it seems.



 Comments   
Comment by Daniel Lee (Inactive) [ 2023-05-23 ]

Build verified: develop branch

engine: a90535e1a7ffefa0e5ae808fdd0d38d30cffc017
server: 805750b3a90ed4aecbf475025e63674aaab7f7f7
buildNo: 7829

Reproduced the issue in 23.02.3

Verified char and varchar

string lengths 1, 2, 4, 7(varchar), 8(char), and longer (dictionary)

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