Fix wrong exception code in the bitmapTransform function

This commit is contained in:
Alexey Milovidov 2022-09-21 05:28:47 +02:00
parent 779a8f1305
commit acc1613e3b
3 changed files with 4 additions and 2 deletions

View File

@ -20,12 +20,13 @@
// inside.
#include <AggregateFunctions/AggregateFunctionGroupBitmapData.h>
namespace DB
{
namespace ErrorCodes
{
extern const int ILLEGAL_TYPE_OF_ARGUMENT;
extern const int LOGICAL_ERROR;
extern const int BAD_ARGUMENTS;
}
/** Bitmap functions.
@ -640,7 +641,7 @@ private:
}
if (from_end - from_start != to_end - to_start)
throw Exception("From array size and to array size mismatch", ErrorCodes::LOGICAL_ERROR);
throw Exception("From array size and to array size mismatch", ErrorCodes::BAD_ARGUMENTS);
col_to->insertDefault();
AggregateFunctionGroupBitmapData<T> & bitmap_data_2

View File

@ -0,0 +1 @@
SELECT bitmapTransform(arrayReduce('groupBitmapState', [1]), [1, 2], [1, 2, 3]); -- { serverError BAD_ARGUMENTS }