Reputation: 31
I am using Phoenix to run SQL on my HBase, but when I try bigint for primary key it returns NULL for that columns in select but varchar return correct result
Upvotes: 1
Views: 155
Reputation: 79
This is plainly because the primary key in Hbase/Phoenix is stored as an integer, which by definition can be 0,1,-1. If it is 0, it is nullable which a primary key cannot be. Hence, we need to keep it as a VARCHAR.
Upvotes: 1