Skip to content

DATAMONGO-3587 - Support Evaluation Query Operators $expr. #3823

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

Closed
wants to merge 25 commits into from

Conversation

divyajnu08
Copy link
Contributor

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 14, 2021
@mp911de
Copy link
Member

mp911de commented Sep 16, 2021

Care to rebase your pull request? There are several commits that do not belong into this PR.

@divyajnu08
Copy link
Contributor Author

divyajnu08 commented Sep 16, 2021

Hi Mark

The changes I made in MatchOperation were since I thought the now we can create a Criteria using the expression Criteria.expr(AggregationExpression) that can be passed to match operation existing constructor to create the match operation.
So there is no need to explicitly add an expression field in the MatchOperation class for "$expr" operator( which I changed for issue#3790 ) since it can be done with criteria itself. So I made the changes. I have removed those and now only changes related to Criteria class are there.

Thanks

@divyajnu08 divyajnu08 closed this Nov 24, 2021
@divyajnu08
Copy link
Contributor Author

Accidently it got deleted. Please find the PR for this.

@divyajnu08 divyajnu08 reopened this Dec 1, 2021
@christophstrobl
Copy link
Member

Thanks for taking the time to craft the PR and sorry for long radio silence. Unfortunately the expression gets evaluated right away without considering the context the query may be run in. This leads to invalid field references, because the QueryMapper considers values prefixed with $ keywords and will simply go over them.
I'll close this one in favor of #4316

@christophstrobl christophstrobl added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants