lxy-9602 commented on code in PR #253:
URL: https://github.com/apache/paimon-cpp/pull/253#discussion_r3877240255
##########
src/paimon/core/index/pksorted/pk_sorted_bucket_index_state.cpp:
##########
@@ -49,10 +59,20 @@ PkSortedBucketIndexState
PkSortedBucketIndexState::FromActiveDataFiles(
});
}
- // Match payloads against the expected level sources; anything that does
not decode or
- // does not exactly cover its level is rejected.
- std::map<int32_t, std::vector<std::shared_ptr<IndexFileMeta>>>
payloads_by_level;
- std::map<int32_t, std::vector<PrimaryKeyIndexSourceMeta>>
payload_metas_by_level;
+ std::map<std::string, int64_t> active_sources;
+ std::set<std::string> ambiguous_active_source_names;
+ for (const auto& level_sources : sources_by_level) {
+ for (const PrimaryKeyIndexSourceFile& source : level_sources.second) {
+ if (!active_sources.emplace(source.file_name,
source.row_count).second) {
+ ambiguous_active_source_names.insert(source.file_name);
Review Comment:
Is ignoring `source_meta.DataLevel()` intentional to support metadata-only
file upgrades? If so, could we add a regression test and document this behavior?
--
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]