apache/druid · error · IllegalArgumentException

Expected string with a number, received value: " + objString

Error message

Expected string with a number, received value: " + objString

What it means

extractValue accepts null, Number and DDSketch values and parses numeric strings; a non-numeric string reaches the NumberFormatException branch and is rethrown with this message naming the offending raw value.

Solutions

  1. Ensure the input column contains numbers or numeric strings.
  2. Fix the ingestion/parser config so non-numeric values never reach this metric, or pre-filter them.
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at extensions-contrib/ddsketch/src/main/java/org/apache/druid/query/aggregation/ddsketch/DDSketchComplexMetricSerde.java:69 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/608bc6d51f354717. Report an issue: GitHub.

Appendix: source

Thrown at extensions-contrib/ddsketch/src/main/java/org/apache/druid/query/aggregation/ddsketch/DDSketchComplexMetricSerde.java:69

      @Override
      public Object extractValue(final InputRow inputRow, final String metricName)
      {
        final Object obj = inputRow.getRaw(metricName);
        if (obj == null || obj instanceof Number || obj instanceof DDSketch) {
          return obj;
        }
        if (obj instanceof String) {
          String objString = (String) obj;
          if (objString.isEmpty()) {
            return null;
          }

          try {
            Double doubleValue = Double.parseDouble(objString);
            return doubleValue;
          }
          catch (NumberFormatException e) {
            throw new IAE("Expected string with a number, received value: " + objString);
          }

        }

        return DDSketchUtils.deserialize(obj);
      }
    };
  }

  @Override
  public ObjectStrategy<DDSketch> getObjectStrategy()
  {
    return STRATEGY;
  }
}

View on GitHub (pinned to 9b90983fd2)