add config _globle_enable_rich_vector_format

This commit is contained in:
obdev
2024-03-12 07:14:56 +00:00
committed by ob-robot
parent 8d56362278
commit dec494cf3f
7 changed files with 42 additions and 17 deletions

View File

@ -1250,17 +1250,21 @@ int ObResolver::resolve(IsPrepared if_prepared, const ParseNode &parse_tree, ObS
}
if (OB_SUCC(ret)) {
bool has_rich_format_hint = false;
bool enable_rich_format = false;
ObOptParamHint &opt_hint = params_.query_ctx_->query_hint_.global_hint_.opt_params_;
if (OB_FAIL(opt_hint.check_and_get_bool_opt_param(ObOptParamHint::ENABLE_RICH_VECTOR_FORMAT,
has_rich_format_hint,
enable_rich_format))) {
LOG_WARN("check and get bool opt param failed", K(ret));
} else if (has_rich_format_hint) {
params_.session_info_->set_force_rich_format(
enable_rich_format ? ObBasicSessionInfo::ForceRichFormatStatus::FORCE_ON :
ObBasicSessionInfo::ForceRichFormatStatus::FORCE_OFF);
if (params_.session_info_->is_force_off_rich_format()) {
// do nothing
} else {
bool has_rich_format_hint = false;
bool enable_rich_format = false;
ObOptParamHint &opt_hint = params_.query_ctx_->query_hint_.global_hint_.opt_params_;
if (OB_FAIL(opt_hint.check_and_get_bool_opt_param(ObOptParamHint::ENABLE_RICH_VECTOR_FORMAT,
has_rich_format_hint,
enable_rich_format))) {
LOG_WARN("check and get bool opt param failed", K(ret));
} else if (has_rich_format_hint) {
params_.session_info_->set_force_rich_format(
enable_rich_format ? ObBasicSessionInfo::ForceRichFormatStatus::FORCE_ON :
ObBasicSessionInfo::ForceRichFormatStatus::FORCE_OFF);
}
}
}
}