From eba3828ef749f69f67f59e8ec12e36e1cbfad063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Mon, 26 Aug 2019 17:40:44 +0000 Subject: [PATCH] ColocatedShardIntervalList: sort --- src/backend/distributed/utils/colocation_utils.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/backend/distributed/utils/colocation_utils.c b/src/backend/distributed/utils/colocation_utils.c index e73c4bbcb..531e2816b 100644 --- a/src/backend/distributed/utils/colocation_utils.c +++ b/src/backend/distributed/utils/colocation_utils.c @@ -116,9 +116,6 @@ get_colocated_shard_array(PG_FUNCTION_ARGS) Oid arrayTypeId = OIDOID; int colocatedShardIndex = 0; - /* sort to get consistent output */ - colocatedShardList = SortList(colocatedShardList, CompareShardIntervalsById); - foreach(colocatedShardCell, colocatedShardList) { ShardInterval *colocatedShardInterval = (ShardInterval *) lfirst( @@ -918,7 +915,7 @@ ColocatedShardIntervalList(ShardInterval *shardInterval) Assert(list_length(colocatedTableList) == list_length(colocatedShardList)); - return colocatedShardList; + return SortList(colocatedShardList, CompareShardIntervalsById); }