[FEAT MERGE] [CP] Improve the rowcount estimation
Co-authored-by: akaError <lzg020616@163.com>
This commit is contained in:
@ -9494,6 +9494,29 @@ bool ObOptimizerUtil::find_superset(const ObRelIds &rel_ids,
|
||||
}
|
||||
return bret;
|
||||
}
|
||||
int ObOptimizerUtil::check_is_static_false_expr(ObOptimizerContext &opt_ctx, ObRawExpr &expr, bool &is_static_false)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObObj const_value;
|
||||
bool got_result = false;
|
||||
bool is_result_true = false;
|
||||
if (!expr.is_static_const_expr()) {
|
||||
// do nothing
|
||||
} else if (OB_FAIL(ObSQLUtils::calc_const_or_calculable_expr(opt_ctx.get_exec_ctx(),
|
||||
&expr,
|
||||
const_value,
|
||||
got_result,
|
||||
opt_ctx.get_allocator()))) {
|
||||
LOG_WARN("failed to calc const or calculable expr", K(ret));
|
||||
} else if (!got_result) {
|
||||
// do nothing
|
||||
} else if (OB_FAIL(ObObjEvaluator::is_true(const_value, is_result_true))) {
|
||||
LOG_WARN("failed to check is const value true", K(ret));
|
||||
} else {
|
||||
is_static_false = !is_result_true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObOptimizerUtil::check_ancestor_node_support_skip_scan(ObLogicalOperator* op, bool &can_use_batch_nlj)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user