{"record":{"id":"8314f208e480ed38","repo":"apache/druid","slug":"not-implemented-8314f2","errorCode":null,"errorMessage":"Not implemented","messagePattern":"Not implemented","errorType":"exception","errorClass":"java.lang.UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/SketchBufferAggregator.java","lineNumber":70,"sourceCode":"      return;\n    }\n\n    Union union = helper.getOrCreateUnion(buf, position);\n    SketchAggregator.updateUnion(union, update);\n  }\n\n\n  @Nullable\n  @Override\n  public Object get(ByteBuffer buf, int position)\n  {\n    return helper.get(buf, position);\n  }\n\n  @Override\n  public float getFloat(ByteBuffer buf, int position)\n  {\n    throw new UnsupportedOperationException(\"Not implemented\");\n  }\n\n  @Override\n  public long getLong(ByteBuffer buf, int position)\n  {\n    throw new UnsupportedOperationException(\"Not implemented\");\n  }\n\n  @Override\n  public double getDouble(ByteBuffer buf, int position)\n  {\n    throw new UnsupportedOperationException(\"Not implemented\");\n  }\n\n  @Override\n  public void close()\n  {\n    helper.clear();","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/SketchBufferAggregator.java#L52-L88","documentation":"SketchBufferAggregator maintains a theta sketch Union in the aggregation buffer and exposes results only through get(); getFloat() is an intentionally unsupported sentinel that always throws UnsupportedOperationException. It fires if a query or caller attempts to read the sketch metric via the primitive float accessor, which has no defined meaning for a sketch.","triggerScenarios":"A query with FLOAT output type or float numeric accessor runs against a theta sketch metric using the buffer (vectorized/byte-buffer) aggregation path.","commonSituations":"outputType FLOAT on thetaSketch aggregators; generic buffer-aggregator iteration in custom code; SQL planner mapping a sketch expression to FLOAT.","solutions":["Read the sketch through get() and finalize it with SketchEstimateOrDefaultPostAggregator or similar post-aggregators","Avoid configuring this aggregator as a float-typed metric in queries or downstream tooling"],"exampleFix":"// before\nfloat f = bufferAggregator.getFloat(buf, pos);\n// after\nObject sketch = bufferAggregator.get(buf, pos);","handlingStrategy":"validation","validationCode":"if (bufferAgg instanceof SketchBufferAggregator && \"float\".equals(outputType)) { throw new IllegalArgumentException(\"FLOAT output unsupported for thetaSketch buffer aggregation\"); }","typeGuard":"boolean readableAsFloat(BufferAggregator a) { return !(a instanceof SketchBufferAggregator); }","tryCatchPattern":"try { f = agg.getFloat(buf, pos); } catch (UnsupportedOperationException e) { f = 0f; /* route through get() + sketch post-aggregator */ }","preventionTips":["Avoid FLOAT outputType on theta sketch metrics","Use sketchEstimate for numeric values in vectorized/buffer paths","Inspect aggregator class before numeric buffer access"],"tags":["java","datasketches","theta-sketch","unsupported-operation"],"backgroundTag":"method-not-implemented","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}