]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
TableValuedAlias generation fixes
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 3 Apr 2022 15:28:57 +0000 (11:28 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 3 Apr 2022 15:30:09 +0000 (11:30 -0400)
commitc315c7401a2aa00a8a0fa0f7d4189a9976fd7962
tree0a4b5c4195d15d1e7294cc39589060660f1d5930
parent1dffb7cedeb009ca6c532db558bd0588dd846957
TableValuedAlias generation fixes

Fixed bug in newly implemented
:paramref:`.FunctionElement.table_valued.joins_implicitly` feature where
the parameter would not automatically propagate from the original
:class:`.TableValuedAlias` object to the secondary object produced when
calling upon :meth:`.TableValuedAlias.render_derived` or
:meth:`.TableValuedAlias.alias`.

Additionally repaired these issues in :class:`.TableValuedAlias`:

* repaired a potential memory issue which could occur when
repeatedly calling :meth:`.TableValuedAlias.render_derived` against
successive copies of the same object (for .alias(), we currently
have to still continue chaining from the previous element.  not sure
if this can be improved but this is standard behavior for .alias()
elsewhere)
* repaired issue where the individual element types would be lost when
calling upon :meth:`.TableValuedAlias.render_derived` or
:meth:`.TableValuedAlias.alias`.

Fixes: #7890
Change-Id: Ie5120c7ff1e5c1bba5aaf77c782a51c637860208
doc/build/changelog/unreleased_14/7890.rst [new file with mode: 0644]
lib/sqlalchemy/sql/selectable.py
test/aaa_profiling/test_memusage.py
test/sql/test_from_linter.py
test/sql/test_functions.py