mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Merge pull request #3763 from yandex/missing-sql-compatibility-functions
Add lcase/ucase functions + make lower/upper case-insensitive #3715
This commit is contained in:
commit
3f45fbbb33
@ -15,7 +15,8 @@ using FunctionLower = FunctionStringToString<LowerUpperImpl<'A', 'Z'>, NameLower
|
||||
|
||||
void registerFunctionLower(FunctionFactory & factory)
|
||||
{
|
||||
factory.registerFunction<FunctionLower>();
|
||||
factory.registerFunction<FunctionLower>(FunctionFactory::CaseInsensitive);
|
||||
factory.registerAlias("lcase", "lower", FunctionFactory::CaseInsensitive);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,7 +15,8 @@ using FunctionUpper = FunctionStringToString<LowerUpperImpl<'a', 'z'>, NameUpper
|
||||
|
||||
void registerFunctionUpper(FunctionFactory & factory)
|
||||
{
|
||||
factory.registerFunction<FunctionUpper>();
|
||||
factory.registerFunction<FunctionUpper>(FunctionFactory::CaseInsensitive);
|
||||
factory.registerAlias("ucase", "upper", FunctionFactory::CaseInsensitive);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,4 @@
|
||||
foo
|
||||
FOO
|
||||
foo
|
||||
FOO
|
@ -0,0 +1,6 @@
|
||||
SET send_logs_level = 'none';
|
||||
|
||||
select lcase('FOO');
|
||||
select ucase('foo');
|
||||
select LOWER('Foo');
|
||||
select UPPER('Foo');
|
Loading…
Reference in New Issue
Block a user