diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-10-05 18:27:44 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-10-07 11:26:10 -0400 |
commit | e0396633e72bc09bd7cec715101d516ea87fa840 (patch) | |
tree | 9486b4566942af674e669eddc38c14bee1e2ecfd /lib/sqlalchemy/dialects/sqlite/pysqlite.py | |
parent | c6abd4766abb0396c9bf532d81d16226b970a35a (diff) | |
download | sqlalchemy-e0396633e72bc09bd7cec715101d516ea87fa840.tar.gz |
create second level deduping when use_labels is turned on
As of #4753 we allow duplicate columns. This creates some new
problems that there can be duplicate columns in a subquery
which are then not addressible on the outside because they
are ambiguous (Postgresql has this behavior at least). Additionally
it creates situations where we are making an anon label of an
anon label which is leaking into the query.
New logic for generating anon labels handles this situation and
also alters the .c collection
of a subquery such that we are only getting the first column
from the derived selectable that has that name, the subsequent ones
have a new deduping label with two underscores and are not exposed
in .c. The dedupe logic when rendering the columns will handle
duplicate label names for different columns, vs. the same column
repeated, as separate cases.
Fixes: #4892
Change-Id: I929fbd8da14bcc239e0481c24bbd9b5ce826e8fa
Diffstat (limited to 'lib/sqlalchemy/dialects/sqlite/pysqlite.py')
0 files changed, 0 insertions, 0 deletions