wangyong9999 commented on code in PR #284:
URL: https://github.com/apache/paimon-cpp/pull/284#discussion_r3954204950


##########
src/paimon/common/io/cache/cache_key.h:
##########
@@ -26,6 +26,11 @@
 
 namespace paimon {
 
+// Cache inferred candidates separately from explicit buckets and other bucket 
layouts.
+std::shared_ptr<CacheKey> CreateInferredSnapshotLiveManifestEntriesCacheKey(
+    const std::string& table_path, const std::string& branch, int32_t bucket, 
int32_t total_buckets,
+    int64_t schema_id);
+

Review Comment:
   Replaced the namespace-level factory with 
SnapshotLiveManifestEntriesCacheKey::ForExplicit and ForInferred in a824461a. 
Both stay in the internal cache header.



##########
src/paimon/common/io/cache/cache_key.cpp:
##########
@@ -87,14 +86,14 @@ std::shared_ptr<CacheKey> CacheKey::ForKind(const 
std::string& file_path, int64_
 std::shared_ptr<CacheKey> CacheKey::ForSnapshotLiveManifestEntries(const 
std::string& table_path,
                                                                    const 
std::string& branch,
                                                                    int32_t 
bucket) {
-    return std::make_shared<SnapshotLiveManifestEntriesCacheKey>(table_path, 
branch, bucket);
+    return std::make_shared<SnapshotLiveManifestEntriesCacheKey>(table_path, 
branch, bucket,
+                                                                 
/*total_buckets=*/0,
+                                                                 
/*schema_id=*/0);
 }

Review Comment:
   Done in a824461a. The key now stores an explicit mode and optional 
bucket-count/schema fields. ForExplicit leaves the fields empty; ForInferred 
keeps the supplied metadata, including schema 0. Equality and hashing include 
the mode. Updated the isolation test; 15 cache tests and 81 Append/KV 
integration tests pass.



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

Reply via email to