Merge pull request #41602 from ClickHouse/bitmap-wrong-exception-code

Fix wrong exception code in the `bitmapTransform` function
This commit is contained in:
Alexey Milovidov 2022-09-22 07:26:22 +03:00 committed by GitHub
commit b47cdd2783
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 }