Explorar o código

[notebook] Rename has_more in multiqueries to has_more_statements

Romain Rigaux %!s(int64=10) %!d(string=hai) anos
pai
achega
35a9a80

+ 3 - 3
desktop/libs/notebook/src/notebook/connectors/hiveserver2.py

@@ -60,7 +60,7 @@ class HS2Api(Api):
   def _get_handle(self, snippet):
     snippet['result']['handle']['secret'], snippet['result']['handle']['guid'] = HiveServerQueryHandle.get_decoded(snippet['result']['handle']['secret'], snippet['result']['handle']['guid'])
     snippet['result']['handle'].pop('statement_id')
-    snippet['result']['handle'].pop('has_more')
+    snippet['result']['handle'].pop('has_more_statements')
     return HiveServerQueryHandle(**snippet['result']['handle'])
 
   def _get_db(self, snippet):
@@ -78,7 +78,7 @@ class HS2Api(Api):
 
     # Multiquery, if not first statement or arrived to the last query
     statement_id = snippet['result']['handle'].get('statement_id', 0)
-    if snippet['result']['handle'].get('has_more'):
+    if snippet['result']['handle'].get('has_more_statements'):
       try:
         handle = self._get_handle(snippet)
         db.close_operation(handle) # Close all the time past multi queries
@@ -108,7 +108,7 @@ class HS2Api(Api):
         'modified_row_count': handle.modified_row_count,
         'log_context': handle.log_context,
         'statement_id': statement_id,
-        'has_more': statement_id < len(statements) - 1
+        'has_more_statements': statement_id < len(statements) - 1
     }
 
   def _get_statements(self, hql_query):

+ 2 - 2
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -474,7 +474,7 @@
 
     self.reexecute = function () {
       self.result.handle()['statement_id'] = 0;
-      self.result.handle()['has_more'] = false;
+      self.result.handle()['has_more_statements'] = false;
 
       self.execute();
     };
@@ -570,7 +570,7 @@
             self.progress(100);
             if (self.isSqlDialect() && ! self.result.handle().has_result_set) { // DDL
               huePubSub.publish('assist.refresh');
-              if (self.result.handle().has_more) {
+              if (self.result.handle().has_more_statements) {
                 setTimeout(function () {
                   self.execute(); // Execute next, need to wait as we disabled fast click
                 }, 1000);