fix granule iterator generate T_PDML_PARTITION_ID expr bug

This commit is contained in:
sdc
2023-05-30 13:47:29 +00:00
committed by ob-robot
parent 3b31ff02ed
commit 4f890f0a8c
8 changed files with 31 additions and 15 deletions

View File

@ -953,7 +953,11 @@ int ObTableScanOp::update_output_tablet_id()
} else {
data_tablet_loc = scan_result_.get_tablet_loc();
}
if (OB_NOT_NULL(data_tablet_loc)) {
if (OB_ISNULL(data_tablet_loc)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("data tablet loc is null, value of pdml partition id will not be set", K(ret),
K(MY_SPEC.should_scan_index()), K(MY_SPEC.ref_table_id_));
} else {
if (MY_SPEC.partition_id_calc_type_ == 0) {
output_id = data_tablet_loc->tablet_id_.id();
} else if (MY_SPEC.partition_id_calc_type_ == 1) {