apache/druid · error · IllegalStateException

Cannot handle inputSpec of class

Error message

Cannot handle inputSpec of class [%s]

What it means

getReader looks up an InputSliceReader by the concrete InputSlice class in readerMap and throws this ISE when the class is not registered. It is a type-dispatch guard in MapInputSliceReader: a slice type (e.g. some external or inline slice) reached a reader that was never configured to handle it, indicating a planning/registration mismatch.

Solutions

  1. Check that the input spec for the query stage was built with readers matching all slice types used by the plan.
  2. If using extensions or custom inputs, ensure the InputSliceReader was registered in the readerMap at construction.
  3. Report as a bug with the query plan if all inputs are standard (table/external/inline).
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at multi-stage-query/src/main/java/org/apache/druid/msq/input/MapInputSliceReader.java:59 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/1398318f253d08a7. Report an issue: GitHub.

Appendix: source

Thrown at multi-stage-query/src/main/java/org/apache/druid/msq/input/MapInputSliceReader.java:59

  }

  @Override
  public PhysicalInputSlice attach(
      int inputNumber,
      InputSlice slice,
      CounterTracker counters,
      Consumer<Throwable> warningPublisher
  )
  {
    return getReader(slice.getClass()).attach(inputNumber, slice, counters, warningPublisher);
  }

  private InputSliceReader getReader(final Class<? extends InputSlice> clazz)
  {
    final InputSliceReader reader = readerMap.get(clazz);

    if (reader == null) {
      throw new ISE("Cannot handle inputSpec of class [%s]", clazz.getName());
    }

    return reader;
  }
}

View on GitHub (pinned to 9b90983fd2)