yangzhg commented on a change in pull request #4143: URL: https://github.com/apache/incubator-doris/pull/4143#discussion_r459831200
########## File path: be/src/olap/rowset/segment_group.cpp ########## @@ -268,11 +265,14 @@ OLAPStatus SegmentGroup::add_zone_maps_for_linked_schema_change( WrapperField* second = WrapperField::create(column); DCHECK(second != NULL) << "failed to allocate memory for field: " << i; - if (schema_mapping[i].ref_column == -1) { + // add column also can add zone map index + if (schema_mapping[i].ref_column == -1 || i >= zone_map_fields.size()) { // ref_column == -1 means this is a new column. // for new column, use default value to fill into column_statistics - first->copy(schema_mapping[i].default_value); - second->copy(schema_mapping[i].default_value); + if (schema_mapping[i].default_value != nullptr) { + first->copy(schema_mapping[i].default_value); Review comment: if the zone map set to default value, it may be filter data incorrectly ---------------------------------------------------------------- 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. 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