yiguolei commented on code in PR #26475: URL: https://github.com/apache/doris/pull/26475#discussion_r1386162793
########## be/src/vec/functions/function_date_or_datetime_computation.h: ########## @@ -425,7 +432,12 @@ struct DateTimeOp { bool invalid = true; for (size_t i = 0; i < size; ++i) { vec_to[i] = Transform::execute(vec_from0[i], vec_from1[i], invalid); - DCHECK(!invalid); + + if (UNLIKELY(invalid)) { + throw Exception(ErrorCode::OUT_OF_BOUND, + fmt::format("Operation {} {} {} out of range, ", Transform::name, Review Comment: 不要加fmt, exception 代码本身支持格式化 ########## be/src/vec/functions/function_date_or_datetime_computation.h: ########## @@ -425,7 +432,12 @@ struct DateTimeOp { bool invalid = true; for (size_t i = 0; i < size; ++i) { vec_to[i] = Transform::execute(vec_from0[i], vec_from1[i], invalid); - DCHECK(!invalid); + + if (UNLIKELY(invalid)) { + throw Exception(ErrorCode::OUT_OF_BOUND, + fmt::format("Operation {} {} {} out of range, ", Transform::name, Review Comment: 不要加fmt, exception 代码本身支持格式化 -- 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. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org