mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Added compatibility aliases for "length" and "lengthUTF8" [#CLICKHOUSE-20]
This commit is contained in:
parent
45af805ccb
commit
9e1c51aca4
@ -47,7 +47,7 @@ using FunctionLength = FunctionStringOrArrayToT<LengthImpl, NameLength, UInt64>;
|
||||
|
||||
void registerFunctionLength(FunctionFactory & factory)
|
||||
{
|
||||
factory.registerFunction<FunctionLength>();
|
||||
factory.registerFunction<FunctionLength>(FunctionFactory::CaseInsensitive);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -63,6 +63,10 @@ using FunctionLengthUTF8 = FunctionStringOrArrayToT<LengthUTF8Impl, NameLengthUT
|
||||
void registerFunctionLengthUTF8(FunctionFactory & factory)
|
||||
{
|
||||
factory.registerFunction<FunctionLengthUTF8>();
|
||||
|
||||
/// Compatibility aliases.
|
||||
factory.registerFunction<FunctionLengthUTF8>("CHAR_LENGTH", FunctionFactory::CaseInsensitive);
|
||||
factory.registerFunction<FunctionLengthUTF8>("CHARACTER_LENGTH", FunctionFactory::CaseInsensitive);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
12 6 6
|
1
dbms/tests/queries/0_stateless/00726_length_aliases.sql
Normal file
1
dbms/tests/queries/0_stateless/00726_length_aliases.sql
Normal file
@ -0,0 +1 @@
|
||||
SELECT LENGTH('корова'), CHAR_LENGTH('ворона'), CHARACTER_LENGTH('фейхоа');
|
Loading…
Reference in New Issue
Block a user