fix adjust_subquery_list bug
This commit is contained in:
@ -2832,7 +2832,6 @@ int ObAggregateFunction::get_result(ObNewRow &row, const common::ObTimeZoneInfo
|
||||
}
|
||||
}
|
||||
}
|
||||
LOG_DEBUG("get result row", K(row));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@ -3615,9 +3615,22 @@ int ObDMLStmt::adjust_subquery_list()
|
||||
ObSEArray<ObRawExpr *, 8> relation_exprs;
|
||||
if (OB_FAIL(get_relation_exprs(relation_exprs))) {
|
||||
LOG_WARN("failed to get relation exprs", K(ret));
|
||||
} else if (FALSE_IT(subquery_exprs_.reset())) {
|
||||
} else if (OB_FAIL(ObTransformUtils::extract_query_ref_expr(relation_exprs, subquery_exprs_))) {
|
||||
LOG_WARN("failed to extract query ref expr", K(ret));
|
||||
} else {
|
||||
subquery_exprs_.reset();
|
||||
ObRawExpr *expr = NULL;
|
||||
// extract query ref expr will use flag, call extract_info first
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < relation_exprs.count(); ++i) {
|
||||
if (OB_ISNULL(expr = relation_exprs.at(i))) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("unexpected expr", K(ret));
|
||||
} else if (OB_FAIL(expr->extract_info())) {
|
||||
LOG_WARN("failed to extract info", K(*expr));
|
||||
}
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret) && OB_FAIL(ObTransformUtils::extract_query_ref_expr(relation_exprs, subquery_exprs_))) {
|
||||
LOG_WARN("failed to extract query ref expr", K(ret));
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user