mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
fix: handle comments in has_table_query (#23882)
This commit is contained in:
@@ -509,6 +509,10 @@ def has_table_query(token_list: TokenList) -> bool:
|
||||
"""
|
||||
state = InsertRLSState.SCANNING
|
||||
for token in token_list.tokens:
|
||||
# Ignore comments
|
||||
if isinstance(token, sqlparse.sql.Comment):
|
||||
continue
|
||||
|
||||
# Recurse into child token list
|
||||
if isinstance(token, TokenList) and has_table_query(token):
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user