Make least and greatest functions case insensitive for compatibility with MySQL

This commit is contained in:
Alexey Milovidov 2020-04-12 03:38:25 +03:00
parent c5c1a8def7
commit dec3e0f986
4 changed files with 6 additions and 2 deletions

View File

@ -57,7 +57,7 @@ using FunctionGreatest = FunctionBinaryArithmetic<GreatestImpl, NameGreatest>;
void registerFunctionGreatest(FunctionFactory & factory)
{
factory.registerFunction<FunctionGreatest>();
factory.registerFunction<FunctionGreatest>(FunctionFactory::CaseInsensitive);
}
}

View File

@ -57,7 +57,7 @@ using FunctionLeast = FunctionBinaryArithmetic<LeastImpl, NameLeast>;
void registerFunctionLeast(FunctionFactory & factory)
{
factory.registerFunction<FunctionLeast>();
factory.registerFunction<FunctionLeast>(FunctionFactory::CaseInsensitive);
}
}

View File

@ -0,0 +1,2 @@
2
-1

View File

@ -0,0 +1,2 @@
SELECT GREATEST(1, 2);
SELECT LEAST(1, -1);