apache/druid · error · UnsupportedOperationException

Numeric columns do not support bitmaps.

Error message

Numeric columns do not support bitmaps.

What it means

LongDimensionIndexer.fillBitmapsFromUnsortedEncodedKeyComponent always throws UnsupportedOperationException because numeric columns are not bitmap-indexed; inverted indexes apply only to dictionary-encoded string dimensions.

Solutions

  1. Skip bitmap index generation for numeric columns (they support range indexes instead)
  2. Guard index-building code with a check that the dimension is string/dictionary-encoded
  3. Remove index specs that request bitmap indexes on numeric dimensions

Example fix

// before
indexer.fillBitmapsFromUnsortedEncodedKeyComponent(key, rowNum, bitmaps, factory);
// after
if (indexer instanceof StringDimensionIndexer) {
  indexer.fillBitmapsFromUnsortedEncodedKeyComponent(key, rowNum, bitmaps, factory);
}
Defensive patterns

Strategy: type-guard

Validate before calling

if (capabilities.getType() != ValueType.STRING) { skip bitmap index creation; }

Type guard

boolean supportsBitmaps(DimensionIndexer indexer) { return indexer instanceof StringDimensionIndexer; }

Try / catch

try { indexer.fillBitmapsFromUnsortedEncodedKeyComponent(...); } catch (UnsupportedOperationException e) { /* skip; numeric columns use range indexes */ }

Prevention

When it happens

Trigger: Generating inverted indexes during merge/ingestion for a numeric dimension, or any code path that iterates dictionary keys and calls fillBitmapsFromUnsortedEncodedKeyComponent on a Long (numeric) dimension.

Common situations: Configuring bitmap indexes on numeric columns (historically unsupported); generic index-building code that doesn't check column type.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at processing/src/main/java/org/apache/druid/segment/LongDimensionIndexer.java:210

  {
    return key;
  }

  @Override
  public ColumnValueSelector convertUnsortedValuesToSorted(ColumnValueSelector selectorWithUnsortedValues)
  {
    return selectorWithUnsortedValues;
  }

  @Override
  public void fillBitmapsFromUnsortedEncodedKeyComponent(
      Long key,
      int rowNum,
      MutableBitmap[] bitmapIndexes,
      BitmapFactory factory
  )
  {
    throw new UnsupportedOperationException("Numeric columns do not support bitmaps.");
  }
}

View on GitHub (pinned to 9b90983fd2)