Jackie-Jiang commented on code in PR #17645:
URL: https://github.com/apache/pinot/pull/17645#discussion_r2881051769


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/TableConfigsRestletResource.java:
##########
@@ -367,7 +368,8 @@ public ConfigSuccessResponse updateConfig(
       @ApiParam(value = "Reload the table if the new schema is backward 
compatible") @DefaultValue("false")
       @QueryParam("reload") boolean reload,
       @ApiParam(value = "Force update the table schema") 
@DefaultValue("false") @QueryParam("forceTableSchemaUpdate")
-      boolean forceTableSchemaUpdate, String tableConfigsStr, @Context 
HttpHeaders headers)
+      boolean forceTableSchemaUpdate, @ApiParam(value = "Force update config 
changes") String tableConfigsStr,

Review Comment:
   `@ApiParam` added to the wrong field



##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -1582,6 +1585,14 @@ private void updateSchema(Schema schema, Schema 
oldSchema, boolean forceTableSch
             .append(" is not backward-compatible with the existing schema.");
         errorMsg.append("\n\nIncompatibility Details:");
 
+        // Check for primary key column changes
+        List<String> oldPrimaryKeys = oldSchema.getPrimaryKeyColumns();
+        List<String> newPrimaryKeys = schema.getPrimaryKeyColumns();
+        if (oldPrimaryKeys != null && !oldPrimaryKeys.isEmpty() && 
!oldPrimaryKeys.equals(newPrimaryKeys)) {

Review Comment:
   This doesn't align with the check in `Schema`. Do you want to allow adding 
primary keys when there is no existing one?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to