You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/30 14:57:13 UTC

[GitHub] [incubator-doris] morningman opened a new pull request, #9339: [fix](truncate) fix bug that truncate partition throw NPE

morningman opened a new pull request, #9339:
URL: https://github.com/apache/incubator-doris/pull/9339

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem Summary:
   
   partition name is case insensitive
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (No)
   2. Has unit tests been added: (Yes)
   3. Has document been added or modified: (No Need)
   4. Does it need to update dependencies: (No)
   5. Are there any changes that cannot be rolled back: (No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman merged pull request #9339: [fix](truncate) fix bug that truncate partition throw NPE

Posted by GitBox <gi...@apache.org>.
morningman merged PR #9339:
URL: https://github.com/apache/incubator-doris/pull/9339


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a diff in pull request #9339: [fix](truncate) fix bug that truncate partition throw NPE

Posted by GitBox <gi...@apache.org>.
morningman commented on code in PR #9339:
URL: https://github.com/apache/incubator-doris/pull/9339#discussion_r862448072


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java:
##########
@@ -1286,11 +1286,13 @@ public OlapTable selectiveCopy(Collection<String> reservedPartitions, IndexExtSt
             return copied;
         }
 
-        Set<String> partNames = Sets.newTreeSet(String.CASE_INSENSITIVE_ORDER);
+        Set<String> partNames = Sets.newHashSet();
         partNames.addAll(copied.getPartitionNames());
 
+        // partition name is case insensitive:
+        Set<String> lowerReservedPartitionNames = reservedPartitions.stream().map(n -> n.toLowerCase()).collect(Collectors.toSet());

Review Comment:
   done



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on pull request #9339: [fix](truncate) fix bug that truncate partition throw NPE

Posted by GitBox <gi...@apache.org>.
morningman commented on PR #9339:
URL: https://github.com/apache/incubator-doris/pull/9339#issuecomment-1114183305

   > What is this used for help-resource.zip?
   
   In #9306, I add a strict check to verify the format of "help" document, but it results in that the FE ut can not start locally
   duo to miss the help-resource.zip.
   So I add one for the FE unit test. There is only one empty doc inside it, just for passing the check.


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] github-actions[bot] commented on pull request #9339: [fix](truncate) fix bug that truncate partition throw NPE

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #9339:
URL: https://github.com/apache/incubator-doris/pull/9339#issuecomment-1114185435

   PR approved by at least one committer and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] github-actions[bot] commented on pull request #9339: [fix](truncate) fix bug that truncate partition throw NPE

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #9339:
URL: https://github.com/apache/incubator-doris/pull/9339#issuecomment-1114185446

   PR approved by anyone and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morrySnow commented on a diff in pull request #9339: [fix](truncate) fix bug that truncate partition throw NPE

Posted by GitBox <gi...@apache.org>.
morrySnow commented on code in PR #9339:
URL: https://github.com/apache/incubator-doris/pull/9339#discussion_r862371560


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java:
##########
@@ -1286,11 +1286,13 @@ public OlapTable selectiveCopy(Collection<String> reservedPartitions, IndexExtSt
             return copied;
         }
 
-        Set<String> partNames = Sets.newTreeSet(String.CASE_INSENSITIVE_ORDER);
+        Set<String> partNames = Sets.newHashSet();
         partNames.addAll(copied.getPartitionNames());
 
+        // partition name is case insensitive:
+        Set<String> lowerReservedPartitionNames = reservedPartitions.stream().map(n -> n.toLowerCase()).collect(Collectors.toSet());

Review Comment:
   ```
   n -> n.toLowerCase()
   ```
   suggest code
   ```
   String::toLowerCase
   ```



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org