|
@@ -43,8 +43,7 @@ from beeswax import hive_site
|
|
|
from beeswax.hive_site import hiveserver2_use_ssl
|
|
from beeswax.hive_site import hiveserver2_use_ssl
|
|
|
from beeswax.conf import CONFIG_WHITELIST, LIST_PARTITIONS_LIMIT
|
|
from beeswax.conf import CONFIG_WHITELIST, LIST_PARTITIONS_LIMIT
|
|
|
from beeswax.models import Session, HiveServerQueryHandle, HiveServerQueryHistory, QueryHistory
|
|
from beeswax.models import Session, HiveServerQueryHandle, HiveServerQueryHistory, QueryHistory
|
|
|
-from beeswax.server.dbms import Table, NoSuchObjectException, DataTable,\
|
|
|
|
|
- QueryServerException
|
|
|
|
|
|
|
+from beeswax.server.dbms import Table, DataTable, QueryServerException
|
|
|
|
|
|
|
|
|
|
|
|
|
LOG = logging.getLogger(__name__)
|
|
LOG = logging.getLogger(__name__)
|
|
@@ -61,11 +60,11 @@ class HiveServerTable(Table):
|
|
|
def __init__(self, table_results, table_schema, desc_results, desc_schema):
|
|
def __init__(self, table_results, table_schema, desc_results, desc_schema):
|
|
|
if beeswax_conf.THRIFT_VERSION.get() >= 7:
|
|
if beeswax_conf.THRIFT_VERSION.get() >= 7:
|
|
|
if not table_results.columns:
|
|
if not table_results.columns:
|
|
|
- raise NoSuchObjectException()
|
|
|
|
|
|
|
+ raise QueryServerException('No table columns')
|
|
|
self.table = table_results.columns
|
|
self.table = table_results.columns
|
|
|
else: # Deprecated. To remove in Hue 4.
|
|
else: # Deprecated. To remove in Hue 4.
|
|
|
if not table_results.rows:
|
|
if not table_results.rows:
|
|
|
- raise NoSuchObjectException()
|
|
|
|
|
|
|
+ raise QueryServerException('No table rows')
|
|
|
self.table = table_results.rows and table_results.rows[0] or ''
|
|
self.table = table_results.rows and table_results.rows[0] or ''
|
|
|
|
|
|
|
|
self.table_schema = table_schema
|
|
self.table_schema = table_schema
|