{"record":{"id":"983bd67e77b93b9e","repo":"apache/druid","slug":"invalid-value-s-for-s","errorCode":null,"errorMessage":"Invalid value[%s] for[%s]","messagePattern":"Invalid value\\[(.+?)\\] for\\[(.+?)\\]","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/query/groupby/DeferExpressionDimensions.java","lineNumber":149,"sourceCode":"  public static final String JSON_KEY = \"deferExpressionDimensions\";\n\n  private final String jsonName;\n\n  DeferExpressionDimensions(String jsonName)\n  {\n    this.jsonName = jsonName;\n  }\n\n  @JsonCreator\n  public static DeferExpressionDimensions fromString(final String jsonName)\n  {\n    for (final DeferExpressionDimensions value : values()) {\n      if (value.jsonName.equals(jsonName)) {\n        return value;\n      }\n    }\n\n    throw new IAE(\"Invalid value[%s] for[%s]\", jsonName, JSON_KEY);\n  }\n\n  public abstract boolean useDeferredGroupBySelector(\n      ExpressionPlan plan,\n      List<String> requiredBindingsList,\n      ColumnInspector inspector\n  );\n\n  @Override\n  @JsonValue\n  public String toString()\n  {\n    return jsonName;\n  }\n\n\n  /**\n   * {@link VectorColumnSelectorFactory} currently can only make dictionary encoded selectors for string types, so","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/query/groupby/DeferExpressionDimensions.java#L131-L167","documentation":"DeferExpressionDimensions is an enum of deferred group-by dimension selector modes keyed by JSON name. fromString throws IAE when the supplied jsonName matches none of the enum values, i.e. an unknown value for the groupByEnableDeferredSelector-style config key.","triggerScenarios":"Setting the group-by query context/config key controlling deferred expression dimensions to a string other than the accepted names (e.g. a typo or \"true\"/\"false\" instead of the enum's jsonName values).","commonSituations":"Configuration typos in query context or GroupByQueryConfig; behavior changes across Druid versions where accepted values changed.","solutions":["Use one of the exact accepted jsonName values for the key (see DeferExpressionDimensions.values()).","Read the enum source to list valid values, and validate config input before submitting queries.","If upgrading, migrate old context values to the current enum names."],"exampleFix":"// before\ncontext.put(\"groupByEnableDeferredSelector\", \"yes\");\n// after\ncontext.put(\"groupByEnableDeferredSelector\", DeferExpressionDimensions.<VALUE>.getJsonName()); // e.g. a valid enum jsonName","handlingStrategy":"validation","validationCode":"boolean ok = Arrays.stream(DeferExpressionDimensions.values()).anyMatch(v -> v.getJsonName().equals(jsonName));","typeGuard":null,"tryCatchPattern":"try { mode = DeferExpressionDimensions.fromString(jsonName); } catch (IllegalArgumentException e) { mode = DEFAULT; }","preventionTips":["Use the enum constant instead of a raw string when setting the context value","Validate config values against the enum's jsonName list","Re-check accepted values when upgrading Druid versions"],"tags":["druid","groupby","enum","config"],"backgroundTag":"invalid-enum-value","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}