From c30937a49c31f4d56d70cc4b9c620f64b48407fc Mon Sep 17 00:00:00 2001 From: Orson Peters Date: Mon, 24 Jun 2024 13:11:09 +0200 Subject: [PATCH] clarify successor increment in sequence id --- crates/polars-stream/src/morsel.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/polars-stream/src/morsel.rs b/crates/polars-stream/src/morsel.rs index 5a9e3305f969..6e0570128894 100644 --- a/crates/polars-stream/src/morsel.rs +++ b/crates/polars-stream/src/morsel.rs @@ -26,6 +26,8 @@ impl MorselSeq { // The morsel sequence id which comes after this morsel. pub fn successor(self) -> Self { + // We increment by two because in the future we want to use the least + // significant bit to indicate the final morsel with that sequence id. Self(self.0.checked_add(2).unwrap()) }