Skip to content

Commit

Permalink
Late import for optional lib pyhive (#7471)
Browse files Browse the repository at this point in the history
* Late import for optional lib pyhive

* fix
  • Loading branch information
mistercrunch authored May 8, 2019
1 parent f3d8e8a commit e2be022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/sql_validators/presto_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
)

from flask import g
from pyhive.exc import DatabaseError

from superset import app, security_manager
from superset.sql_parse import ParsedQuery
Expand Down Expand Up @@ -77,6 +76,7 @@ def validate_statement(
# engine spec's handle_cursor implementation since we don't record
# these EXPLAIN queries done in validation as proper Query objects
# in the superset ORM.
from pyhive.exc import DatabaseError
try:
db_engine_spec.execute(cursor, sql)
polled = cursor.poll()
Expand Down

0 comments on commit e2be022

Please sign in to comment.