Chundong Wang
06/14/2021, 11:01 PMDistinctCountThetaSketch it mentioned thetaSketchColumn . Is that column supposed to be serialized binary (hex string I suppose) of Theta Sketch framework?
UpdateSketch sketch2 = UpdateSketch.builder().build();
for (int key = 50000; key < 150000; key++) sketch2.update(key);
FileOutputStream out2 = new FileOutputStream("ThetaSketch2.bin");
out2.write(sketch2.compact().toByteArray()); // or hexString()Mayank
sketch.compact().toByteArray()Mayank
Mayank
Mayank
Chundong Wang
06/14/2021, 11:10 PMChundong Wang
06/14/2021, 11:10 PMDISTINCTCOUNTRAWHLL and DistinctCountRawThetaSketch both provides hexString that application could further process.Mayank
Mayank
Chundong Wang
06/14/2021, 11:15 PMsketch.compact().toByteArray() as a column;
2. You’d need to do distinctCountThetaSketch to get count, with postAggregationExpressionToEvaluate which in most cases would match where clause and would be evaluated on brokers;
3. You could get the raw data via DistinctCountRawThetaSketch in query for HexEncoded Serialized Sketch Bytes.