Github user JamesRTaylor commented on a diff in the pull request: https://github.com/apache/phoenix/pull/34#discussion_r23721101 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java --- @@ -976,20 +1043,33 @@ private void initCachedState() { ref.getFamily(), ref.getQualifier()))); } - this.allColumns = Sets.newLinkedHashSetWithExpectedSize(indexedColumns.size() + coveredColumns.size()); + this.allColumns = Sets.newLinkedHashSetWithExpectedSize(indexedExpressions.size() + coveredColumns.size()); + // columns that are required to evaluate all expressions in indexedExpressions (not including columns in data row key) + this.indexedColumns = Sets.newLinkedHashSetWithExpectedSize(indexedExpressions.size()); + for (Expression expression : indexedExpressions) { + KeyValueExpressionVisitor visitor = new KeyValueExpressionVisitor() { + @Override + public Void visit(KeyValueColumnExpression expression) { + indexedColumns.add(new ColumnReference(expression.getColumnFamily(), expression.getColumnName())); + indexedColumnTypes.add(expression.getDataType()); --- End diff -- Good point. This is fine.
--- 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. ---