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

Method execute_query

shell/impala_shell/impala_client.py:1349–1359  ·  view source on GitHub ↗

Execute the query 'query_str' asynchronously on the server with options dictionary 'set_query_options' and return a query handle that can be used for subsequent ImpalaClient method calls for the query.

(self, query_str, set_query_options)

Source from the content-addressed store, hash-verified

1347 return query
1348
1349 def execute_query(self, query_str, set_query_options):
1350 """Execute the query 'query_str' asynchronously on the server with options dictionary
1351 'set_query_options' and return a query handle that can be used for subsequent
1352 ImpalaClient method calls for the query."""
1353 query = self._create_query_req(query_str, set_query_options)
1354 self.is_query_cancelled = False
1355 handle, rpc_status = self._do_beeswax_rpc(lambda: self.imp_service.query(query))
1356 if rpc_status != RpcStatus.OK:
1357 raise RPCException("Error executing the query")
1358 handle.is_closed = False
1359 return handle
1360
1361 def get_query_id_str(self, last_query_handle):
1362 return last_query_handle.id

Callers

nothing calls this directly

Calls 4

_create_query_reqMethod · 0.95
_do_beeswax_rpcMethod · 0.95
RPCExceptionClass · 0.90
queryMethod · 0.80

Tested by

no test coverage detected