ChinmaySKulkarni commented on a change in pull request #832:
URL: https://github.com/apache/phoenix/pull/832#discussion_r456585611



##########
File path: 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/DropColumnMutator.java
##########
@@ -80,7 +81,8 @@ public DropColumnMutator(Configuration conf) {
     }
 
     @Override
-    public MutateColumnType getMutateColumnType() {
+    public MutateColumnType getMutateColumnType()
+    {

Review comment:
       nit: remove this diff

##########
File path: 
phoenix-core/src/it/java/org/apache/phoenix/end2end/index/DropColumnIT.java
##########
@@ -411,5 +412,126 @@ public void testDroppingIndexedColDropsIndex() throws 
Exception {
             assertNull(results.next());
         }
     }
-    
+
+    @Test
+    public void testDropViewIndexColumn() throws Exception {
+        String table = generateUniqueName();
+        String view = generateUniqueName();
+        String index = generateUniqueName();
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(true);
+            try (Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," +
+                        " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
+                // create view
+                stmt.execute(
+                        "CREATE VIEW IF NOT EXISTS " + view + "  (PK1 DATE NOT 
NULL,PK2 CHAR(15) NOT NULL," +
+                                "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+                                "AS SELECT * FROM " + table + " WHERE 
KEY_PREFIX = '123'");
+                // create index
+                stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+                // drop column
+                stmt.execute("ALTER VIEW "  + view + " DROP COLUMN NON_PK1");
+            }
+        } catch (Exception e) {
+            fail();
+        }
+    }
+
+    @Test
+    public void testDropViewIndexColumnForMultiTenantTable() throws Exception {
+        String table = generateUniqueName();
+        String view = generateUniqueName();
+        String index = generateUniqueName();
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(true);
+            try (Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE TABLE IF NOT EXISTS "  + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," +
+                        " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX)) 
MULTI_TENANT=TRUE");
+                // create view
+                stmt.execute(
+                        "CREATE VIEW IF NOT EXISTS "  + view + "  (PK1 DATE 
NOT NULL,PK2 CHAR(15) NOT NULL," +
+                                "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+                                "AS SELECT * FROM "  + table + " WHERE 
KEY_PREFIX = '123'");
+                // create index
+                stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+                // drop column
+                stmt.execute("ALTER VIEW "  + view + " DROP COLUMN NON_PK1");
+            }
+        } catch (Exception e) {
+            fail();
+        }
+    }
+
+    @Test
+    public void testDropIndexColumn() throws Exception {
+        String table = generateUniqueName();
+        String index = generateUniqueName();
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(true);
+            try (Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL, NON_PK1 CHAR(15),NON_PK2 
CHAR(15), " +
+                        " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
+                // create index
+                stmt.execute("CREATE INDEX " + index + " ON " + table +" 
(KEY_PREFIX, ID) INCLUDE (NON_PK1, NON_PK2)");
+                // drop column
+                stmt.execute("ALTER TABLE " + table + " DROP COLUMN NON_PK1");
+            }
+        } catch (Exception e) {
+            fail();
+        }
+    }
+
+    @Test
+    public void testDropColumnForMultiTenantTable() throws Exception {
+        String table = generateUniqueName();
+        String view = generateUniqueName();
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(true);
+            try (Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL, NON_PK3 CHAR(15)," +
+                        " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX)) 
MULTI_TENANT=TRUE");
+                // create view
+                stmt.execute(
+                        "CREATE VIEW IF NOT EXISTS " +  view  + "  (PK1 DATE 
NOT NULL,PK2 CHAR(15) NOT NULL," +
+                                "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+                                "AS SELECT * FROM " + table + " WHERE 
KEY_PREFIX = '123'");
+                // drop column
+                stmt.execute("ALTER VIEW " + view + " DROP COLUMN NON_PK3");
+            }
+        } catch (Exception e) {
+            fail();
+        }
+    }
+
+    @Test
+    public void testDropColumnForMultiTenantTableWithIndex() throws Exception {
+        String table = generateUniqueName();
+        String view = generateUniqueName();
+        String index = generateUniqueName();
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(true);
+            try (Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL, NON_PK3 CHAR(15)," +
+                        " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX)) 
MULTI_TENANT=TRUE");
+                // create view
+                stmt.execute(
+                        "CREATE VIEW IF NOT EXISTS " +  view  + "  (PK1 DATE 
NOT NULL,PK2 CHAR(15) NOT NULL," +
+                                "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+                                "AS SELECT * FROM " + table + " WHERE 
KEY_PREFIX = '123'");
+
+                stmt.execute("CREATE INDEX " + index + " ON " + view +" (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+
+                // drop column
+                stmt.execute("ALTER VIEW " + view + " DROP COLUMN NON_PK3");
+            }
+        } catch (Exception e) {

Review comment:
       ditto

##########
File path: 
phoenix-core/src/it/java/org/apache/phoenix/end2end/index/DropColumnIT.java
##########
@@ -411,5 +412,126 @@ public void testDroppingIndexedColDropsIndex() throws 
Exception {
             assertNull(results.next());
         }
     }
-    
+
+    @Test
+    public void testDropViewIndexColumn() throws Exception {
+        String table = generateUniqueName();
+        String view = generateUniqueName();
+        String index = generateUniqueName();
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(true);
+            try (Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," +
+                        " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
+                // create view
+                stmt.execute(
+                        "CREATE VIEW IF NOT EXISTS " + view + "  (PK1 DATE NOT 
NULL,PK2 CHAR(15) NOT NULL," +
+                                "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+                                "AS SELECT * FROM " + table + " WHERE 
KEY_PREFIX = '123'");
+                // create index
+                stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+                // drop column
+                stmt.execute("ALTER VIEW "  + view + " DROP COLUMN NON_PK1");
+            }
+        } catch (Exception e) {

Review comment:
       No need to catch here

##########
File path: 
phoenix-core/src/it/java/org/apache/phoenix/end2end/index/DropColumnIT.java
##########
@@ -411,5 +412,126 @@ public void testDroppingIndexedColDropsIndex() throws 
Exception {
             assertNull(results.next());
         }
     }
-    
+
+    @Test
+    public void testDropViewIndexColumn() throws Exception {
+        String table = generateUniqueName();
+        String view = generateUniqueName();
+        String index = generateUniqueName();
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(true);
+            try (Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," +
+                        " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
+                // create view
+                stmt.execute(
+                        "CREATE VIEW IF NOT EXISTS " + view + "  (PK1 DATE NOT 
NULL,PK2 CHAR(15) NOT NULL," +
+                                "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+                                "AS SELECT * FROM " + table + " WHERE 
KEY_PREFIX = '123'");
+                // create index
+                stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+                // drop column
+                stmt.execute("ALTER VIEW "  + view + " DROP COLUMN NON_PK1");
+            }
+        } catch (Exception e) {
+            fail();
+        }
+    }
+
+    @Test
+    public void testDropViewIndexColumnForMultiTenantTable() throws Exception {
+        String table = generateUniqueName();
+        String view = generateUniqueName();
+        String index = generateUniqueName();
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(true);
+            try (Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE TABLE IF NOT EXISTS "  + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," +
+                        " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX)) 
MULTI_TENANT=TRUE");
+                // create view
+                stmt.execute(
+                        "CREATE VIEW IF NOT EXISTS "  + view + "  (PK1 DATE 
NOT NULL,PK2 CHAR(15) NOT NULL," +
+                                "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+                                "AS SELECT * FROM "  + table + " WHERE 
KEY_PREFIX = '123'");
+                // create index
+                stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+                // drop column
+                stmt.execute("ALTER VIEW "  + view + " DROP COLUMN NON_PK1");
+            }
+        } catch (Exception e) {

Review comment:
       Same here, no need to catch exception and fail. Just let it propagate up

##########
File path: 
phoenix-core/src/it/java/org/apache/phoenix/end2end/index/DropColumnIT.java
##########
@@ -411,5 +412,126 @@ public void testDroppingIndexedColDropsIndex() throws 
Exception {
             assertNull(results.next());
         }
     }
-    
+
+    @Test
+    public void testDropViewIndexColumn() throws Exception {
+        String table = generateUniqueName();
+        String view = generateUniqueName();
+        String index = generateUniqueName();
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(true);
+            try (Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," +
+                        " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
+                // create view
+                stmt.execute(
+                        "CREATE VIEW IF NOT EXISTS " + view + "  (PK1 DATE NOT 
NULL,PK2 CHAR(15) NOT NULL," +
+                                "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+                                "AS SELECT * FROM " + table + " WHERE 
KEY_PREFIX = '123'");
+                // create index
+                stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+                // drop column
+                stmt.execute("ALTER VIEW "  + view + " DROP COLUMN NON_PK1");
+            }
+        } catch (Exception e) {
+            fail();
+        }
+    }
+
+    @Test
+    public void testDropViewIndexColumnForMultiTenantTable() throws Exception {
+        String table = generateUniqueName();
+        String view = generateUniqueName();
+        String index = generateUniqueName();
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(true);
+            try (Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE TABLE IF NOT EXISTS "  + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," +
+                        " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX)) 
MULTI_TENANT=TRUE");
+                // create view
+                stmt.execute(
+                        "CREATE VIEW IF NOT EXISTS "  + view + "  (PK1 DATE 
NOT NULL,PK2 CHAR(15) NOT NULL," +
+                                "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+                                "AS SELECT * FROM "  + table + " WHERE 
KEY_PREFIX = '123'");
+                // create index
+                stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+                // drop column
+                stmt.execute("ALTER VIEW "  + view + " DROP COLUMN NON_PK1");
+            }
+        } catch (Exception e) {
+            fail();
+        }
+    }
+
+    @Test
+    public void testDropIndexColumn() throws Exception {
+        String table = generateUniqueName();
+        String index = generateUniqueName();
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(true);
+            try (Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL, NON_PK1 CHAR(15),NON_PK2 
CHAR(15), " +
+                        " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
+                // create index
+                stmt.execute("CREATE INDEX " + index + " ON " + table +" 
(KEY_PREFIX, ID) INCLUDE (NON_PK1, NON_PK2)");
+                // drop column
+                stmt.execute("ALTER TABLE " + table + " DROP COLUMN NON_PK1");
+            }
+        } catch (Exception e) {
+            fail();
+        }
+    }
+
+    @Test
+    public void testDropColumnForMultiTenantTable() throws Exception {
+        String table = generateUniqueName();
+        String view = generateUniqueName();
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(true);
+            try (Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL, NON_PK3 CHAR(15)," +
+                        " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX)) 
MULTI_TENANT=TRUE");
+                // create view
+                stmt.execute(
+                        "CREATE VIEW IF NOT EXISTS " +  view  + "  (PK1 DATE 
NOT NULL,PK2 CHAR(15) NOT NULL," +
+                                "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+                                "AS SELECT * FROM " + table + " WHERE 
KEY_PREFIX = '123'");
+                // drop column
+                stmt.execute("ALTER VIEW " + view + " DROP COLUMN NON_PK3");
+            }
+        } catch (Exception e) {

Review comment:
       ditto

##########
File path: 
phoenix-core/src/it/java/org/apache/phoenix/end2end/index/DropColumnIT.java
##########
@@ -411,5 +412,126 @@ public void testDroppingIndexedColDropsIndex() throws 
Exception {
             assertNull(results.next());
         }
     }
-    
+
+    @Test
+    public void testDropViewIndexColumn() throws Exception {
+        String table = generateUniqueName();
+        String view = generateUniqueName();
+        String index = generateUniqueName();
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(true);
+            try (Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," +
+                        " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
+                // create view
+                stmt.execute(
+                        "CREATE VIEW IF NOT EXISTS " + view + "  (PK1 DATE NOT 
NULL,PK2 CHAR(15) NOT NULL," +
+                                "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+                                "AS SELECT * FROM " + table + " WHERE 
KEY_PREFIX = '123'");
+                // create index
+                stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+                // drop column
+                stmt.execute("ALTER VIEW "  + view + " DROP COLUMN NON_PK1");
+            }
+        } catch (Exception e) {
+            fail();
+        }
+    }
+
+    @Test
+    public void testDropViewIndexColumnForMultiTenantTable() throws Exception {
+        String table = generateUniqueName();
+        String view = generateUniqueName();
+        String index = generateUniqueName();
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(true);
+            try (Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE TABLE IF NOT EXISTS "  + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," +
+                        " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX)) 
MULTI_TENANT=TRUE");
+                // create view
+                stmt.execute(
+                        "CREATE VIEW IF NOT EXISTS "  + view + "  (PK1 DATE 
NOT NULL,PK2 CHAR(15) NOT NULL," +
+                                "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT 
PKVIEW PRIMARY KEY (PK1,PK2)) " +
+                                "AS SELECT * FROM "  + table + " WHERE 
KEY_PREFIX = '123'");
+                // create index
+                stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, 
PK1) INCLUDE (NON_PK1, NON_PK2)");
+                // drop column
+                stmt.execute("ALTER VIEW "  + view + " DROP COLUMN NON_PK1");
+            }
+        } catch (Exception e) {
+            fail();
+        }
+    }
+
+    @Test
+    public void testDropIndexColumn() throws Exception {
+        String table = generateUniqueName();
+        String index = generateUniqueName();
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.setAutoCommit(true);
+            try (Statement stmt = conn.createStatement()) {
+                stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID 
CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL, NON_PK1 CHAR(15),NON_PK2 
CHAR(15), " +
+                        " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))");
+                // create index
+                stmt.execute("CREATE INDEX " + index + " ON " + table +" 
(KEY_PREFIX, ID) INCLUDE (NON_PK1, NON_PK2)");
+                // drop column
+                stmt.execute("ALTER TABLE " + table + " DROP COLUMN NON_PK1");
+            }
+        } catch (Exception e) {

Review comment:
       ditto

##########
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++) {
+                        PTableImpl indexTable = (PTableImpl) 
table.getIndexes().get(i);
+                        byte[] indexTableName = 
indexTable.getTableName().getBytes();
+                        byte[] indexSchema = 
indexTable.getSchemaName().getBytes();
+                        if (Bytes.compareTo(indexSchema, 
rowKeyMetaData[SCHEMA_NAME_INDEX]) == 0
+                                && Bytes.compareTo(indexTableName, 
rowKeyMetaData[TABLE_NAME_INDEX]) == 0) {
+                            column = MetaDataUtil.getColumn(pkCount, 
rowKeyMetaData, indexTable);
+                            break;
+                        }
+                    }
+                }
                 if (column == null)
                     continue;
                 // ignore any puts that modify the ordinal positions of columns

Review comment:
       Do we know why we are ignoring puts that modify ordinal positions?
   FYI @twdsilva 

##########
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:
       Is this required even when the parent is a table (table_type='u') or 
only needed when it is a view (table_type='v')?




----------------------------------------------------------------
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]


Reply via email to