The salting bye need to be null able, or some of our checks would throw an exception indicating that a not nullable PK column is not set in an upsert statement. I think it's easier to allow the byte column to be null able, and bypass the other check. I can find out which check exactly is that.

Sent from my iPad

Thanks
Tony

On Apr 15, 2013, at 1:29 PM, "James Taylor" <notifications@github.com<mailto:notifications@github.com>> 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),


The salting byte would be fixed length and non nullable, right? Why is this special case necessary?

—
Reply to this email directly or view it on GitHub<https://github.com/forcedotcom/phoenix/pull/139/files#r3801210>.