morningman commented on code in PR #10812:
URL: https://github.com/apache/doris/pull/10812#discussion_r919881933


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/InternalDataSource.java:
##########
@@ -1258,11 +1258,24 @@ public void addPartition(Database db, String tableName, 
AddPartitionClause addPa
                     List<Column> newDistriCols = 
hashDistributionInfo.getDistributionColumns();
                     List<Column> defaultDistriCols =
                             ((HashDistributionInfo) 
defaultDistributionInfo).getDistributionColumns();
-                    if (!newDistriCols.equals(defaultDistriCols)) {
+                    if (newDistriCols.size() != defaultDistriCols.size()) {
                         throw new DdlException(
                                 "Cannot assign hash distribution with 
different distribution cols. " + "default is: "
                                         + defaultDistriCols);
+                    } else {
+                        for (int i = 0; i < defaultDistriCols.size(); i++) {

Review Comment:
   Please add comment to explain why we only check name and type.
   And I think name can also be ignored.



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