{"record":{"id":"6d852ee8f8e19033","repo":"apache/druid","slug":"format-s-property-s-of-class-s-conflicts","errorCode":null,"errorMessage":"Format [%s], property [%s] of class [%s] conflicts with another format property of class [%s]","messagePattern":"Format \\[(.+?)\\], property \\[(.+?)\\] of class \\[(.+?)\\] conflicts with another format property of class \\[(.+?)\\]","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"server/src/main/java/org/apache/druid/catalog/model/table/FormattedInputSourceDefn.java","lineNumber":111,"sourceCode":"   */\n  protected List<ParameterDefn> addFormatParameters(\n      final List<ParameterDefn> properties\n  )\n  {\n    final List<ParameterDefn> toAdd = new ArrayList<>();\n    // While the format parameter is required, we mark it as optional. Else\n    // if the source defines optional parameters, they will still be ignored\n    // as Calcite treats (optional, optional, required) as (required, required, required)\n    final ParameterDefn formatProp = new Parameter(FORMAT_PARAMETER, ParameterType.VARCHAR, true);\n    toAdd.add(formatProp);\n    final Map<String, ParameterDefn> formatProps = new HashMap<>();\n    for (InputFormatDefn format : formats.values()) {\n      for (ParameterDefn prop : format.parameters()) {\n        final ParameterDefn existing = formatProps.putIfAbsent(prop.name(), prop);\n        if (existing == null) {\n          toAdd.add(prop);\n        } else if (existing.type() != prop.type()) {\n          throw new ISE(\n              \"Format [%s], property [%s] of class [%s] conflicts with another format property of class [%s]\",\n              format.typeValue(),\n              prop.name(),\n              prop.type().sqlName(),\n              existing.type().sqlName()\n          );\n        }\n      }\n    }\n    return CatalogUtils.concatLists(properties, toAdd);\n  }\n\n  @Override\n  protected InputFormat convertTableToFormat(ResolvedExternalTable table)\n  {\n    final String formatTag = CatalogUtils.getString(table.inputFormatMap, InputFormat.TYPE_PROPERTY);\n    if (formatTag == null) {\n      throw new IAE(\"[%s] property must be provided\", InputFormat.TYPE_PROPERTY);","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/catalog/model/table/FormattedInputSourceDefn.java#L93-L129","documentation":"FormattedInputSourceDefn.addFormatParameters merges parameters from all registered input format definitions; when two formats expose the same property name with different parameter types, the merge is ambiguous and this ISE is thrown. This is a registration/configuration conflict in the catalog's format registry, not a user-data error.","triggerScenarios":"Calling allParams() (which invokes addFormatParameters) after registering two InputFormatDefn implementations that both define a ParameterDefn with the same name but different types.","commonSituations":"Installing multiple Druid extensions that register overlapping format parameter names; custom format plugins sharing generic property names like 'encoding' with differing types; classpath changes picking up a new format extension.","solutions":["Rename the conflicting parameter in one of the custom InputFormatDefn implementations.","Align the parameter types across formats so the property names match with identical types.","Remove one of the conflicting format extensions from the runtime.","Restrict which format extensions are loaded in the server configuration."],"exampleFix":"// before: two formats define param \"encoding\" (one string, one enum)\n// after: rename in custom defn\nnew ParameterDefn(\"myFormatEncoding\", ParameterType.STRING)","handlingStrategy":"try-catch","validationCode":"Map<String,ParameterType> seen = new HashMap<>();\nfor (InputFormatDefn f : registeredFormats) {\n  for (ParameterDefn p : f.parameters()) {\n    ParameterType prev = seen.put(p.name(), p.type());\n    if (prev != null && prev != p.type()) throw new IllegalStateException(\"conflicting param: \" + p.name());\n  }\n}","typeGuard":null,"tryCatchPattern":"try { params = defn.allParams(); } catch (ISE e) { LOG.error(\"format parameter conflict, check extensions: %s\", e.getMessage()); throw e; }","preventionTips":["Namespace custom format parameter names uniquely","Audit overlapping extensions sharing generic property names","Align types across formats that share a property name","Test extension combinations in staging"],"tags":["druid","input-format","parameter-conflict","registry"],"backgroundTag":"internal-invariant-violation","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"}