allocate material when more than one link scan exist

This commit is contained in:
obdev
2023-04-13 09:01:57 +00:00
committed by ob-robot
parent 89be1d878e
commit 48c57d0564
7 changed files with 75 additions and 7 deletions

View File

@ -22,8 +22,14 @@ ObLogLinkScan::ObLogLinkScan(ObLogPlan &plan)
int ObLogLinkScan::allocate_expr_post(ObAllocExprContext &ctx)
{
int ret = OB_SUCCESS;
for (int64_t i = 0; OB_SUCC(ret) && i < output_exprs_.count(); ++i) {
ObRawExpr *expr = output_exprs_.at(i);
const ObSelectStmt *stmt = NULL;
if (OB_ISNULL(get_plan()) ||
OB_ISNULL(stmt = static_cast<const ObSelectStmt *>(get_plan()->get_stmt()))) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("get unexpected null", K(get_plan()), K(stmt), K(ret));
}
for (int64_t i = 0; OB_SUCC(ret) && i < stmt->get_select_item_size(); ++i) {
ObRawExpr *expr = stmt->get_select_item(i).expr_;
if (OB_ISNULL(expr)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("null expr", K(ret));