Weird query generated when using Time Series Line Chart with Group By column
Make sure these boxes are checked before submitting your issue - thank you!
- [x] I have checked the superset logs for python stacktraces and included it here as text if any
- [x] I have reproduced the issue with at least the latest released version of superset
- [x] I have checked the issue tracker for the same issue and I haven't found one similar
Superset version
0.23.0rc2
Expected results
It should generate a normal and efficient SQL query.
Actual results
Weird SQL query syntax, like below one:

Steps to reproduce
Make a Time Series Line Chart and add any Group BY column, then click View Query.
After hours of researching, I found that overriding the default variable values of BaseEngineSpec in db_engine_specs.py may fix this problem.
For example:
class SqliteEngineSpec(BaseEngineSpec):
engine = 'sqlite'
time_secondary_columns = True // add this line
time_groupby_inline = True // and this one too
……
We also observed this issue. Interestingly enough, if you change the 'Series Limit' field from 50 to 0, the SQL syntax will be written normally.
As a short-term solution, we changed the default value for this field to be 0, so our users aren't generating charts with inefficient SQL.
It is the expected query if you want to get the time series for the top N dimension members. I agree the default should be to not apply this