fix: move driver import to method (#26066)

This commit is contained in:
Rob Moore 2023-11-22 15:49:01 +00:00 committed by GitHub
parent 2b88225ee1
commit 6359086779
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -27,7 +27,6 @@ from flask import current_app
from sqlalchemy.engine.reflection import Inspector from sqlalchemy.engine.reflection import Inspector
from sqlalchemy.engine.url import URL from sqlalchemy.engine.url import URL
from sqlalchemy.orm import Session from sqlalchemy.orm import Session
from trino.sqlalchemy import datatype
from superset.constants import QUERY_CANCEL_KEY, QUERY_EARLY_CANCEL_KEY, USER_AGENT from superset.constants import QUERY_CANCEL_KEY, QUERY_EARLY_CANCEL_KEY, USER_AGENT
from superset.databases.utils import make_url_safe from superset.databases.utils import make_url_safe
@ -351,6 +350,9 @@ class TrinoEngineSpec(PrestoBaseEngineSpec):
the whole string they have to be quoted like "foo"."bar"."baz" and we then the whole string they have to be quoted like "foo"."bar"."baz" and we then
alias them to the full dotted string for ease of reference. alias them to the full dotted string for ease of reference.
""" """
# pylint: disable=import-outside-toplevel
from trino.sqlalchemy import datatype
cols = [col] cols = [col]
col_type = col.get("type") col_type = col.get("type")