[fix](function) handle merge in window_funnel_init and add test (#9338)

This commit is contained in:
dataroaring
2022-05-03 22:37:06 +08:00
committed by GitHub
parent 3baf6cefc3
commit eed62695e1
3 changed files with 74 additions and 3 deletions

View File

@ -2500,9 +2500,10 @@ void AggregateFunctions::window_funnel_init(FunctionContext* ctx, StringVal* dst
WindowFunnelState* state = new WindowFunnelState();
dst->ptr = (uint8_t*)state;
// constant args at index 0 and 1
DCHECK(ctx->is_arg_constant(0));
BigIntVal* window = reinterpret_cast<BigIntVal*>(ctx->get_constant_arg(0));
state->window = window->val;
if (ctx->is_arg_constant(0)) {
BigIntVal* window = reinterpret_cast<BigIntVal*>(ctx->get_constant_arg(0));
state->window = window->val;
}
// TODO handle mode in the future
}