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

Method select_count

join/LSH/datasketch/storage.py:668–684  ·  view source on GitHub ↗

Count the values for each of the provided keys. :param iterable[byte|str] keys: list of keys :rtype: dict[byte|str,int] :return: the number of values per key

(self, keys)

Source from the content-addressed store, hash-verified

666 }
667
668 def select_count(self, keys):
669 """
670 Count the values for each of the provided keys.
671
672 :param iterable[byte|str] keys: list of keys
673 :rtype: dict[byte|str,int]
674 :return: the number of values per key
675 """
676 statements_and_parameters = [
677 (self._stmt_get_count, (self._key_encoder(key), ))
678 for key in keys
679 ]
680 return {
681 self._key_decoder(row.key): row.count
682 for rows in self._select(statements_and_parameters)
683 for row in rows
684 }
685
686 def one(self, key):
687 """

Callers 1

itemcountsMethod · 0.80

Calls 1

_selectMethod · 0.95

Tested by

no test coverage detected