fix: Ignore USE SQL keyword when determining SELECT statement (#28279)

This commit is contained in:
John Bodley
2024-05-02 11:25:55 -07:00
committed by GitHub
parent 0ce5864fc7
commit 27952e7057
2 changed files with 10 additions and 2 deletions

View File

@@ -1803,6 +1803,9 @@ WITH t AS (
)
SELECT * FROM t"""
).is_select()
assert not ParsedQuery("").is_select()
assert not ParsedQuery("USE foo").is_select()
assert ParsedQuery("USE foo; SELECT * FROM bar").is_select()
def test_sqlquery() -> None: