Re: [collections] BloomFilterExtractor.flatten()

2024-11-03 Thread Gary Gregory
On Sun, Nov 3, 2024 at 4:05 AM Claude Warren wrote: > I believe I answered this elsewhere but just for clarity in the archive. > > I believe the MultidimensionalBloomFilters add a new level of complexity > that we do not want to address at this time. I also believe that > MultidimensionalBloomFi

Re: [collections] BloomFilterExtractor.flatten()

2024-11-03 Thread Claude Warren
I believe I answered this elsewhere but just for clarity in the archive. I believe the MultidimensionalBloomFilters add a new level of complexity that we do not want to address at this time. I also believe that MultidimensionalBloomFilters will not break binary compatibility. They should extend

Re: [collections] BloomFilterExtractor.flatten()

2024-10-06 Thread Gary Gregory
Thank you Claude, the git master code now throws instead of returning null. We can delay MultidimensionalBloomFilter unless introducing it later would break binary compatibility. How beneficial would introducing this interface for users? Gary On Sun, Oct 6, 2024, 10:58 AM Claude Warren wrote:

Re: [collections] BloomFilterExtractor.flatten()

2024-10-06 Thread Claude Warren
This is starting tondelve into the realm of multidimensional bloom filters. I think throwing an exception on a null or zero length array is acceptable. We could define an interface MultidimensionalBloomFilter that could be implemented by any Bloom filter that comprises multiple filters and givr i

Re: [collections] BloomFilterExtractor.flatten()

2024-10-05 Thread Gary Gregory
On Fri, Oct 4, 2024 at 1:30 PM Alex Herbert wrote: > You cannot return an empty BloomFilter when there is no array of > BloomFilters to flatten. The BloomFilter is tied to a Shape. Without a > shape you cannot know what size filter to create. So we have to return > null or throw an exception. Wha

Re: [collections] BloomFilterExtractor.flatten()

2024-10-04 Thread Gary Gregory
The problem with returning null is that all call sites must now check for null or end up throwing an NPE. I'd prefer to fail sooner rather than later, so I'd go with throwing an exception and updating the Javadoc. WDYT? Gary On Fri, Oct 4, 2024, 1:30 PM Alex Herbert wrote: > You cannot return

Re: [collections] BloomFilterExtractor.flatten()

2024-10-04 Thread Alex Herbert
You cannot return an empty BloomFilter when there is no array of BloomFilters to flatten. The BloomFilter is tied to a Shape. Without a shape you cannot know what size filter to create. So we have to return null or throw an exception. Whatever choice must be documented. Note we do not currently ch

Re: [collections] BloomFilterExtractor.flatten()

2024-10-04 Thread Gary Gregory
OK, but how do you create an empty filter? Gary On Fri, Oct 4, 2024, 12:54 PM Claude Warren wrote: > I think that it should return an empty filter as the javadoc says > > > On Fri 4 Oct 2024, 15:53 Gary D. Gregory, wrote: > > > See the new disabled test BloomFilterExtractorTest. > > > > Gary >

Re: [collections] BloomFilterExtractor.flatten()

2024-10-04 Thread Claude Warren
I think that it should return an empty filter as the javadoc says On Fri 4 Oct 2024, 15:53 Gary D. Gregory, wrote: > See the new disabled test BloomFilterExtractorTest. > > Gary > > On 2024/10/04 14:51:55 "Gary D. Gregory" wrote: > > Hi Claude and all, > > > > The method: > > > > > org.apache.c

Re: [collections] BloomFilterExtractor.flatten()

2024-10-04 Thread Gary D. Gregory
See the new disabled test BloomFilterExtractorTest. Gary On 2024/10/04 14:51:55 "Gary D. Gregory" wrote: > Hi Claude and all, > > The method: > > org.apache.commons.collections4.bloomfilter.BloomFilterExtractor.flatten() > > is documented as always returning a BloomFilter: > > /** >

[collections] BloomFilterExtractor.flatten()

2024-10-04 Thread Gary D. Gregory
Hi Claude and all, The method: org.apache.commons.collections4.bloomfilter.BloomFilterExtractor.flatten() is documented as always returning a BloomFilter: /** * Create a standard (non-layered) Bloom filter by merging all of the layers. If * the filter is empty this method will re