fix(sql): unable to filter text with quotes (#17881)

This commit is contained in:
Stephen Liu
2022-01-28 21:49:22 +08:00
committed by GitHub
parent 1f6f3d7d06
commit 9671384efe
5 changed files with 116 additions and 62 deletions

View File

@@ -380,7 +380,7 @@ class TestQueryContext(SupersetTestCase):
assert re.search(r'[`"\[]?num[`"\]]? IS NOT NULL', sql_text)
assert re.search(
r"""NOT \([`"\[]?name[`"\]]? IS NULL[\s\n]* """
r"""OR [`"\[]?name[`"\]]? IN \('abc'\)\)""",
r"""OR [`"\[]?name[`"\]]? IN \('"abc"'\)\)""",
sql_text,
)