imay commented on a change in pull request #2482: fix core dump when using datetime in window function URL: https://github.com/apache/incubator-doris/pull/2482#discussion_r358824825
########## File path: be/src/exprs/aggregate_functions.cpp ########## @@ -2362,8 +2363,37 @@ void AggregateFunctions::offset_fn_init(FunctionContext* ctx, T* dst) { DCHECK(ctx->is_arg_constant(1)); DCHECK(ctx->is_arg_constant(2)); DCHECK_EQ(ctx->get_arg_type(0)->type, ctx->get_arg_type(2)->type); - *dst = *static_cast<T*>(ctx->get_constant_arg(2)); + T src = *static_cast<T*>(ctx->get_constant_arg(2)); + // The literal null is sometimes incorrectly converted to int, so *dst = src may cause SEGV Review comment: I'm not sure in which case this assign will cause SEGV. All Val is built-in type except StringVal, it seems that it can not lead segment fault. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org