Add ShardSpec Lookup

Optimize choosing shardSpec for Hash Partitions
is input really nullable?