mirror of
https://github.com/apache/superset.git
synced 2026-04-21 00:54:44 +00:00
[sqlparse] Fixing table name extraction for ill-defined query (#7029)
This commit is contained in:
@@ -47,6 +47,11 @@ class SupersetTestCase(unittest.TestCase):
|
||||
{'schemaname.tbname'},
|
||||
self.extract_tables('SELECT * FROM schemaname.tbname'))
|
||||
|
||||
# Ill-defined schema/table.
|
||||
self.assertEquals(
|
||||
set(),
|
||||
self.extract_tables('SELECT * FROM schemaname.'))
|
||||
|
||||
# quotes
|
||||
query = 'SELECT field1, field2 FROM tb_name'
|
||||
self.assertEquals({'tb_name'}, self.extract_tables(query))
|
||||
|
||||
Reference in New Issue
Block a user