From 169d6e6804c0e6bbb5f8b2fa4217e659b49a0d9f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 12 May 2023 11:20:52 -0400 Subject: substitute include_table param rather than adding Fixed issue in :func:`_sql.values` construct where an internal compilation error would occur if the construct were used inside of a scalar subquery. Fixes: #9772 Change-Id: I4b0f756977abafbd2aabaaa0064baa875249ebe1 --- lib/sqlalchemy/sql/compiler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 619ff0848..ad686ce27 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -4275,15 +4275,14 @@ class SQLCompiler(Compiled): ) if name: + kw["include_table"] = False v = "%s(%s)%s (%s)" % ( lateral, v, self.get_render_as_alias_suffix(self.preparer.quote(name)), ( ", ".join( - c._compiler_dispatch( - self, include_table=False, **kw - ) + c._compiler_dispatch(self, **kw) for c in element.columns ) ), -- cgit v1.2.1