MCPcopy Create free account
hub / github.com/apache/impala / test_exec_summary

Method test_exec_summary

tests/query_test/test_observability.py:404–428  ·  view source on GitHub ↗

Test that the exec summary is populated correctly in every query state

(self)

Source from the content-addressed store, hash-verified

402 assert re.search(r'\n\s+OrderBy Columns:\s+(.*?)\n', result.runtime_profile) is None
403
404 def test_exec_summary(self):
405 """Test that the exec summary is populated correctly in every query state"""
406 query = "select count(*) from functional.alltypes"
407 handle = self.execute_query_async(query,
408 {"debug_action": "AC_BEFORE_ADMISSION:SLEEP@1000"})
409 # If ExecuteStatement() has completed and the query is paused in the admission control
410 # phase, then the coordinator has not started yet and exec_summary should be empty.
411 exec_summary = self.client.get_exec_summary(handle)
412 assert exec_summary is not None and exec_summary.nodes is None
413 # After completion of the admission control phase, the coordinator would have started
414 # and we should get a populated exec_summary.
415 self.client.wait_for_admission_control(handle)
416 exec_summary = self.client.get_exec_summary(handle)
417 assert exec_summary is not None and exec_summary.nodes is not None
418
419 self.client.fetch(query, handle)
420 exec_summary = self.client.get_exec_summary(handle)
421 # After fetching the results and reaching finished state, we should still be able to
422 # fetch an exec_summary.
423 assert exec_summary is not None and exec_summary.nodes is not None
424 # Verify the query is complete.
425 assert exec_summary.progress.num_completed_scan_ranges == \
426 exec_summary.progress.total_scan_ranges
427 assert exec_summary.progress.num_completed_fragment_instances == \
428 exec_summary.progress.total_fragment_instances
429
430 def test_exec_summary_in_runtime_profile(self):
431 """Test that the exec summary is populated in runtime profile correctly in every

Callers

nothing calls this directly

Calls 4

execute_query_asyncMethod · 0.45
get_exec_summaryMethod · 0.45
fetchMethod · 0.45

Tested by

no test coverage detected