Skip to content

Commit

Permalink
Add KLL serialization format compatiblity guarantee (facebookincubato…
Browse files Browse the repository at this point in the history
…r#9518)

Summary: Pull Request resolved: facebookincubator#9518

Differential Revision: D56264716
  • Loading branch information
Yuhta authored and facebook-github-bot committed Apr 17, 2024
1 parent 79f3add commit 92045d5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions velox/functions/lib/KllSketch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<T, Allocator, Compare> deserialize(
const char* data,
const Allocator& = Allocator(),
Expand Down

0 comments on commit 92045d5

Please sign in to comment.