-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect SQL statement on "View Query": python-encoded % character (%%) on STR_TO_DATE() #4857
Comments
Symptoms looks very similar to #4830 |
@hajdbo I can take a look at this in the coming days. Just curious, have you run into this on other database types as well? i don't have a MySQL installation readily at hand, but can set one up if needed. Btw, naming a column "date" seems slightly risky, calling it account_date or similar might save trouble down the road. |
Pretty sure this represents the SQL we're sending to the database driver (dbapi) which has its own |
Is this all related to #4098 ? We are hitting similar issues where we have to enter %% as a single % fails when executed. The text we enter must also be utf-8 encoded |
This should be fixed in both master and 0.25 branch, please test and close. Thanks! |
Seems very closely related to #617 |
Fixed with 0.28 release. Thank you! 👍 |
Using Mysql engine, the request displayed when clicking "View Query" shows a python-encoded %: %%
The query should have single % characters, rather than %%.
I followed the trail to get_query_str() in https://github.com/apache/incubator-superset/blob/master/superset/connectors/sqla/models.py#L418
Superset version
0.24.0
Expected results
The query displayed should be syntactically correct, showing a single % for STR_TO_DATE() function.
Actual results
Steps to reproduce
Use a mysql engine, create a slice with time constraits, click the "View Query" button.
The text was updated successfully, but these errors were encountered: