MCPcopy
hub / github.com/apache/superset / is_valid_ctas

Method is_valid_ctas

superset/sql_parse.py:138–140  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

136 return parsed[0].get_type() == "SELECT"
137
138 def is_valid_ctas(self) -> bool:
139 parsed = sqlparse.parse(self.strip_comments())
140 return parsed[-1].get_type() == "SELECT"
141
142 def is_valid_cvas(self) -> bool:
143 parsed = sqlparse.parse(self.strip_comments())

Callers 3

execute_sql_statementsFunction · 0.95
test_is_valid_ctasMethod · 0.95
test_is_valid_cvasMethod · 0.95

Calls 1

strip_commentsMethod · 0.95

Tested by 2

test_is_valid_ctasMethod · 0.76
test_is_valid_cvasMethod · 0.76