mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
Add cases to test replaceRegexpAll_bug
This commit is contained in:
parent
131aa77017
commit
3dfbc80f0b
@ -1,3 +1,11 @@
|
||||
aaaabb
|
||||
b aaaa
|
||||
aaaa
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
|
@ -1,3 +1,14 @@
|
||||
SELECT trim(leading 'b ' FROM 'b aaaabb ') x;
|
||||
SELECT trim(trailing 'b ' FROM 'b aaaabb ') x;
|
||||
SELECT trim(both 'b ' FROM 'b aaaabb ') x;
|
||||
SELECT 'aaaabb ' == trim(leading 'b ' FROM 'b aaaabb ') x;
|
||||
SELECT 'b aaaa' == trim(trailing 'b ' FROM 'b aaaabb ') x;
|
||||
SELECT 'aaaa' == trim(both 'b ' FROM 'b aaaabb ') x;
|
||||
|
||||
SELECT '1' == replaceRegexpAll(',,1,,', '^[,]*|[,]*$', '') x;
|
||||
SELECT '1' == replaceRegexpAll(',,1', '^[,]*|[,]*$', '') x;
|
||||
SELECT '1' == replaceRegexpAll('1,,', '^[,]*|[,]*$', '') x;
|
||||
|
||||
SELECT '1,,' == replaceRegexpOne(',,1,,', '^[,]*|[,]*$', '') x;
|
||||
SELECT '1' == replaceRegexpOne(',,1', '^[,]*|[,]*$', '') x;
|
||||
SELECT '1,,' == replaceRegexpOne('1,,', '^[,]*|[,]*$', '') x;
|
||||
|
||||
SELECT '5935,5998,6014' == trim(BOTH ', ' FROM '5935,5998,6014, ') x;
|
||||
SELECT '5935,5998,6014' == replaceRegexpAll('5935,5998,6014, ', concat('^[', regexpQuoteMeta(', '), ']*|[', regexpQuoteMeta(', '), ']*$'), '') AS x;
|
||||
|
Loading…
Reference in New Issue
Block a user