phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [phoenix] brfrn169 commented on a change in pull request #516: PHOENIX-5209 Cannot add non-PK column to table when the last PK column is of type VARBINARY or ARRAY
Date Mon, 10 Jun 2019 16:54:04 GMT
brfrn169 commented on a change in pull request #516: PHOENIX-5209 Cannot add non-PK column
to table when the last PK column is of type VARBINARY or ARRAY
URL: https://github.com/apache/phoenix/pull/516#discussion_r292095594
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
 ##########
 @@ -3593,10 +3593,11 @@ public MutationState addColumn(PTable table, List<ColumnDef>
origColumnDefs,
 
                 int position = table.getColumns().size();
 
-                List<PColumn> currentPKs = table.getPKColumns();
-                if (numCols > 0) {
+                boolean addPKColumns = columnDefs.stream().anyMatch(ColumnDef::isPK);
 
 Review comment:
   Do you mean I should remove the `addPKColumns` variable and change the if statement to
something like the following:
   ```
                   if (columnDefs.stream().anyMatch(ColumnDef::isPK)) {
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message