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

Function parse_jdbc_query_results

tests/performance/query_exec_functions.py:195–210  ·  view source on GitHub ↗

Parse query execution results for the Impala JDBC client Parses the query execution details (avg time, stddev) from the output of the Impala JDBC test client.

(stdout, query)

Source from the content-addressed store, hash-verified

193
194
195def parse_jdbc_query_results(stdout, query):
196 """
197 Parse query execution results for the Impala JDBC client
198
199 Parses the query execution details (avg time, stddev) from the output of the Impala
200 JDBC test client.
201 """
202 jdbc_result_regex = r'row\(s\) in (\d*).(\d*)s'
203 time_taken = 0.0
204 for line in stdout.split('\n'):
205 match = re.search(jdbc_result_regex, line)
206 if match:
207 time_taken = float(('%s.%s') % (match.group(1), match.group(2)))
208 break
209 result_data = re.findall(r'\[START\]----\n(.*?)\n----\[END\]', stdout, re.DOTALL)[0]
210 return create_exec_result(time_taken, result_data, query)
211
212
213def create_exec_result(time_taken, result_data, query):

Callers 1

Calls 2

create_exec_resultFunction · 0.85
searchMethod · 0.45

Tested by

no test coverage detected