Skip to content

bug fix earliest/latest for empty streams#64

Merged
jleifnf merged 4 commits intostagingfrom
bug-fix-earliest
Nov 28, 2023
Merged

bug fix earliest/latest for empty streams#64
jleifnf merged 4 commits intostagingfrom
bug-fix-earliest

Conversation

@jleifnf
Copy link
Copy Markdown

@jleifnf jleifnf commented Nov 27, 2023

Bug fix:

TypeError                                 Traceback (most recent call last)
Cell In[39], line 1
----> 1 streamset.earliest()

File /opt/conda/lib/python3.10/site-packages/btrdb/stream.py:1602, in StreamSetBase.earliest(self)
   1597     logger.debug(f"versions: {versions}")
   1598 earliest_points_gen = self._btrdb._executor.map(
   1599     lambda s: s.nearest(start, version=versions.get(s.uuid, 0), backward=False),
   1600     self._streams,
   1601 )
-> 1602 for point, _ in earliest_points_gen:
   1603     earliest.append(point)
   1605 return tuple(earliest)

TypeError: cannot unpack non-iterable NoneType object

and also for latest.

@jleifnf jleifnf marked this pull request as ready for review November 27, 2023 18:38
Copy link
Copy Markdown

@justinGilmer justinGilmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets resolve the behavior we want for the type of object returned when there is no data available for the stream and then this can be merged.

@jleifnf jleifnf requested a review from justinGilmer November 27, 2023 21:43
Copy link
Copy Markdown

@justinGilmer justinGilmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jleifnf jleifnf merged commit 9048df0 into staging Nov 28, 2023
@jleifnf jleifnf deleted the bug-fix-earliest branch November 28, 2023 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants