[CP] to issue<53410420>:adjust table function serial execution strategy
This commit is contained in:
parent
e0fb41718d
commit
4c009c7342
@ -492,7 +492,6 @@ int ObPLResolver::resolve(const ObStmtNodeTree *parse_tree, ObPLFunctionAST &fun
|
||||
LOG_WARN("failed to resolve inner call", K(parse_tree), K(ret));
|
||||
} else {
|
||||
func.set_is_all_sql_stmt(false);
|
||||
func.set_external_state();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -10326,6 +10325,7 @@ int ObPLResolver::resolve_inner_call(
|
||||
}
|
||||
} else if (access_idxs.at(idx_cnt - 1).is_procedure()) {
|
||||
ObPLCallStmt *call_stmt = NULL;
|
||||
func.set_external_state();
|
||||
if (OB_FAIL(stmt_factory_.allocate(PL_CALL, current_block_, stmt))) {
|
||||
LOG_WARN("failed to alloc stmt", K(ret));
|
||||
} else if (OB_ISNULL(call_stmt = static_cast<ObPLCallStmt *>(stmt))) {
|
||||
|
@ -4630,7 +4630,6 @@ int ObDMLResolver::resolve_function_table_item(const ParseNode &parse_tree,
|
||||
}
|
||||
if (OB_SUCC(ret)) {
|
||||
OX (params_.is_resolve_table_function_expr_ = true);
|
||||
OX (stmt_->get_query_ctx()->disable_udf_parallel_ |= true);
|
||||
OZ (resolve_sql_expr(*(parse_tree.children_[0]), function_table_expr));
|
||||
OX (params_.is_resolve_table_function_expr_ = false);
|
||||
CK (OB_NOT_NULL(function_table_expr));
|
||||
@ -11141,6 +11140,7 @@ int ObDMLResolver::collect_schema_version(ObRawExpr *expr)
|
||||
stmt_->get_query_ctx()->udf_has_select_stmt_));
|
||||
OX (stmt_->get_query_ctx()->disable_udf_parallel_ |= !udf_expr->is_parallel_enable());
|
||||
if (OB_SUCC(ret) &&
|
||||
T_FIELD_LIST_SCOPE == current_scope_ &&
|
||||
udf_expr->get_result_type().is_ext() &&
|
||||
(pl::PL_RECORD_TYPE == udf_expr->get_result_type().get_extend_type() ||
|
||||
pl::PL_NESTED_TABLE_TYPE == udf_expr->get_result_type().get_extend_type() ||
|
||||
@ -11151,7 +11151,9 @@ int ObDMLResolver::collect_schema_version(ObRawExpr *expr)
|
||||
} else if (T_FUN_PL_OBJECT_CONSTRUCT == expr->get_expr_type()) {
|
||||
ObObjectConstructRawExpr *object_expr = static_cast<ObObjectConstructRawExpr*>(expr);
|
||||
CK (OB_NOT_NULL(object_expr));
|
||||
OX (stmt_->get_query_ctx()->disable_udf_parallel_ |= true);
|
||||
if (T_FIELD_LIST_SCOPE == current_scope_) {
|
||||
OX (stmt_->get_query_ctx()->disable_udf_parallel_ |= true);
|
||||
}
|
||||
if (OB_SUCC(ret) && object_expr->need_add_dependency()) {
|
||||
uint64_t dep_obj_id = view_ref_id_;
|
||||
ObSchemaObjVersion coll_schema_version;
|
||||
@ -11162,7 +11164,9 @@ int ObDMLResolver::collect_schema_version(ObRawExpr *expr)
|
||||
} else if (T_FUN_PL_COLLECTION_CONSTRUCT == expr->get_expr_type()) {
|
||||
ObCollectionConstructRawExpr *coll_expr = static_cast<ObCollectionConstructRawExpr*>(expr);
|
||||
CK (OB_NOT_NULL(coll_expr));
|
||||
OX (stmt_->get_query_ctx()->disable_udf_parallel_ |= true);
|
||||
if (T_FIELD_LIST_SCOPE == current_scope_) {
|
||||
OX (stmt_->get_query_ctx()->disable_udf_parallel_ |= true);
|
||||
}
|
||||
if (OB_SUCC(ret) && coll_expr->need_add_dependency()) {
|
||||
uint64_t dep_obj_id = view_ref_id_;
|
||||
ObSchemaObjVersion coll_schema_version;
|
||||
|
@ -2732,6 +2732,18 @@ int ObRawExprResolverImpl::process_datatype_or_questionmark(const ParseNode &nod
|
||||
}
|
||||
}
|
||||
}
|
||||
// force sql run das logic if sql stmt has pl question mark expr, and its type is complex type
|
||||
if (OB_SUCC(ret) &&
|
||||
OB_NOT_NULL(ctx_.stmt_) &&
|
||||
OB_NOT_NULL(c_expr) &&
|
||||
OB_NOT_NULL(session_info->get_pl_context()) &&
|
||||
T_QUESTIONMARK == c_expr->get_expr_type() &&
|
||||
c_expr->get_result_type().is_ext() &&
|
||||
(pl::PL_RECORD_TYPE == c_expr->get_result_type().get_extend_type() ||
|
||||
pl::PL_NESTED_TABLE_TYPE == c_expr->get_result_type().get_extend_type() ||
|
||||
pl::PL_VARRAY_TYPE == c_expr->get_result_type().get_extend_type())) {
|
||||
ctx_.stmt_->get_query_ctx()->disable_udf_parallel_ |= true;
|
||||
}
|
||||
}
|
||||
expr = c_expr;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user