Skip to content

Commit

Permalink
Fix wrong comments around HasDistributionKey() (#7223)
Browse files Browse the repository at this point in the history
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 <zhjwpku@gmail.com>
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
  • Loading branch information
zhjwpku and onurctirtir authored Oct 18, 2023
1 parent db13afa commit 2d14441
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/backend/distributed/metadata/metadata_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 2d14441

Please sign in to comment.