i have learnt that primary index value is hashed to create a 32 bit row hash and it is bucketed to find the amp . Does this implies that a table can have only 2^32 unique values in primary index?
It is not that you can have only 2^32 (4.2 Billion)values for a UPI. The hashing is primarily to indicate the AMP onto which a row should be distributed into. There can be more than 2^32 values.
If the number of unique values are greater than this number then we may run into a situation called as hash synonyms/hash collisions. Two values map to the same hash in usually 2 different situations: 1) when it is a NUPI on a table in which case the uniqueness value from the row hash(ROWID+uniquenessvalue)determines the row and 2) Hash synonym/hash collision in which once the multiple hash values are found(synonyms), the complete row is scanned to find if the value corresponds to the queried. Please refer the below for more details.