mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Make substring function name case-insensitive + add two aliases #3704
This commit is contained in:
parent
ed04453122
commit
afcd6f9f09
@ -166,7 +166,9 @@ public:
|
||||
|
||||
void registerFunctionSubstring(FunctionFactory & factory)
|
||||
{
|
||||
factory.registerFunction<FunctionSubstring>();
|
||||
factory.registerFunction<FunctionSubstring>(FunctionFactory::CaseInsensitive);
|
||||
factory.registerAlias("substr", FunctionSubstring::name, FunctionFactory::CaseInsensitive);
|
||||
factory.registerAlias("mid", FunctionSubstring::name, FunctionFactory::CaseInsensitive); /// from MySQL dialect
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,3 +4,6 @@ foo
|
||||
FOO
|
||||
baz
|
||||
2
|
||||
fo
|
||||
oo
|
||||
o
|
||||
|
@ -6,3 +6,6 @@ select LOWER('Foo');
|
||||
select UPPER('Foo');
|
||||
select REPLACE('bar', 'r', 'z');
|
||||
select Locate('foo', 'o');
|
||||
select SUBSTRING('foo', 1, 2);
|
||||
select Substr('foo', 2);
|
||||
select mid('foo', 3);
|
||||
|
Loading…
Reference in New Issue
Block a user