fix(sqla): allow series limit without subquery support (#16896)

This commit is contained in:
Ville Brofeldt 2021-09-29 17:30:41 +02:00 committed by GitHub
parent 3f784cc1c7
commit 3272d1c086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1292,8 +1292,8 @@ class SqlaTable(Model, BaseDatasource): # pylint: disable=too-many-public-metho
if row_offset:
qry = qry.offset(row_offset)
if db_engine_spec.allows_subqueries and series_limit and groupby_series_columns:
if db_engine_spec.allows_joins:
if series_limit and groupby_series_columns:
if db_engine_spec.allows_joins and db_engine_spec.allows_subqueries:
# some sql dialects require for order by expressions
# to also be in the select clause -- others, e.g. vertica,
# require a unique inner alias