matrixone icon indicating copy to clipboard operation
matrixone copied to clipboard

[Bug]: panic info occurs when I use REGEXP_REPLACE()

Open goodMan-code opened this issue 3 years ago • 0 comments

Is there an existing issue for the same bug?

  • [X] I have checked the existing issues.

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93):
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

Table Structure : DROP TABLE IF EXISTS t; CREATE TABLE t( str1 VARCHAR(20), str2 CHAR(20) );

DML : INSERT INTO t VALUES ('W * P', 'W + Z - O'), ('have has having', 'do does doing'); INSERT INTO t VALUES ('XV*XZ', 'PP-ZZ-DXA'), ('aa bbb cc ddd', 'k ii lll oooo');

The problematic SQL stmt is : SELECT REGEXP_REPLACE(str1, '*', 'i'), REGEXP_REPLACE(str2,'hav','hiv') FROM t;

It's result is : ERROR 20101 (HY000): internal error: panic regexp: Compile(*): error parsing regexp: missing argument to repetition operator: *: regexp.MustCompile /usr/local/go/src/regexp/regexp.go:319 github.com/matrixorigin/matrixone/pkg/vectorize/regular.RegularReplaceWithArrays /home/zxg/matrixone/pkg/vectorize/regular/regular_replace.go:140 github.com/matrixorigin/matrixone/pkg/sql/plan/function/builtin/multi.RegularReplace /home/zxg/matrixone/pkg/sql/plan/function/builtin/multi/regular_replace.go:72 github.com/matrixorigin/matr

Expected Behavior

No response

Steps to Reproduce

No response

Additional information

No response

goodMan-code avatar Oct 11 '22 13:10 goodMan-code