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

Improve usage experience of AggregationExpression factories #4474

Open
mp911de opened this issue Aug 17, 2023 · 0 comments
Open

Improve usage experience of AggregationExpression factories #4474

mp911de opened this issue Aug 17, 2023 · 0 comments
Labels
type: enhancement A general enhancement

Comments

@mp911de
Copy link
Member

mp911de commented Aug 17, 2023

SetOperators, DateOperators and other factories to create aggregation expressions accept either String field references or AggregationExpressions.

With the evolution of AggregationVariable, that is a Field, calling code has to unwrap the variable target:

SetUnion.arrayAsSet(Variable.VALUE.getTarget()).union(Variable.THIS.getTarget())

It would be much nicer to drop getTarget and simply use Variable.VALUE/Variable.THIS:

SetUnion.arrayAsSet(Variable.VALUE).union(Variable.THIS)

One approach to achieve this could be accepting Field/Field... in places where we accept a String field reference.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 17, 2023
@mp911de mp911de added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 28, 2023
sxhinzvc added a commit that referenced this issue Sep 7, 2023
Closes #4474
Original Pull Request: #4496
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants