Browse Source

[impala] Fix backward compatibility with no start_over support

Add some padding in navigator as the scroll bar hides the icon.
Romain Rigaux 11 năm trước cách đây
mục cha
commit
a1aa5c1

+ 1 - 1
apps/beeswax/src/beeswax/server/dbms.py

@@ -160,7 +160,7 @@ class HiveServer2Dbms(object):
       handle = self.execute_and_wait(query, timeout_sec=5.0)
 
       if handle:
-        result = self.fetch(handle)
+        result = self.fetch(handle, rows=100)
         self.close(handle)
         return result
 

+ 1 - 1
apps/beeswax/src/beeswax/server/hive_server2_lib.py

@@ -688,7 +688,7 @@ class HiveServerClientCompatible(object):
     if max_rows is None:
       max_rows = 1000
 
-    if start_over:
+    if start_over and not (self.query_server['server_name'] == 'impala' and self.query_server['querycache_rows'] == 0): # Backward compatibility for impala
       orientation = TFetchOrientation.FETCH_FIRST
     else:
       orientation = TFetchOrientation.FETCH_NEXT

+ 1 - 1
apps/beeswax/src/beeswax/templates/execute.mako

@@ -1037,7 +1037,7 @@ $(document).ready(function () {
           % if has_metastore:
             _metastoreLink = "<i class='fa fa-eye' title='" + "${ _('View in Metastore Browser') }" + "'></i>";
           % endif
-          _table.html("<a href='javascript:void(0)' class='pull-right'><i class='fa fa-list' title='" + "${ _('Preview Sample data') }" + "' style='margin-left:5px'></i></a><a href='/metastore/table/" + viewModel.database() + "/" + table + "' target='_blank' class='pull-right hide'>" + _metastoreLink + "</a><div><a href='javascript:void(0)' title='" + table + "'><i class='fa fa-table'></i> " + table + "</a><ul class='unstyled'></ul></div>");
+          _table.html("<a href='javascript:void(0)' class='pull-right' style='padding-right:5px'><i class='fa fa-list' title='" + "${ _('Preview Sample data') }" + "' style='margin-left:5px'></i></a><a href='/metastore/table/" + viewModel.database() + "/" + table + "' target='_blank' class='pull-right hide'>" + _metastoreLink + "</a><div><a href='javascript:void(0)' title='" + table + "'><i class='fa fa-table'></i> " + table + "</a><ul class='unstyled'></ul></div>");
 
           _table.data("table", table).attr("id", "navigatorTables_" + table);
           _table.find("a:eq(2)").on("click", function () {