]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
deep compare CTEs before considering them conflicting
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 5 Aug 2022 21:25:05 +0000 (17:25 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 5 Aug 2022 21:26:00 +0000 (17:26 -0400)
commit85fa363c846f4ed287565c43c32e2cca29470e25
tree21205f1e8e2064f4527b81adb402ddd9c0e20d38
parentf08576274417bb1a836c072ff240bd5ad2ab40b7
deep compare CTEs before considering them conflicting

Fixed issue where referencing a CTE multiple times in conjunction with a
polymorphic SELECT could result in multiple "clones" of the same CTE being
constructed, which would then trigger these two CTEs as duplicates. To
resolve, the two CTEs are deep-compared when this occurs to ensure that
they are equivalent, then are treated as equivalent.

Fixes: #8357
Change-Id: I1f634a9cf7a6c4256912aac1a00506aecea3b0e2
doc/build/changelog/unreleased_14/8357.rst [new file with mode: 0644]
lib/sqlalchemy/sql/compiler.py
test/orm/inheritance/test_polymorphic_rel.py
test/sql/test_cte.py