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

Refactor subquery wrapping pipeline #6

Merged

Conversation

WaVEV
Copy link
Collaborator

@WaVEV WaVEV commented Jan 9, 2025

No description provided.

@WaVEV WaVEV force-pushed the refactor-subquery-wrapping-pipeline branch from e2fda19 to a80f61f Compare January 9, 2025 04:00
@@ -97,6 +131,7 @@ def register_lookups():
field_resolve_expression_parameter
)
In.as_mql = RelatedIn.as_mql = in_
In.get_subquery_wrapping_pipeline = get_subquery_wrapping_pipeline
Copy link
Collaborator Author

@WaVEV WaVEV Jan 9, 2025

Choose a reason for hiding this comment

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

Range does not need this kind of functionality, it is not allowed by Django.
https://github.com/mongodb-forks/django/blob/mongodb-5.0.x/django/db/models/query.py#L1969

]
if wrapping_result_pipeline:
if get_wrapping_pipeline:
wrapping_result_pipeline = get_wrapping_pipeline(
Copy link
Owner

Choose a reason for hiding this comment

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

I think the comment could be included here, rather than redundantly in each get_subquery_wrapping_pipeline(), e.g.

# The results from some lookups must be converted to a list of values.
# The output is compressed with an aggregation pipeline.

@timgraham timgraham merged commit c51c757 into timgraham:arrayfield Jan 9, 2025
6 of 7 checks passed
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.

2 participants