superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: Late import for optional lib pyhive (#7471)
Date Wed, 08 May 2019 00:16:41 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new e2be022  Late import for optional lib pyhive (#7471)
e2be022 is described below

commit e2be0221b70a946ec9498db89fcbbaeecf1ca5d0
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Tue May 7 19:16:27 2019 -0500

    Late import for optional lib pyhive (#7471)
    
    * Late import for optional lib pyhive
    
    * fix
---
 superset/sql_validators/presto_db.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/superset/sql_validators/presto_db.py b/superset/sql_validators/presto_db.py
index 87c2d8e..8f2be43 100644
--- a/superset/sql_validators/presto_db.py
+++ b/superset/sql_validators/presto_db.py
@@ -26,7 +26,6 @@ from typing import (
 )
 
 from flask import g
-from pyhive.exc import DatabaseError
 
 from superset import app, security_manager
 from superset.sql_parse import ParsedQuery
@@ -77,6 +76,7 @@ class PrestoDBSQLValidator(BaseSQLValidator):
         # 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()


Mime
View raw message