From 910b2008f32aee8ed40c379363f59bee54054e5b Mon Sep 17 00:00:00 2001 From: Jimmy Lu Date: Wed, 17 Apr 2024 15:07:17 -0700 Subject: [PATCH] Document KLL serialization format compatibility guarantee (#9518) Summary: Pull Request resolved: https://github.com/facebookincubator/velox/pull/9518 bypass-github-export-checks Differential Revision: D56264716 fbshipit-source-id: da847fa21c78e858a62e25dfd86e88422ecb31f5 --- velox/functions/lib/KllSketch.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/velox/functions/lib/KllSketch.h b/velox/functions/lib/KllSketch.h index ca8bc79c2be1..eab6ffb1e28f 100644 --- a/velox/functions/lib/KllSketch.h +++ b/velox/functions/lib/KllSketch.h @@ -105,11 +105,14 @@ struct KllSketch { /// Calculate the size needed for serialization. size_t serializedByteSize() const; - /// Serialize the sketch into bytes. + /// Serialize the sketch into bytes. The serialzation is versioned, and newer + /// version of code should be able to read all previous versions. + /// /// @param out Pre-allocated memory at least serializedByteSize() in size void serialize(char* out) const; - /// Deserialize a sketch from bytes. + /// Deserialize a sketch from bytes. Newer version of code should be able to + /// read all previous versions. static KllSketch deserialize( const char* data, const Allocator& = Allocator(),