mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
Late import for optional lib pyhive (#7471)
* Late import for optional lib pyhive * fix
This commit is contained in:
committed by
GitHub
parent
f3d8e8a424
commit
e2be0221b7
@@ -26,7 +26,6 @@ from typing import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
from flask import g
|
from flask import g
|
||||||
from pyhive.exc import DatabaseError
|
|
||||||
|
|
||||||
from superset import app, security_manager
|
from superset import app, security_manager
|
||||||
from superset.sql_parse import ParsedQuery
|
from superset.sql_parse import ParsedQuery
|
||||||
@@ -77,6 +76,7 @@ class PrestoDBSQLValidator(BaseSQLValidator):
|
|||||||
# engine spec's handle_cursor implementation since we don't record
|
# engine spec's handle_cursor implementation since we don't record
|
||||||
# these EXPLAIN queries done in validation as proper Query objects
|
# these EXPLAIN queries done in validation as proper Query objects
|
||||||
# in the superset ORM.
|
# in the superset ORM.
|
||||||
|
from pyhive.exc import DatabaseError
|
||||||
try:
|
try:
|
||||||
db_engine_spec.execute(cursor, sql)
|
db_engine_spec.execute(cursor, sql)
|
||||||
polled = cursor.poll()
|
polled = cursor.poll()
|
||||||
|
|||||||
Reference in New Issue
Block a user