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

Method select

join/LSH/datasketch/storage.py:647–666  ·  view source on GitHub ↗

Select all values for the given keys. :param iterable[byte|str] keys: the keys :rtype: dict[byte|str,list[byte|str] :return: a dictionary of lists

(self, keys)

Source from the content-addressed store, hash-verified

645 ]
646
647 def select(self, keys):
648 """
649 Select all values for the given keys.
650
651 :param iterable[byte|str] keys: the keys
652 :rtype: dict[byte|str,list[byte|str]
653 :return: a dictionary of lists
654 """
655 statements_and_parameters = [
656 (self._stmt_get, (self._key_encoder(key), ))
657 for key in keys
658 ]
659 ret = collections.defaultdict(list)
660 for rows in self._select(statements_and_parameters):
661 for row in rows:
662 ret[self._key_decoder(row.key)].append((self._val_decoder(row.value), row.ts))
663 return {
664 k: [x[0] for x in sorted(v, key=operator.itemgetter(1))]
665 for k, v in ret.items()
666 }
667
668 def select_count(self, keys):
669 """

Callers 6

get_countsMethod · 0.80
get_tablesMethod · 0.80
read_tableMethod · 0.80
bootstrap_index_setsFunction · 0.80
getMethod · 0.80
getmanyMethod · 0.80

Calls 1

_selectMethod · 0.95

Tested by

no test coverage detected