解决update部分列无法选择正确分区的问题

This commit is contained in:
WangXiuqiang
2023-01-03 16:14:54 +08:00
parent f52b872535
commit ccd860bff7
3 changed files with 64 additions and 2 deletions

View File

@ -2418,11 +2418,11 @@ lreplace:
bool need_create_file = false;
int seqNum = -1;
bool can_ignore = estate->es_plannedstmt->hasIgnore;
if (!partKeyUpdate) {
Datum newval = ComputePartKeyExprTuple(result_relation_desc, estate, slot, NULL);
if (!newval && !partKeyUpdate) {
row_movement = false;
new_partId = oldPartitionOid;
} else {
Datum newval = ComputePartKeyExprTuple(result_relation_desc, estate, slot, NULL);
if (newval) {
partitionRoutingForTuple(result_relation_desc, (void*)newval, u_sess->exec_cxt.route, can_ignore);
} else {