From 2d1444188c9021d8a424b638e9aa77343f28cf9c Mon Sep 17 00:00:00 2001 From: zhjwpku Date: Wed, 18 Oct 2023 16:53:00 +0800 Subject: [PATCH] Fix wrong comments around HasDistributionKey() (#7223) HasDistributionKey & HasDistributionKeyCacheEntry returns true when the corresponding table has a distribution key, the comments state the opposite, which should be fixed. Signed-off-by: Zhao Junwang Co-authored-by: Onur Tirtir --- src/backend/distributed/metadata/metadata_cache.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/backend/distributed/metadata/metadata_cache.c b/src/backend/distributed/metadata/metadata_cache.c index 55d0f11c57f..85a94530887 100644 --- a/src/backend/distributed/metadata/metadata_cache.c +++ b/src/backend/distributed/metadata/metadata_cache.c @@ -521,8 +521,7 @@ IsCitusTableTypeCacheEntry(CitusTableCacheEntry *tableEntry, CitusTableType tabl /* - * HasDistributionKey returs true if given Citus table doesn't have a - * distribution key. + * HasDistributionKey returns true if given Citus table has a distribution key. */ bool HasDistributionKey(Oid relationId) @@ -538,8 +537,8 @@ HasDistributionKey(Oid relationId) /* - * HasDistributionKey returs true if given cache entry identifies a Citus - * table that doesn't have a distribution key. + * HasDistributionKeyCacheEntry returns true if given cache entry identifies a + * Citus table that has a distribution key. */ bool HasDistributionKeyCacheEntry(CitusTableCacheEntry *tableEntry)