csun5285 commented on code in PR #67642:
URL: https://github.com/apache/doris/pull/67642#discussion_r4023041290


##########
be/src/storage/index/zone_map/zone_map_index.cpp:
##########
@@ -85,6 +87,17 @@ Status ZoneMap::from_proto(const ZoneMapPB& zone_map, const 
DataTypePtr& data_ty
             parse_bound(zone_map.max(), zone_map_info.max_value);
         }
 
+        // Lower the raised byte back to what the data held, then run the 
writer's check on it.
+        // A max that came from 0xff wrapped to 0x00, and old segments still 
carry such a max.
+        if (!zone_map_info.pass_all && is_string_type(field_type) &&
+            zone_map.max().size() == MAX_ZONE_MAP_INDEX_SIZE) {
+            std::string max_before_raise = zone_map.max();
+            max_before_raise.back() -= 1;
+            if (!validate_utf8(max_before_raise.data(), 
max_before_raise.size())) {
+                zone_map_info.pass_all = true;

Review Comment:
   现在修改写入侧是进位+1,查询的时候碰见全 0x00才 pass all,假定之前的zonemap都是对的。



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