You're right, the column should be declared as fixed length and 
non-nullable. Previously when I use that, I triggered an exception for 
PK not being set on a not nullable column. However, I must have fixed it 
now since I am no longer running into that exception. Already changed it 
back to being non-nullable and removed the check.

On 04/15/2013 01:57 PM, James Taylor wrote:
>
> In src/main/java/com/salesforce/phoenix/schema/PColumnImpl.java:
>
> >              // TODO: we may be able to allow this for columns at the end of the PK
> > -            Preconditions.checkArgument(!nullable || !dataType.isFixedWidth(), "PK columns may not be both fixed width and nullable: " + name.getString());
> > +            Preconditions.checkArgument(!nullable || !dataType.isFixedWidth() || name.getString().equals(SALTING_COLUMN_NAME),
>
> Declaring it as variable length is going to make it require a null 
> byte terminator. If we declare as fixed length non nullable, then 
> it'll just use an offset instead.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/forcedotcom/phoenix/pull/139/files#r3801736>.
>