提交 9b6599d9 编写于 作者: M my0 提交者: LINGuanRen

In pdml update, column_conv expr may produce loop.

上级 b01b3ee5
......@@ -1023,17 +1023,28 @@ int ObLogInsert::set_hash_dist_column_exprs(ObExchangeInfo& exch_info, uint64_t
K(info),
K(ret));
}
ObSEArray<ObRawExpr *, 4> except_exprs;
for (int64_t k = 0; OB_SUCC(ret) && k < info.rowkey_cnt_; ++k) {
ObRawExpr* target_expr = info.column_exprs_.at(k);
for (int64_t i = 0; OB_SUCC(ret) && i < column_convert_exprs_->count(); i++) {
ObRawExpr *target_expr = info.column_exprs_.at(k);
for (int64_t j = 0; OB_SUCC(ret) && j < column_convert_exprs_->count(); j++) {
if (OB_FAIL(ObRawExprUtils::replace_ref_column(
target_expr, table_columns_->at(i), column_convert_exprs_->at(i)))) {
target_expr, table_columns_->at(j), column_convert_exprs_->at(j), NULL, &except_exprs))) {
LOG_WARN("fail to replace ref column", K(ret));
} else if (OB_FAIL(except_exprs.push_back(column_convert_exprs_->at(j)))) {
LOG_WARN("push expr into array failed", K(ret));
}
}
OZ(rowkey_exprs.push_back(target_expr));
if (OB_FAIL(ret)) {
// do nothing
} else if (OB_FAIL(rowkey_exprs.push_back(target_expr))) {
LOG_WARN("push target expr into rowkey array failed", K(ret));
}
}
if (OB_FAIL(ret)) {
// do nothing
} else if (OB_FAIL(exch_info.append_hash_dist_expr(rowkey_exprs))) {
LOG_WARN("append rowkey array after exch info array failed", K(ret));
}
OZ(exch_info.append_hash_dist_expr(rowkey_exprs));
found = true;
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册