[CP] [CP] insert into select use distribute insert when partition pruning get empty partition

This commit is contained in:
obdev
2023-07-06 13:42:16 +00:00
committed by ob-robot
parent f3c97ed0c9
commit 1990779a97
5 changed files with 18 additions and 10 deletions

View File

@ -11978,6 +11978,9 @@ int ObLogPlan::build_location_related_tablet_ids()
if (OB_ISNULL(table_part_info)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("invalid partition info", K(ret));
} else if (0 == table_part_info->get_phy_tbl_location_info().get_partition_cnt()) {
// partition count is 0 means no matching partition for data table, no need to calculate
// related tablet ids for it.
} else if (!table_part_info->get_table_location().use_das() &&
OB_FAIL(ObPhyLocationGetter::build_related_tablet_info(
table_part_info->get_table_location(), *optimizer_context_.get_exec_ctx(), map))) {