[MCOL-5328] Using regexp_substr on table with engine=columnstore results in error:"Function 'regexp_substr' isn't supported." Created: 2022-12-03  Updated: 2023-12-25

Status: Open
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 23.02, 6.4.2, 6.4.6
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: Maria M Pflaum Assignee: Max Mether
Resolution: Unresolved Votes: 1
Labels: regression


 Description   

Using regexp_substr on table with engine=columnstore results in error:

ERROR 1178 (42000): The storage engine for the table doesn't support MCS-1001: Function 'regexp_substr' isn't supported.

To reproduce:
create table t3(a int not null, b varchar(100)) engine=columnstore;
insert into t3 values(1, 'My mouse'),(2,'Breakfast Food');
select a, regexp_substr(b, 'a|e|i|o|u') AS "vowel" from t3;

works with engine=innodb.



 Comments   
Comment by Masataka Narita [ 2023-12-25 ]

In my tests, REGEXP_SUBSTR works in v1.2.5, so I think this is a regression bug, not a new feature.

[root@mcs125 ~]# mcsmysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 21
Server version: 10.3.16-MariaDB-log Columnstore 1.2.5-1
 
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]>
MariaDB [(none)]> create table test.T(col1 varchar(5)) engine columnstore;
Query OK, 0 rows affected (0.223 sec)
 
MariaDB [(none)]> insert into test.T values ('abc'),('def');
Query OK, 2 rows affected (0.261 sec)
Records: 2  Duplicates: 0  Warnings: 0
 
MariaDB [(none)]> SELECT REGEXP_SUBSTR(col1, '[a-z]+') from test.T;
+-------------------------------+
| REGEXP_SUBSTR(col1, '[a-z]+') |
+-------------------------------+
| abc                           |
| def                           |
+-------------------------------+
2 rows in set (0.059 sec)
 
MariaDB [(none)]> insert into test.T values ('123');
Query OK, 1 row affected (0.119 sec)
 
MariaDB [(none)]> SELECT REGEXP_SUBSTR(col1, '[a-z]+') from test.T;
+-------------------------------+
| REGEXP_SUBSTR(col1, '[a-z]+') |
+-------------------------------+
| abc                           |
| def                           |
|                               |
+-------------------------------+
3 rows in set (0.012 sec)
 
MariaDB [(none)]> show create table test.T
    -> ;
+-------+-------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                    |
+-------+-------------------------------------------------------------------------------------------------+
| T     | CREATE TABLE `t` (
  `col1` varchar(5) DEFAULT NULL
) ENGINE=Columnstore DEFAULT CHARSET=latin1 |
+-------+-------------------------------------------------------------------------------------------------+
1 row in set (0.000 sec)

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