mirror of https://github.com/citusdata/citus.git
Address reviews - Part 2
- Add check for reference tables with no shardspull/1048/head
parent
e1f469e92b
commit
e8f41c6333
|
@ -192,7 +192,13 @@ get_shard_id_for_distribution_column(PG_FUNCTION_ARGS)
|
|||
distributionMethod = PartitionMethod(relationId);
|
||||
if (distributionMethod == DISTRIBUTE_BY_NONE)
|
||||
{
|
||||
shardInterval = (ShardInterval *) linitial(LoadShardIntervalList(relationId));
|
||||
List *shardIntervalList = LoadShardIntervalList(relationId);
|
||||
if (shardIntervalList == NIL)
|
||||
{
|
||||
PG_RETURN_INT64(NULL);
|
||||
}
|
||||
|
||||
shardInterval = (ShardInterval *) linitial(shardIntervalList);
|
||||
}
|
||||
else if (distributionMethod == DISTRIBUTE_BY_HASH ||
|
||||
distributionMethod == DISTRIBUTE_BY_RANGE)
|
||||
|
|
Loading…
Reference in New Issue