hubgeter commented on code in PR #39239: URL: https://github.com/apache/doris/pull/39239#discussion_r1720790583
########## fe/fe-core/src/main/java/org/apache/doris/datasource/hive/event/AlterPartitionEvent.java: ########## @@ -145,9 +145,7 @@ protected boolean canBeBatched(MetastoreEvent that) { // `that` event can be batched if this event's partitions contains all of the partitions which `that` event has // else just remove `that` event's relevant partitions for (String partitionName : getAllPartitionNames()) { - if (thatPartitionEvent instanceof AddPartitionEvent) { - ((AddPartitionEvent) thatPartitionEvent).removePartition(partitionName); - } else if (thatPartitionEvent instanceof DropPartitionEvent) { + if (thatPartitionEvent instanceof DropPartitionEvent) { Review Comment: Suppose you have a Hive partition table `users`. Execute the `INSERT INTO TABLE users PARTITION (country='ABC') VALUES (3, 'Rahul Kumar', 28), (4, 'Priya Singh', 24);` statement. If you did not have the partition `country='ABC'` before, Hive will generate two events. 1. add partition event 2. alter partition event The original logic is to merge these two events into one alter event for processing, but in the end this partition will not be added to the partitions cache. In order to reduce the judgment logic of the alter event, I will not merge these two events here. -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org