{"record":{"id":"21ce0c565c3dcf4c","repo":"apache/druid","slug":"cannot-provide-arguments-for-an-inline-table","errorCode":null,"errorMessage":"Cannot provide arguments for an inline table","messagePattern":"Cannot provide arguments for an inline table","errorType":"exception","errorClass":"ISE","httpStatus":null,"severity":"error","filePath":"server/src/main/java/org/apache/druid/catalog/model/table/InlineInputSourceDefn.java","lineNumber":114,"sourceCode":"    // source to allow zero rows of data. However, such is not the case.\n    if (CollectionUtils.isNullOrEmpty(data)) {\n      throw new IAE(\n          \"An inline table requires one or more rows of data in the '%s' property\",\n          DATA_PROPERTY\n      );\n    }\n    jsonMap.put(DATA_FIELD, String.join(\"\\n\", data));\n  }\n\n  @Override\n  protected ExternalTableSpec convertCompletedTable(\n      final ResolvedExternalTable table,\n      final Map<String, Object> args,\n      final List<ColumnSpec> columns\n  )\n  {\n    if (!args.isEmpty()) {\n      throw new ISE(\"Cannot provide arguments for an inline table\");\n    }\n    if (!CollectionUtils.isNullOrEmpty(columns)) {\n      throw new IAE(\"Cannot provide columns for an inline table\");\n    }\n    return convertTable(table);\n  }\n\n  @Override\n  protected void auditInputSource(Map<String, Object> jsonMap)\n  {\n    // Special handling of the data property which, in SQL, is a null-delimited\n    // list of rows. The user will usually provide a trailing newline which should\n    // not be interpreted as an empty data row. That is, if the data ends with\n    // a newline, the inline input source will interpret that as a blank line, oddly.\n    String data = CatalogUtils.getString(jsonMap, DATA_FIELD);\n    if (data != null && !data.endsWith(\"\\n\")) {\n      jsonMap.put(DATA_FIELD, data + \"\\n\");\n    }","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/catalog/model/table/InlineInputSourceDefn.java#L96-L132","documentation":"InlineInputSourceDefn.convertCompletedTable builds an inline table entirely from its pre-completed spec, so no additional args may be supplied. Any non-empty args map is rejected with IllegalStateException because inline tables take no conversion parameters.","triggerScenarios":"Calling convertCompletedTable with a non-empty args map for an inline-type external table.","commonSituations":"Generic conversion code that passes through whatever args it received; leftover args from a previous input source type after switching a table to inline; copying arg maps between table definitions.","solutions":["Pass an empty args map when converting a completed inline table","Remove any residual args (e.g. format or data keys) before calling convertCompletedTable","Ensure all inline content lives in the table spec (columns, format, data), not in args"],"exampleFix":"// before\ndefn.convertCompletedTable(table, args, null); // args = {\"data\":\"...\"}\n// after\ndefn.convertCompletedTable(table, Collections.emptyMap(), null);","handlingStrategy":"validation","validationCode":"if (!args.isEmpty()) {\n  throw new IllegalArgumentException(\"inline convertCompletedTable requires empty args\");\n}","typeGuard":null,"tryCatchPattern":"try { defn.convertCompletedTable(table, args, columns); } catch (ISE e) { if (e.getMessage().contains(\"Cannot provide arguments\")) { args = Collections.emptyMap(); /* retry */ } else { throw e; } }","preventionTips":["Branch conversion logic per input source type instead of sharing one args map","Clear residual args when changing a table's source type to inline","Keep inline content in the table spec, not in args"],"tags":["inline","input-source","api-misuse"],"backgroundTag":"invalid-argument","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"}