balci
01/11/2022, 10:07 PMRichard Startin
01/11/2022, 10:08 PMRichard Startin
01/11/2022, 10:10 PMRoaringBitmap bitmap = RoaringBitmap.bitmapOf(...);
ByteBuffer buffer = ByteBuffer.allocate(bitmap.serializedSizeInBytes());
bitmap.serialize(buffer);
buffer.flip();
ByteBuffer idSet = Base64.getEncoder().encode(buffer);
Richard Startin
01/11/2022, 10:13 PMRichard Startin
01/11/2022, 10:14 PMRichard Startin
01/11/2022, 10:16 PMbalci
01/11/2022, 10:25 PMI guess you want to do that so it’s smaller than an in clause?Not necessarily to make the clause smaller in size, but more to make the comparison faster.
balci
01/11/2022, 10:30 PMSELECT yearID, count(*)
FROM baseballStats
WHERE IN_ID_SET(
yearID,
'ATowAAABAAAAAAA7ABAAAABtB24HbwdwB3EHcgdzB3QHdQd2B3cHeAd5B3oHewd8B30Hfgd/B4AHgQeCB4MHhAeFB4YHhweIB4kHigeLB4wHjQeOB48HkAeRB5IHkweUB5UHlgeXB5gHmQeaB5sHnAedB54HnwegB6EHogejB6QHpQemB6cHqAc='
) = 1
GROUP BY yearID
Richard Startin
01/11/2022, 10:50 PMRichard Startin
01/11/2022, 10:50 PMBloomFilterIdSet
Richard Startin
01/11/2022, 10:54 PMIdSets
as well - you need a type byte=3 and funnel type byte=2 and then you can just use guavabalci
01/11/2022, 11:41 PMRichard Startin
01/12/2022, 3:05 PMRichard Startin
01/12/2022, 3:05 PMselect count(*) from airlineStats where insubquery(OriginAirportID, 'select idset(DestAirportID) from airlineStats') = 1