[CP] [FEAT MERGE]support dblink udf

This commit is contained in:
seuwebber
2024-03-21 04:45:36 +00:00
committed by ob-robot
parent 6d7fab4ff1
commit 5bdd7e5bd1
61 changed files with 1065 additions and 401 deletions

View File

@ -97,6 +97,8 @@
#include "sql/optimizer/ob_explain_log_plan.h"
#include "sql/dblink/ob_dblink_utils.h"
#include "sql/plan_cache/ob_values_table_compression.h"
#include "pl/ob_pl_stmt.h"
#include "pl/ob_pl_resolver.h"
namespace oceanbase
{
@ -2727,6 +2729,13 @@ int ObSql::generate_stmt(ParseResult &parse_result,
}
}
}
if (OB_SUCC(ret)) {
if (NULL != resolver_ctx.secondary_namespace_
&& NULL != resolver_ctx.secondary_namespace_->get_external_ns()) {
resolver_ctx.package_guard_ =
&resolver_ctx.secondary_namespace_->get_external_ns()->get_resolve_ctx().package_guard_;
}
}
if (OB_SUCC(ret)) {
resolver_ctx.is_prepare_protocol_ = context.is_prepare_protocol_;
resolver_ctx.is_prepare_stage_ = context.is_prepare_stage_;
@ -3611,7 +3620,7 @@ int ObSql::code_generate(
LOG_DEBUG("phy plan", K(*phy_plan));
phy_plan->stat_.is_use_jit_ = use_jit;
phy_plan->set_returning(stmt->is_returning());
phy_plan->set_has_link_table(has_dblink);
phy_plan->set_has_link_table(has_dblink || phy_plan->has_link_udf());
// set plan insert flag : insert into values(..); // value num is n (n >= 1);
if (stmt->is_insert_stmt()) {
ObInsertStmt *insert_stmt = static_cast<ObInsertStmt *>(stmt);