Merge pull request #2908 from citusdata/sort_colocatedshardintervallist

Sort ColocatedShardIntervalList
pull/2898/head
Philip Dubé 2019-08-26 17:53:47 +00:00 committed by GitHub
commit b354644c56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
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);
}