Fix for SELECT Issue on Distributed Table with Zero-Weight Shards

SELECT worked incorrectly from a Distributed table for shards with a weight of 0. This has been fixed.