Pārlūkot izejas kodu

[hive] Close previous query when doing multi-query

Before only the very last one was closed.
Romain Rigaux 10 gadi atpakaļ
vecāks
revīzija
77b84c1
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      apps/beeswax/src/beeswax/api.py

+ 1 - 0
apps/beeswax/src/beeswax/api.py

@@ -196,6 +196,7 @@ def watch_query_refresh_json(request, id):
   # Go to next statement if asked to continue or when a statement with no dataset finished.
   try:
     if request.POST.get('next') or (not query_history.is_finished() and query_history.is_success() and not query_history.has_results):
+      close_operation(request, id)
       query_history = db.execute_next_statement(query_history, request.POST.get('query-query'))
       handle, state = _get_query_handle_and_state(query_history)
   except QueryServerException, ex: