If the virtual (SQL) dataset contains the comment --SELECT in the clause select is not possible to synchronize the columns.
How to reproduce the bug
- Go to 'Edit Dataset'
- Modify the query SQL on the virtual (SQL)
SELECT
issues.id
--SELECT
FROM issues
- Save
- Return on 'Edit Dataset' > 'Columns'
- Click 'Sync columns from source
- See error:
(1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT\nFROM issues\nLIMIT 1' at line 3")
Expected results
Columns must synchronize without error
what actually happens.
Environment
- superset version:
2.1.1
- official Docker image:
apache/superset:2.1.1