fix single partition opt bug

This commit is contained in:
bf0
2021-09-24 11:10:39 +08:00
committed by wangzelin.wzl
parent 86697041a2
commit 73e3401749
9 changed files with 87 additions and 40 deletions

View File

@ -3890,3 +3890,16 @@ int ObSQLUtils::handle_audit_record(
session.reset_audit_record();
return ret;
}
bool ObSQLUtils::is_one_part_table_can_skip_part_calc(const ObTableSchema &schema)
{
bool can_skip = false;
if (!schema.is_partitioned_table()) {
can_skip = true;
} else if (schema.get_all_part_num() == 1 && schema.is_hash_part()) {
can_skip = true;
} else {
can_skip = false;
}
return can_skip;
}