Skip to content

Default to distinct union queries#6439

Merged
derrabus merged 1 commit intodoctrine:4.1.xfrom
derrabus:improvement/default-union
Jun 18, 2024
Merged

Default to distinct union queries#6439
derrabus merged 1 commit intodoctrine:4.1.xfrom
derrabus:improvement/default-union

Conversation

@derrabus
Copy link
Copy Markdown
Member

Q A
Type improvement
Fixed issues Follows #6369

Summary

I think that people usually want to have a distinct union, if they build a union query. This would also be in line with SQL where a UNION without any additional keywords would produce a distinct union.

cc @sbuerk

Copy link
Copy Markdown
Contributor

@sbuerk sbuerk left a comment

Choose a reason for hiding this comment

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

Using the distinct as default is fine for me. Make sense following your statement @derrabus . Thanks for the followup ❤️

@derrabus derrabus merged commit 9cc0c0c into doctrine:4.1.x Jun 18, 2024
@derrabus derrabus deleted the improvement/default-union branch June 18, 2024 12:02
derrabus added a commit to derrabus/dbal that referenced this pull request Jun 19, 2024
* 4.1.x: (25 commits)
  Simplify signature of fetchTableOptionsByTable
  Add MariaDb1010Platform for fetchTableOptionsByTable
  PHPUnit 10.5.21 (doctrine#6447)
  Move schema split for SQLite CREATE INDEX only (doctrine#6352)
  PHPStan 1.11.5 (doctrine#6446)
  Default to distinct union queries (doctrine#6439)
  Revert "Merge pull request doctrine#6413 from achterin/bugfix/foreign_key_name_change_detection"
  Add `QueryBuilder` support for `UNION` clause (doctrine#6369)
  CI: Update MariaDB versions (doctrine#6426)
  CI MariaDB: add 11.4, remove 11.0 (doctrine#6432)
  Display warnings when running PHPUnit in CI (doctrine#6431)
  Fix typo in the portability documentation (doctrine#6430)
  Fix MariaDB fetching of default table character-set (doctrine#6361) (doctrine#6425)
  Fix the portability documentation (doctrine#6429)
  Update tests/Platforms/AbstractPlatformTestCase.php
  Update tests/Platforms/AbstractPlatformTestCase.php
  add test
  Fix: Skip type comparison if disableTypeComments is true
  Remove redundant variable (doctrine#6326)
  Fix test names to reflect their actual purpose
  ...
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants