Fix arrayDifference() for consts

This commit is contained in:
Azat Khuzhin 2021-09-11 22:36:20 +03:00
parent 3c75844a79
commit 6403cbee46
3 changed files with 3 additions and 1 deletions

View File

@ -20,7 +20,6 @@ namespace ErrorCodes
*/
struct ArrayDifferenceImpl
{
static bool useDefaultImplementationForConstants() { return true; }
static bool needBoolean() { return false; }
static bool needExpression() { return false; }
static bool needOneArray() { return false; }
@ -129,6 +128,7 @@ struct ArrayDifferenceImpl
{
ColumnPtr res;
mapped = mapped->convertToFullColumnIfConst();
if (executeType< UInt8 , Int16>(mapped, array, res) ||
executeType< UInt16, Int32>(mapped, array, res) ||
executeType< UInt32, Int64>(mapped, array, res) ||

View File

@ -0,0 +1 @@
[0,0]

View File

@ -0,0 +1 @@
SELECT toString(arrayDifference(x->0, [1, 2]));