[CP] 422_opensource feature patch 431

This commit is contained in:
akaError
2024-04-11 10:14:23 +00:00
committed by ob-robot
parent 78507a5aae
commit 263b3806fa
50 changed files with 1495 additions and 357 deletions

View File

@ -83,6 +83,7 @@ int ObExprDateFormat::calc_date_format(const ObExpr &expr, ObEvalCtx &ctx, ObDat
ObSolidifiedVarsGetter helper(expr, ctx, ctx.exec_ctx_.get_my_session());
ObSQLMode sql_mode = 0;
const common::ObTimeZoneInfo *tz_info = NULL;
ObString locale_name;
if (OB_ISNULL(session = ctx.exec_ctx_.get_my_session())) {
ret = OB_NOT_INIT;
LOG_WARN("session is null", K(ret), K(session));
@ -117,13 +118,16 @@ int ObExprDateFormat::calc_date_format(const ObExpr &expr, ObEvalCtx &ctx, ObDat
}
} else if (OB_UNLIKELY(format->get_string().empty())) {
expr_datum.set_null();
} else if (OB_FAIL(session->get_locale_name(locale_name))) {
LOG_WARN("failed to get locale time name", K(expr), K(expr_datum));
} else if (OB_FAIL(ObTimeConverter::ob_time_to_str_format(ob_time,
format->get_string(),
buf,
buf_len,
pos,
res_null))) {
LOG_WARN("failed to convert ob time to str with format");
res_null,
locale_name))) {
LOG_WARN("failed to convert ob time to str with format");
} else if (res_null) {
expr_datum.set_null();
} else {