Add toDate MySQL compatibility alias

This commit is contained in:
dankondr 2021-01-22 00:02:35 +03:00
parent e066add261
commit 89b394ea57

View File

@ -29,6 +29,9 @@ void registerFunctionsConversion(FunctionFactory & factory)
factory.registerFunction<FunctionToDecimal256>(); factory.registerFunction<FunctionToDecimal256>();
factory.registerFunction<FunctionToDate>(); factory.registerFunction<FunctionToDate>();
/// MysQL compatibility alias.
factory.registerFunction<FunctionToDate>("DATE", FunctionFactory::CaseInsensitive);
factory.registerFunction<FunctionToDateTime>(); factory.registerFunction<FunctionToDateTime>();
factory.registerFunction<FunctionToDateTime32>(); factory.registerFunction<FunctionToDateTime32>();
factory.registerFunction<FunctionToDateTime64>(); factory.registerFunction<FunctionToDateTime64>();