From a355825bfe21a0fff7f39ec4094babb1bb13dee0 Mon Sep 17 00:00:00 2001 From: Gokhan Gulbiz Date: Thu, 16 Mar 2023 10:40:02 +0300 Subject: [PATCH] Set INVALID_COLOCATION_ID if colocationId doesn't exist in the annotation. --- src/backend/distributed/utils/attribute.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/distributed/utils/attribute.c b/src/backend/distributed/utils/attribute.c index a42e492d5..bddf77b08 100644 --- a/src/backend/distributed/utils/attribute.c +++ b/src/backend/distributed/utils/attribute.c @@ -18,6 +18,7 @@ #include "distributed/jsonbutils.h" #include "distributed/colocation_utils.h" #include "distributed/tuplestore.h" +#include "distributed/colocation_utils.h" #include "executor/execdesc.h" #include "storage/ipc.h" #include "storage/lwlock.h" @@ -219,7 +220,7 @@ AttributeQueryIfAnnotated(const char *query_string, CmdType commandType) strcpy_s(attributeToTenant, sizeof(attributeToTenant), tenantId); } - colocationGroupId = ExtractFieldInt32(jsonbDatum, "cId", INVALID_COLOCATION_ID); + colocationGroupId = ExtractFieldInt32(jsonbDatum, "cId", INVALID_COLOCATION_ID); if (MultiTenantMonitoringLogLevel != CITUS_LOG_LEVEL_OFF) {