Github user twdsilva commented on a diff in the pull request: https://github.com/apache/phoenix/pull/34#discussion_r23663726 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java --- @@ -881,7 +908,30 @@ public void readFields(DataInput input) throws IOException { } indexTableName = Bytes.readByteArray(input); dataEmptyKeyValueCF = Bytes.readByteArray(input); - emptyKeyValueCFPtr = new ImmutableBytesPtr(Bytes.readByteArray(input)); + int len = WritableUtils.readVInt(input); + //TODO remove this in the next major release + boolean isNewClient = false; + if (len < 0) { + isNewClient = true; + len=Math.abs(len); + } + byte [] emptyKeyValueCF = new byte[len]; + input.readFully(emptyKeyValueCF, 0, len); + emptyKeyValueCFPtr = new ImmutableBytesPtr(emptyKeyValueCF); + + if (isNewClient) { + int numIndexedExpressions = WritableUtils.readVInt(input); + indexedExpressions = Sets.newLinkedHashSetWithExpectedSize(numIndexedExpressions); + for (int i = 0; i < numIndexedExpressions; i++) { + Expression expression = ExpressionType.values()[WritableUtils.readVInt(input)].newInstance(); + expression.readFields(input); + indexedExpressions.add(expression); + } + } + else { + indexedExpressions = Sets.newLinkedHashSetWithExpectedSize(indexedColumnTypes.size()); + //TODO figure out how to create indexedExpressions --- End diff -- I have to create a KeyValueColumnExpression for every column reference in indexedColumns, but this requires a PColumn
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---