Skip to content

Commit 73771b7

Browse files
authored
Fix: deserialization propagation after sliding window (#875)
* Fix type hinting in expire_by_key * Fix sliding windows
1 parent c8f6a99 commit 73771b7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

quixstreams/dataframe/windows/sliding.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def process_window(
279279
# build a complete list otherwise expired windows could be deleted
280280
# in state.delete_windows() and never be fetched.
281281
expired_windows = list(
282-
self._expired_windows(state, max_expired_window_start, collect)
282+
self._expired_windows(key, state, max_expired_window_start, collect)
283283
)
284284

285285
state.delete_windows(
@@ -289,14 +289,14 @@ def process_window(
289289

290290
return reversed(updated_windows), expired_windows
291291

292-
def _expired_windows(self, state, max_expired_window_start, collect):
292+
def _expired_windows(self, key, state, max_expired_window_start, collect):
293293
for window in state.expire_windows(
294294
max_start_time=max_expired_window_start,
295295
delete=False,
296296
collect=collect,
297297
end_inclusive=True,
298298
):
299-
(start, end), (max_timestamp, aggregated), collected, key = window
299+
(start, end), (max_timestamp, aggregated), collected, _ = window
300300
if end == max_timestamp:
301301
yield key, self._results(aggregated, collected, start, end)
302302

quixstreams/dataframe/windows/time_based.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def expire_by_partition(
229229

230230
def expire_by_key(
231231
self,
232-
key: bytes,
232+
key: Any,
233233
state: WindowedState,
234234
max_expired_start: int,
235235
collect: bool,

0 commit comments

Comments
 (0)