Update src/Functions/ascii.cpp

Co-authored-by: Vladimir C <vdimir@clickhouse.com>
This commit is contained in:
李扬 2022-10-26 18:18:04 +08:00 committed by GitHub
parent add5360a1b
commit 48c37c52e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,16 @@ using FunctionAscii = FunctionStringOrArrayToT<AsciiImpl, AsciiName, AsciiImpl::
REGISTER_FUNCTION(Ascii)
{
factory.registerFunction<FunctionAscii>({}, FunctionFactory::CaseInsensitive);
factory.registerFunction<FunctionAscii>(
{
R"(
Returns the ASCII code point of the first character of str. The result type is Int32.
If s is empty, the result is 0. If the first character is not an ASCII character or part of the Latin-1 Supplement range of UTF-16, the result is undefined)
)",
Documentation::Examples{{"ascii", "SELECT ascii('234')"}},
Documentation::Categories{"String"}
}, FunctionFactory::CaseInsensitive);
}
}