ColocatedShardIntervalList: sort

pull/2908/head
Philip Dubé 2019-08-26 17:40:44 +00:00
parent c1587cc00a
commit eba3828ef7
1 changed files with 1 additions and 4 deletions

View File

@ -116,9 +116,6 @@ get_colocated_shard_array(PG_FUNCTION_ARGS)
Oid arrayTypeId = OIDOID; Oid arrayTypeId = OIDOID;
int colocatedShardIndex = 0; int colocatedShardIndex = 0;
/* sort to get consistent output */
colocatedShardList = SortList(colocatedShardList, CompareShardIntervalsById);
foreach(colocatedShardCell, colocatedShardList) foreach(colocatedShardCell, colocatedShardList)
{ {
ShardInterval *colocatedShardInterval = (ShardInterval *) lfirst( ShardInterval *colocatedShardInterval = (ShardInterval *) lfirst(
@ -918,7 +915,7 @@ ColocatedShardIntervalList(ShardInterval *shardInterval)
Assert(list_length(colocatedTableList) == list_length(colocatedShardList)); Assert(list_length(colocatedTableList) == list_length(colocatedShardList));
return colocatedShardList; return SortList(colocatedShardList, CompareShardIntervalsById);
} }