mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Add lcase/ucase + make lower/upper case-insensitive #3715
This commit is contained in:
parent
5da33f04c9
commit
e110d0789f
@ -15,7 +15,8 @@ using FunctionLower = FunctionStringToString<LowerUpperImpl<'A', 'Z'>, NameLower
|
|||||||
|
|
||||||
void registerFunctionLower(FunctionFactory & factory)
|
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)
|
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