ChinmaySKulkarni commented on a change in pull request #832:
URL: https://github.com/apache/phoenix/pull/832#discussion_r456642814
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/DropColumnMutator.java
##########
@@ -181,13 +183,28 @@ public MetaDataMutationResult
validateAndAddMetadata(PTable table,
byte[] key = mutation.getRow();
int pkCount = getVarChars(key, rowKeyMetaData);
if (isView && mutation instanceof Put) {
- PColumn column = MetaDataUtil.getColumn(pkCount,
rowKeyMetaData, table);
+ PColumn column = null;
+ // checking put from the view or index
+ if (Bytes.compareTo(schemaName,
rowKeyMetaData[SCHEMA_NAME_INDEX]) == 0
+ && Bytes.compareTo(tableName,
rowKeyMetaData[TABLE_NAME_INDEX]) == 0) {
+ column = MetaDataUtil.getColumn(pkCount, rowKeyMetaData,
table);
+ } else {
+ for(int i = 0; i < table.getIndexes().size(); i++) {
Review comment:
Synced offline with @yanxinyi . Missed that we have an `isView` check in
the outer if condition. Thanks
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]