]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Invoke column_expression() for subsequent SELECTs in CompoundSelect
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 29 Jul 2019 18:49:22 +0000 (14:49 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 29 Jul 2019 18:52:40 +0000 (14:52 -0400)
commit2ce8a04e726daecbf060684dcee7559634506700
treea226c22b20772a9f1cdfa4b662e9f9ea742ab9fd
parentaef6e625ba5799bf5935ba3acbb62a37c9e577ca
Invoke column_expression() for subsequent SELECTs in CompoundSelect

Fixed bug where :meth:`.TypeEngine.column_expression` method would not be
applied to subsequent SELECT statements inside of a UNION or other
:class:`.CompoundSelect`, even though the SELECT statements are rendered at
the topmost level of the statement.   New logic now differentiates between
rendering the column expression, which is needed for all SELECTs in the
list, vs. gathering the returned data type for the result row, which is
needed only for the first SELECT.

Fixes: #4787
Change-Id: Iceb63e430e76d2365649aa25ead09c4e2a062e10
doc/build/changelog/unreleased_13/4787.rst [new file with mode: 0644]
lib/sqlalchemy/sql/compiler.py
test/sql/test_type_expressions.py