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

Function __assert_query_exec_attrs

tests/util/otel_trace.py:785–802  ·  view source on GitHub ↗

Helper function that asserts the common and span-specific attributes in the query execution span.

(spans, query_profile, root_span_id, query_id,
    err_msg, status, log_file_path)

Source from the content-addressed store, hash-verified

783
784
785def __assert_query_exec_attrs(spans, query_profile, root_span_id, query_id,
786 err_msg, status, log_file_path):
787 """
788 Helper function that asserts the common and span-specific attributes in the
789 query execution span.
790 """
791
792 query_exec_span = __find_span(spans, "QueryExecution", query_id)
793 __assert_scopespan_common(query_exec_span, query_id, False, "QueryExecution", 3, status,
794 log_file_path, root_span_id, err_msg)
795 __assert_attr(query_exec_span.name, query_exec_span.attributes, "NumModifiedRows",
796 parse_num_modified_rows(query_profile), "intValue")
797 __assert_attr(query_exec_span.name, query_exec_span.attributes, "NumDeletedRows",
798 parse_num_deleted_rows(query_profile), "intValue")
799 __assert_attr(query_exec_span.name, query_exec_span.attributes, "NumRowsFetched",
800 parse_num_rows_fetched(query_profile), "intValue")
801
802 # TODO: IMPALA-14334 - Assert QueryExecution span events
803
804
805def __assert_close_attrs(spans, root_span_id, query_id, err_msg, status, async_close,

Callers 1

assert_traceFunction · 0.85

Calls 6

parse_num_modified_rowsFunction · 0.90
parse_num_deleted_rowsFunction · 0.90
parse_num_rows_fetchedFunction · 0.90
__find_spanFunction · 0.85
__assert_attrFunction · 0.85

Tested by

no test coverage detected