{"record":{"id":"3f2a85b0535ea0d2","repo":"apache/druid","slug":"not-implemented-3f2a85","errorCode":null,"errorMessage":"Not implemented","messagePattern":"Not implemented","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/HllSketchMergeAggregator.java","lineNumber":87,"sourceCode":"   * and Druid can call aggregate() and get() concurrently.\n   * See https://github.com/druid-io/druid/pull/3956\n   */\n  @Override\n  public synchronized Object get()\n  {\n    return HllSketchHolder.of(union.getResult(tgtHllType));\n  }\n\n  @Override\n  public void close()\n  {\n    union = null;\n  }\n\n  @Override\n  public float getFloat()\n  {\n    throw new UnsupportedOperationException(\"Not implemented\");\n  }\n\n  @Override\n  public long getLong()\n  {\n    throw new UnsupportedOperationException(\"Not implemented\");\n  }\n\n}\n","sourceCodeStart":69,"sourceCodeEnd":97,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/HllSketchMergeAggregator.java#L69-L97","documentation":"HllSketchMergeAggregator aggregates HLL sketches and supports getDouble() as its numeric accessor; getFloat() is deliberately unimplemented because an HLL sketch's estimate is a double and a float representation would lose precision. Calling it always throws UnsupportedOperationException. Use getDouble() or the sketch accessor instead.","triggerScenarios":"Configuring an aggregation/post-aggregation that calls getFloat() on this aggregator, e.g. a float-typed expression or a numeric post-agg that selects float accessors over the sketch metric.","commonSituations":"Writing SQL or native queries where the engine expects a FLOAT column type; custom post-aggregators iterating numeric getters; mis-typed finalizer output types in the aggregation spec.","solutions":["Use getDouble() on the aggregator, or HllSketchHolder.getSketch() then estimate/getEstimate()","Set the aggregation's type to \"double\" (or the sketch TYPE) instead of \"float\" in the query/spec","In post-aggregators use the estimator/field accessor that reads doubles"],"exampleFix":"// before\nfloat est = aggregator.getFloat();\n// after\ndouble est = aggregator.getDouble();","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { v = agg.getFloat(); } catch (UnsupportedOperationException e) { v = (float) agg.getDouble(); }","preventionTips":["Use getDouble() for all numeric reads from HLL aggregators","Type HLL sketch aggregations as double/sketch, never float","Avoid generic numeric-getter code paths for sketch aggregators"],"tags":["unsupported-operation","datasketches","hll","aggregator"],"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"}