{"record":{"id":"c243eef1d200fb65","repo":"apache/druid","slug":"unsupported-value-type-s","errorCode":null,"errorMessage":"Unsupported value type[%s]","messagePattern":"Unsupported value type\\[(.+?)\\]","errorType":"exception","errorClass":"ISE","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/math/expr/ExpressionType.java","lineNumber":152,"sourceCode":"        return STRING;\n      case ARRAY:\n        switch (valueType.getElementType().getType()) {\n          case LONG:\n            return LONG_ARRAY;\n          case FLOAT:\n          case DOUBLE:\n            return DOUBLE_ARRAY;\n          case STRING:\n            return STRING_ARRAY;\n          case ARRAY:\n          case COMPLEX:\n            break;\n        }\n        return ExpressionTypeFactory.getInstance().ofArray(fromColumnTypeStrict(valueType.getElementType()));\n      case COMPLEX:\n        return ExpressionTypeFactory.getInstance().ofComplex(valueType.getComplexTypeName());\n      default:\n        throw new ISE(\"Unsupported value type[%s]\", valueType);\n    }\n  }\n\n\n  /**\n   * The expression system does not distinguish between {@link ValueType#FLOAT} and {@link ValueType#DOUBLE}, so this\n   * method will convert {@link ValueType#FLOAT} to {@link #DOUBLE}.\n   */\n  @Nullable\n  public static ExpressionType fromColumnType(@Nullable TypeSignature<ValueType> valueType)\n  {\n    if (valueType == null) {\n      return null;\n    }\n    switch (valueType.getType()) {\n      case LONG:\n        return LONG;\n      case FLOAT:","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/math/expr/ExpressionType.java#L134-L170","documentation":"fromColumnTypeStrict() exhaustively maps known column value types (LONG, FLOAT/DOUBLE, STRING, ARRAY, COMPLEX) to ExpressionTypes; any ValueType that falls through the switch — i.e. a type outside the supported set — triggers this IllegalStateException. It indicates the column type system has produced a value type the expression layer cannot represent.","triggerScenarios":"Passing a TypeSignature<ValueType> whose getType() is not LONG/FLOAT/DOUBLE/STRING/ARRAY/COMPLEX — typically only possible when a custom or unrecognized ValueType reaches the expression layer via fromColumnTypeStrict.","commonSituations":"Custom segment/column type extensions introducing new ValueTypes not understood by the expression engine; version mismatches where a newer column type is fed to an older expression module; internal bugs constructing malformed type signatures.","solutions":["Check the ValueType of the input signature; ensure only standard Druid value types (LONG, DOUBLE, STRING, arrays, COMPLEX) reach this method.","Update Druid modules so the processing/ expression code matches the version that introduced the column type.","If handling a custom complex type, wrap it as ValueType.COMPLEX with a complex type name rather than a new ValueType.","Catch IllegalStateException and log the offending valueType to diagnose which type leaked in."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"switch (valueType.getType()) {\n  case LONG: case FLOAT: case DOUBLE: case STRING: case ARRAY: case COMPLEX: break;\n  default: throw new IllegalArgumentException(\"Unhandled type before conversion: \" + valueType);\n}","typeGuard":"boolean isConvertible(ValueType t) {\n  return t == ValueType.LONG || t == ValueType.FLOAT || t == ValueType.DOUBLE\n      || t == ValueType.STRING || t == ValueType.ARRAY || t == ValueType.COMPLEX;\n}","tryCatchPattern":"try {\n  ExpressionType t = ExpressionType.fromColumnTypeStrict(sig);\n} catch (IllegalStateException e) {\n  log.error(\"Unsupported value type: %s\", sig); throw e;\n}","preventionTips":["Only feed standard Druid ValueTypes into the expression layer","Keep all Druid modules on the same version","Use COMPLEX with a type name rather than inventing new ValueTypes"],"tags":["druid","expressions","type-conversion","unsupported-type"],"backgroundTag":"unsupported-operation","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"}