apache/druid · error · UnsupportedOperationException

does not support getLong()

Error message

 does not support getLong()

What it means

Guard thrown by the compressed-bigdecimal AggregateCombiner base when getLong() is called. A CompressedBigDecimal cannot be delivered as a long primitive through this interface, so the combiner deliberately rejects long access; queries must read the value with getObject() or getDouble() instead.

Solutions

  1. Use getObject() to read the CompressedBigDecimal value.
  2. Avoid using this aggregator in long-typed metric contexts.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at extensions-contrib/compressed-bigdecimal/src/main/java/org/apache/druid/compressedbigdecimal/aggregator/CompressedBigDecimalAggregateCombinerBase.java:61 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/7871a489e769a872. Report an issue: GitHub.

Appendix: source

Thrown at extensions-contrib/compressed-bigdecimal/src/main/java/org/apache/druid/compressedbigdecimal/aggregator/CompressedBigDecimalAggregateCombinerBase.java:61

  @Override
  public abstract void fold(@SuppressWarnings("rawtypes") ColumnValueSelector columnValueSelector);

  @Override
  public double getDouble()
  {
    throw new UnsupportedOperationException(className + " does not support getDouble()");
  }

  @Override
  public float getFloat()
  {
    throw new UnsupportedOperationException(className + " does not support getFloat()");
  }

  @Override
  public long getLong()
  {
    throw new UnsupportedOperationException(className + " does not support getLong()");
  }

  @Nullable
  @Override
  public CompressedBigDecimal getObject()
  {
    return value;
  }

  @Override
  public Class<CompressedBigDecimal> classOfObject()
  {
    return CompressedBigDecimal.class;
  }
}

View on GitHub (pinned to 9b90983fd2)