[sql lab] fix Hive 'Transport' not open issue (#5494)

This commit is contained in:
Maxime Beauchemin 2018-07-26 15:18:49 -07:00 committed by GitHub
parent 41286b7545
commit e22fcb9abf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,7 +191,7 @@ def execute_sql(
return handle_error(db_engine_spec.extract_error_message(e))
logging.info('Fetching cursor description')
cursor_description = cursor.description
if conn is not None:
conn.commit()
conn.close()
@ -199,7 +199,7 @@ def execute_sql(
if query.status == utils.QueryStatus.STOPPED:
return handle_error('The query has been stopped')
cdf = dataframe.SupersetDataFrame(data, cursor.description, db_engine_spec)
cdf = dataframe.SupersetDataFrame(data, cursor_description, db_engine_spec)
query.rows = cdf.size
query.progress = 100