Fix arrayCumSumNonNegative() for consts

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

View File

@ -19,7 +19,6 @@ namespace ErrorCodes
*/
struct ArrayCumSumNonNegativeImpl
{
static bool useDefaultImplementationForConstants() { return true; }
static bool needBoolean() { return false; }
static bool needExpression() { return false; }
static bool needOneArray() { return false; }
@ -100,6 +99,7 @@ struct ArrayCumSumNonNegativeImpl
{
ColumnPtr res;
mapped = mapped->convertToFullColumnIfConst();
if (executeType< UInt8 , UInt64>(mapped, array, res) ||
executeType< UInt16, UInt64>(mapped, array, res) ||
executeType< UInt32, UInt64>(mapped, array, res) ||

View File

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