fix copy shared exec param bug
This commit is contained in:
@ -61,6 +61,14 @@ int ObPLExprCopier::check_need_copy(const ObRawExpr *old_expr,
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
|
||||
int ObPLExprCopier::find_in_copy_context(const ObRawExpr *old_expr,
|
||||
ObRawExpr *&new_expr)
|
||||
{
|
||||
UNUSED(old_expr);
|
||||
new_expr = NULL;
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
|
||||
int ObPLExprCopier::do_copy_expr(const ObRawExpr *old_expr,
|
||||
ObRawExpr *&new_expr)
|
||||
{
|
||||
@ -86,6 +94,23 @@ int ObPLExprCopier::do_copy_expr(const ObRawExpr *old_expr,
|
||||
|
||||
int ObRawExprCopier::check_need_copy(const ObRawExpr *old_expr,
|
||||
ObRawExpr *&new_expr)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
new_expr = NULL;
|
||||
if (OB_FAIL(find_in_copy_context(old_expr, new_expr))) {
|
||||
LOG_WARN("faild to find in copy context", K(ret));
|
||||
} else if (OB_ISNULL(new_expr) &&
|
||||
old_expr->is_exec_param_expr() &&
|
||||
!static_cast<const ObExecParamRawExpr *>(old_expr)->is_onetime()) {
|
||||
// TODO link.zt skip the copy of exec param expr
|
||||
// let the query ref raw expr to copy the expr
|
||||
// to be improved
|
||||
new_expr = const_cast<ObRawExpr *>(old_expr);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObRawExprCopier::find_in_copy_context(const ObRawExpr *old_expr, ObRawExpr *&new_expr)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
int tmp = OB_SUCCESS;
|
||||
@ -106,14 +131,6 @@ int ObRawExprCopier::check_need_copy(const ObRawExpr *old_expr,
|
||||
ret = tmp;
|
||||
LOG_WARN("get expr from hash map failed", K(ret));
|
||||
}
|
||||
if (OB_SUCC(ret) && OB_ISNULL(new_expr) &&
|
||||
old_expr->is_exec_param_expr() &&
|
||||
!static_cast<const ObExecParamRawExpr *>(old_expr)->is_onetime()) {
|
||||
// TODO link.zt skip the copy of exec param expr
|
||||
// let the query ref raw expr to copy the expr
|
||||
// to be improved
|
||||
new_expr = const_cast<ObRawExpr *>(old_expr);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user