feat: initial Dremio sqlglot dialect (#33847)

This commit is contained in:
Beto Dealmeida
2025-06-20 12:05:45 -07:00
committed by GitHub
parent a23a4ed054
commit 404f7c1043
6 changed files with 86 additions and 5 deletions

View File

@@ -87,7 +87,9 @@ class SQLParsingLibraryImportChecker(BaseChecker):
def _is_disallowed(self, file_path: Path, root_mod: str) -> bool:
# True if sqlglot is imported outside superset/sql,
# or if any forbidden library is imported anywhere
in_superset_sql = file_path.match("**/superset/sql/**")
in_superset_sql = file_path.match("**/superset/sql/**/*.py") or file_path.match(
"**/superset/sql/*.py"
)
return (root_mod == "sqlglot" and not in_superset_sql) or root_mod in {
"sqlparse",
"sqloxide",