mirror of
https://github.com/apache/superset.git
synced 2026-04-09 11:25:23 +00:00
* fix: Workaround for sqlparse issue #652 * Update superset/sql_parse.py Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> * Update sql_parse.py Co-authored-by: John Bodley <john.bodley@airbnb.com> Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
This commit is contained in:
@@ -1199,3 +1199,9 @@ def test_validate_filter_clause_comment():
|
||||
def test_validate_filter_clause_subquery_comment():
|
||||
with pytest.raises(QueryClauseValidationException):
|
||||
validate_filter_clause("(1 = 1 -- comment\n)")
|
||||
|
||||
|
||||
def test_sqlparse_issue_652():
|
||||
stmt = sqlparse.parse(r"foo = '\' AND bar = 'baz'")[0]
|
||||
assert len(stmt.tokens) == 5
|
||||
assert str(stmt.tokens[0]) == "foo = '\\'"
|
||||
|
||||
Reference in New Issue
Block a user