Github user JamesRTaylor commented on a diff in the pull request: https://github.com/apache/phoenix/pull/232#discussion_r102850416 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java --- @@ -291,39 +324,59 @@ public static void serializeAdditional(PTable table, ImmutableBytesWritable inde private boolean indexWALDisabled; private boolean isLocalIndex; private boolean immutableRows; - // Transient state private final boolean isDataTableSalted; private final RowKeySchema dataRowKeySchema; - private List<ImmutableBytesPtr> indexQualifiers; private int estimatedIndexRowKeyBytes; private int estimatedExpressionSize; private int[] dataPkPosition; private int maxTrailingNulls; private ColumnReference dataEmptyKeyValueRef; private boolean rowKeyOrderOptimizable; + /**** START: New member variables added in 4.10 *****/ + private QualifierEncodingScheme encodingScheme; + private ImmutableStorageScheme immutableStorageScheme; + /* + * Information for columns of data tables that are being indexed. The first part of the pair is column family name + * and second part is the column name. The reason we need to track this state is because for certain storage schemes + * like ImmutableStorageScheme#SINGLE_CELL_ARRAY_WITH_OFFSETS, the column for which we need to generate an index + * table put/delete is different from the columns that are indexed in the phoenix schema. This information helps us + * determine whether or not certain operations like DROP COLUMN should impact the index. + */ + private Set<Pair<String, String>> indexedColumnsInfo; + /* + * Map of covered columns where a key is column reference for a column in the data table + * and value is column reference for corresponding column in the index table. + */ + private Map<ColumnReference, ColumnReference> coveredColumnsMap; --- End diff -- We should be able to use a ColumnReference[] indexed by the column qualifier.
--- 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. ---