MCPcopy Create free account
hub / github.com/BIT-DataLab/LakeBench / _select

Method _select

join/LSH/datasketch/storage.py:460–482  ·  view source on GitHub ↗

Execute a list of statements and parameters returning data. :param iterable[tuple] statements_and_parameters: list of statements and parameters :rtype: list[Row] :return: the rows matching the queries

(self, statements_and_parameters)

Source from the content-addressed store, hash-verified

458 item = list(itertools.islice(iterator, size))
459
460 def _select(self, statements_and_parameters):
461 """
462 Execute a list of statements and parameters returning data.
463
464 :param iterable[tuple] statements_and_parameters: list of statements and parameters
465 :rtype: list[Row]
466 :return: the rows matching the queries
467 """
468 ret = []
469 size = self.CONCURRENCY
470 for sub_sequence in CassandraClient.split_sequence(statements_and_parameters, size):
471 results = c_concurrent.execute_concurrent(
472 self._session,
473 sub_sequence,
474 concurrency=size,
475 )
476 for result in results:
477 success, rows = result
478 if success:
479 ret.append(rows)
480 else:
481 raise RuntimeError
482 return ret
483
484 def _execute(self, statements_and_parameters):
485 """

Callers 3

collect_select_bufferMethod · 0.95
selectMethod · 0.95
select_countMethod · 0.95

Calls 1

split_sequenceMethod · 0.80

Tested by

no test coverage detected