This is an automated email from the ASF dual-hosted git repository.

sfirke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 6359086779 fix: move driver import to method (#26066)
6359086779 is described below

commit 63590867792a85a6e86eefaae7f6de89eb94c0b3
Author: Rob Moore <[email protected]>
AuthorDate: Wed Nov 22 15:49:01 2023 +0000

    fix: move driver import to method (#26066)
---
 superset/db_engine_specs/trino.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/superset/db_engine_specs/trino.py 
b/superset/db_engine_specs/trino.py
index d1c8e20bea..6e56dbfa24 100644
--- a/superset/db_engine_specs/trino.py
+++ b/superset/db_engine_specs/trino.py
@@ -27,7 +27,6 @@ from flask import current_app
 from sqlalchemy.engine.reflection import Inspector
 from sqlalchemy.engine.url import URL
 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.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
         alias them to the full dotted string for ease of reference.
         """
+        # pylint: disable=import-outside-toplevel
+        from trino.sqlalchemy import datatype
+
         cols = [col]
         col_type = col.get("type")
 

Reply via email to