fix(firestore): preserve async limit_to_last ordering#17879
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request fixes an issue in async_query.py where order.direction was compared directly instead of using its .name attribute. It also updates the corresponding unit test test_asyncquery_get_limit_to_last to be parameterized, verifying the behavior for both ascending and descending directions. There are no review comments, so I have no feedback to provide.
|
Hi @Sanjays2402, Please can you sign the CLA and mark this PR as ready for review once it's done? See #17879 (comment) |
Closes #17767
The async limit-to-last path compared a protobuf direction enum with a string, so ascending queries were never reversed before fetching. Compare the enum name, matching the synchronous query path, and cover both directions.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: