Is it possible to insert pre-calcuated sketches into Druid?

I know that Druid uses the DataSketches library internally, and was wondering if there was a way to merge sketches that are created outside of Druid with the same library, by say a Java application into Druid?

// we could merge sketch2 into sketch1 or the other way around

// this is an example of using a new sketch as a union and keeping the original sketches intact

ItemsSketch union = new ItemsSketch(64);

union.merge(sketch1);

union.merge(sketch2);

Thanks in advance

Hi David,

I think some of the sketches (maybe all?) support this. For example, in theta sketches you can set “isInputThetaSketch” true and then it will expect to read a serialized theta sketch from your input file.