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

ENH Enable allowing collisions for field statements #10957

Merged

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Sep 21, 2023

This one's a bit abstract as its own PR, but it makes sense in conjunction with the unit tests being added to #10943 - specifically the "recursive CTE with extrapolated data" test scenario in DataQueryTest. That test (and indeed that entire query scenario) is not possible without allowing this, or something like this. Note that test uses an old name for the method - I'll update that once this and all other related PRs are merged.

It would probably be better to instead have a "coallesce" method, but the problem with that is we don't have a clean way to define the order of coalescence because a lot of fields aren't added until the query is finalised, so that method would be highly un-intuitive unless we made some breaking changes.

Issue

Copy link
Member

@emteknetnz emteknetnz left a comment

Choose a reason for hiding this comment

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

Code seems fine

Need to do this? Note that test uses an old name for the method - I'll update that once this and all other related PRs are merged.

@GuySartorelli
Copy link
Member Author

GuySartorelli commented Sep 24, 2023

Yes, that does need to be done, and it will be once all of the dependant PRs are merged. Note that the test being referenced there is the test in #10943 - not any tests in this PR.

@emteknetnz emteknetnz merged commit fac3356 into silverstripe:5 Sep 24, 2023
15 checks passed
@emteknetnz emteknetnz deleted the pulls/5/allow-collisions branch September 24, 2023 23:32
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