priyankporwal commented on a change in pull request #514: PHOENIX-5261: 
Implement ALTER TABLE/VIEW ADD COLUMN CASCADE
URL: https://github.com/apache/phoenix/pull/514#discussion_r291884336
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
 ##########
 @@ -3528,14 +3529,24 @@ private void mutateStringProperty(String tenantId, 
String schemaName, String tab
 
     public MutationState addColumn(AddColumnStatement statement) throws 
SQLException {
         PTable table = FromCompiler.getResolver(statement, 
connection).getTables().get(0).getTable();
-        return addColumn(table, statement.getColumnDefs(), 
statement.getProps(), statement.ifNotExists(), false, statement.getTable(), 
statement.getTableType());
+        return addColumn(table, statement.getColumnDefs(), 
statement.getProps(), statement.ifNotExists(), false, statement.getTable(), 
statement.getTableType(), statement.isCascade(), statement.getIndexes());
     }
 
     public MutationState addColumn(PTable table, List<ColumnDef> 
origColumnDefs,
             ListMultimap<String, Pair<String, Object>> stmtProperties, boolean 
ifNotExists,
-            boolean removeTableProps, NamedTableNode namedTableNode, 
PTableType tableType)
+            boolean removeTableProps, NamedTableNode namedTableNode, 
PTableType tableType, boolean cascade, List<NamedNode> indexes)
                     throws SQLException {
         connection.rollback();
+        List<PTable> indexesPTable = 
Lists.newArrayListWithExpectedSize(indexes != null ?
 
 Review comment:
   Do we really need RHS of this statement? Looks like it is overwritten in the 
if (cascade...) block below.

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


With regards,
Apache Git Services

Reply via email to