apache/druid · error · ISE

Cannot provide arguments for an inline table

Error message

Cannot provide arguments for an inline table

What it means

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.

Solutions

  1. Pass an empty args map when converting a completed inline table
  2. Remove any residual args (e.g. format or data keys) before calling convertCompletedTable
  3. Ensure all inline content lives in the table spec (columns, format, data), not in args

Example fix

// before
defn.convertCompletedTable(table, args, null); // args = {"data":"..."}
// after
defn.convertCompletedTable(table, Collections.emptyMap(), null);
Defensive patterns

Strategy: validation

Validate before calling

if (!args.isEmpty()) {
  throw new IllegalArgumentException("inline convertCompletedTable requires empty args");
}

Try / catch

try { defn.convertCompletedTable(table, args, columns); } catch (ISE e) { if (e.getMessage().contains("Cannot provide arguments")) { args = Collections.emptyMap(); /* retry */ } else { throw e; } }

Prevention

When it happens

Trigger: Calling convertCompletedTable with a non-empty args map for an inline-type external table.

Common situations: 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.

Understand the failure class

Background: "must be a positive integer", "cannot be empty", "invalid argument": how invalid-argument errors work across open-source libraries — this error's family across 33 libraries.

Related errors


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/21ce0c565c3dcf4c. Report an issue: GitHub.

Appendix: source

Thrown at server/src/main/java/org/apache/druid/catalog/model/table/InlineInputSourceDefn.java:114

    // source to allow zero rows of data. However, such is not the case.
    if (CollectionUtils.isNullOrEmpty(data)) {
      throw new IAE(
          "An inline table requires one or more rows of data in the '%s' property",
          DATA_PROPERTY
      );
    }
    jsonMap.put(DATA_FIELD, String.join("\n", data));
  }

  @Override
  protected ExternalTableSpec convertCompletedTable(
      final ResolvedExternalTable table,
      final Map<String, Object> args,
      final List<ColumnSpec> columns
  )
  {
    if (!args.isEmpty()) {
      throw new ISE("Cannot provide arguments for an inline table");
    }
    if (!CollectionUtils.isNullOrEmpty(columns)) {
      throw new IAE("Cannot provide columns for an inline table");
    }
    return convertTable(table);
  }

  @Override
  protected void auditInputSource(Map<String, Object> jsonMap)
  {
    // Special handling of the data property which, in SQL, is a null-delimited
    // list of rows. The user will usually provide a trailing newline which should
    // not be interpreted as an empty data row. That is, if the data ends with
    // a newline, the inline input source will interpret that as a blank line, oddly.
    String data = CatalogUtils.getString(jsonMap, DATA_FIELD);
    if (data != null && !data.endsWith("\n")) {
      jsonMap.put(DATA_FIELD, data + "\n");
    }

View on GitHub (pinned to 9b90983fd2)