Skip to content
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

feat: Pass through small IN queries to the server. #951

Closed
wants to merge 1 commit into from

Conversation

sorced-jim
Copy link
Contributor

feat: Pass through small IN queries to the server.

@sorced-jim sorced-jim requested review from a team as code owners February 23, 2024 23:54
@product-auto-label product-auto-label bot added the api: datastore Issues related to the googleapis/python-ndb API. label Feb 23, 2024
@sorced-jim sorced-jim added the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 24, 2024
@@ -655,7 +658,8 @@ def __new__(cls, name, opsymbol, value):
return FalseNode()
if len(nodes) == 1:
return nodes[0]
return DisjunctionNode(*nodes)
if len(nodes) > _SERVER_IN_LIMIT:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we document this server limit in the docstring?

never occur since the constructor will create ``OR`` nodes for
``!=`` and ``in``
``!=``.
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like we will still create OR nodes if the list of IN values is >= 31? Or am I misunderstanding?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please take a look at #954 instead. I think this is a better short term improvement.

Copy link
Contributor

@rwhogg rwhogg left a comment

Choose a reason for hiding this comment

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

Left some nitpicky comments, otherwise looks good Python-wise!

@sorced-jim sorced-jim closed this Feb 28, 2024
@sorced-jim sorced-jim deleted the small-in-query branch February 28, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the googleapis/python-ndb API. owlbot:run Add this label to trigger the Owlbot post processor.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants