Hi James, this && is to prevent us from initializing the salt column one more time when we serialize it to the server. When we initialize it in the client size, there is no salt column, so we should insert one. When we serialize the table to the server side, the salt column is already inserted in there, so we do not need to insert it again. I can either check it here, or I can skip serializing the column in the write code.


On 4/16/13 4:26 PM, "James Taylor" <notifications@github.com> wrote:

In src/main/java/com/salesforce/phoenix/schema/PTableImpl.java:
>          RowKeySchemaBuilder builder = new RowKeySchemaBuilder();
> -        for (int i = 0; i < allColumns.length; i++) {
> +        this.columnsByName = ArrayListMultimap.create(columns.size(), 1);
> +        allColumns = new PColumn[columns.size()];
> +        if (bucketNum != null && !columns.get(0).getName().getString().equals(SALTING_COLUMN.getName().getString())) {
I don't think you should need this AND clause:  && !columns.get(0).getName().getString().equals(SALTING_COLUMN.getName().getString())

-
Reply to this email directly or view it on GitHub <https://github.com/forcedotcom/phoenix/pull/139/files#r3823525> .