You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/11/10 08:50:00 UTC
[jira] [Work logged] (COLLECTIONS-830) Add isEmpty() method to Hasher
[ https://issues.apache.org/jira/browse/COLLECTIONS-830?focusedWorklogId=824851&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-824851 ]
ASF GitHub Bot logged work on COLLECTIONS-830:
----------------------------------------------
Author: ASF GitHub Bot
Created on: 10/Nov/22 08:49
Start Date: 10/Nov/22 08:49
Worklog Time Spent: 10m
Work Description: Claudenw commented on PR #357:
URL: https://github.com/apache/commons-collections/pull/357#issuecomment-1309958426
Perhaps the HasherCollection does not belong in the library. It may make more sense to withdraw this pull request, close the COLLECTIONS-830 as won't fix and create another pull request to remove the HasherCollection. I know there were other issues that @aherbert had with that implementation anyway.
Issue Time Tracking
-------------------
Worklog Id: (was: 824851)
Remaining Estimate: 0h
Time Spent: 10m
> Add isEmpty() method to Hasher
> ------------------------------
>
> Key: COLLECTIONS-830
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-830
> Project: Commons Collections
> Issue Type: Improvement
> Components: Collection
> Affects Versions: 4.5
> Reporter: Claude Warren
> Assignee: Claude Warren
> Priority: Minor
> Labels: bloom-filter
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The Hasher interface in the {{bloomfilter}} package does not have a way to determine if the hasher is empty. For the {{SimpleHasher}} implementation that is not an issue, however, the {{HasherCollection}} can be empty, and there is no guarantee that any other implementation of Hasher may have an empty state.
> I have a use case where a {{Hasher}} is passed to a search method in a multidimensional Bloom filter. If the hasher is empty then we are doing the equivalent of a table scan in a database.
> It is possible to determine if the hasher is not empty by something like
> {quote}{{boolean[] notEmpty = boolean[1];}}
> hasher.indices( shape ).forEachIndex( i ->\{notEmpty[0]=true;return false;});
> {quote}
> And then checking notEmpty[0].
--
This message was sent by Atlassian Jira
(v8.20.10#820010)