-
Notifications
You must be signed in to change notification settings - Fork 26
RDBC-670 Streaming #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RDBC-670 Streaming #238
Conversation
Please run |
class Users_ByName(AbstractIndexCreationTask): | ||
def __init__(self): | ||
super(Users_ByName, self).__init__() | ||
self.map = "from u in docs.Users select new { u.name, lastName = u.lastName.Boost(10) }" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't be "last_name"?
|
||
with self.store.open_session() as session: | ||
query = session.query_index_type(Users_ByName, User) | ||
stream, stats = session.advanced.stream_with_statistics(query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usually we take stats callback as a second argument in "statistics" method - here
def statistics(self, stats_callback: Callable[[QueryStatistics], None]) -> DocumentQuery[_T]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we do the same here?
let's address those comments, and fix your added tests. you can unittest.skip the one with 3!=5 for now, but the rest should be passing, so we're green again |
with self.store.open_session() as session: | ||
|
||
def __stats_callback(statistics: StreamQueryStatistics): | ||
self.assertEqual("Users/ByName", statistics.index_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, check if the program runs this code
e.g. set flag callback_ran
to True
at the end of the callback and check at the end of the test if the callback_ran
is True, not False
c49402d
to
9461af4
Compare
https://issues.hibernatingrhinos.com/issue/RDBC-670
Rebased changes from #168
Fixed issue with duplicated constants files (ravendb/constants.py and ravendb/primitives/constants.py).
Fixed minor issues with class members names and imports.
Made sure tests related to streaming pass.