[FEAT MERGE] merge NLJ/SPF group rescan
This commit is contained in:
@ -1545,12 +1545,24 @@ int ObLogTableScan::get_phy_location_type(ObTableLocationType &location_type)
|
||||
int ObLogTableScan::extract_bnlj_param_idxs(ObIArray<int64_t> &bnlj_params)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObArray<ObRawExpr*> param_exprs;
|
||||
if (OB_FAIL(ObRawExprUtils::extract_params(range_conds_, param_exprs))) {
|
||||
LOG_WARN("extract params failed", K(ret));
|
||||
ObArray<ObRawExpr*> range_param_exprs;
|
||||
ObArray<ObRawExpr*> filter_param_exprs;
|
||||
if (OB_FAIL(ObRawExprUtils::extract_params(range_conds_, range_param_exprs))) {
|
||||
LOG_WARN("extract range params failed", K(ret));
|
||||
} else if (OB_FAIL(ObRawExprUtils::extract_params(filter_exprs_, filter_param_exprs))) {
|
||||
LOG_WARN("extract filter params failed", K(ret));
|
||||
}
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < param_exprs.count(); ++i) {
|
||||
ObRawExpr *expr = param_exprs.at(i);
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < range_param_exprs.count(); ++i) {
|
||||
ObRawExpr *expr = range_param_exprs.at(i);
|
||||
if (expr->has_flag(IS_DYNAMIC_PARAM)) {
|
||||
ObConstRawExpr *exec_param = static_cast<ObConstRawExpr*>(expr);
|
||||
if (OB_FAIL(add_var_to_array_no_dup(bnlj_params, exec_param->get_value().get_unknown()))) {
|
||||
LOG_WARN("add var to array no dup failed", K(ret));
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < filter_param_exprs.count(); ++i) {
|
||||
ObRawExpr *expr = filter_param_exprs.at(i);
|
||||
if (expr->has_flag(IS_DYNAMIC_PARAM)) {
|
||||
ObConstRawExpr *exec_param = static_cast<ObConstRawExpr*>(expr);
|
||||
if (OB_FAIL(add_var_to_array_no_dup(bnlj_params, exec_param->get_value().get_unknown()))) {
|
||||
@ -1559,7 +1571,7 @@ int ObLogTableScan::extract_bnlj_param_idxs(ObIArray<int64_t> &bnlj_params)
|
||||
}
|
||||
}
|
||||
if (OB_SUCC(ret)) {
|
||||
LOG_DEBUG("extract bnlj params", K(param_exprs), K(bnlj_params));
|
||||
LOG_DEBUG("extract bnlj params", K(range_param_exprs), K(filter_param_exprs), K(bnlj_params));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user