apache/druid · error · IAE

The local input source has a file list: do not provide…

Error message

The local input source has a file list: do not provide other arguments

What it means

When a defined local external table already stores a files list in its input source, the table function form takes no further arguments — the file selection is fully determined. Passing any extra arguments to such a table's table function is rejected by convertCompletedTable with this IAE.

Solutions

  1. Call the table function with no arguments: TABLE('myTable')
  2. Remove the arguments from the call; the stored files list is authoritative
  3. If dynamic selection is needed, redefine the table with baseDir instead of files, then pass files/filter as function arguments

Example fix

// before
SELECT * FROM TABLE(myFilesTable(FILES => ARRAY['x.json']))
// after
SELECT * FROM TABLE(myFilesTable())
Defensive patterns

Strategy: validation

Validate before calling

// Java
// Before calling the table function on a table with a files list:
if (!args.isEmpty()) throw new IllegalArgumentException("files-backed tables take no function arguments");

Try / catch

try { fn.call(args); } catch (IAE e) { if (e.getMessage().contains("do not provide other arguments")) fn.call(Map.of()); else throw e; }

Prevention

When it happens

Trigger: Calling TABLE(...) on a catalog external table whose inputSourceMap contains a non-empty files field, while passing one or more table-function arguments (e.g. files, filter, baseDir, or format params).

Common situations: Reusing a generic TABLE(...) invocation template across tables; adding a filter thinking it narrows the already-fixed file list; migrating a baseDir-style table to a files-style one without updating call sites.

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/b8f0991ab516ab5a. Report an issue: GitHub.

Appendix: source

Thrown at server/src/main/java/org/apache/druid/catalog/model/table/LocalInputSourceDefn.java:211

    // Does the table define a format?
    if (table.inputFormatMap == null) {
      params = addFormatParameters(params);
    }
    return new PartialTableFunction(table, params);
  }

  @Override
  protected ExternalTableSpec convertCompletedTable(
      final ResolvedExternalTable table,
      final Map<String, Object> args,
      final List<ColumnSpec> columns
  )
  {
    final Map<String, Object> sourceMap = new HashMap<>(table.inputSourceMap);
    final boolean hasFiles = !CollectionUtils.isNullOrEmpty(CatalogUtils.safeGet(sourceMap, FILES_FIELD, List.class));
    if (hasFiles) {
      if (!args.isEmpty()) {
        throw new IAE("The local input source has a file list: do not provide other arguments");
      }
    } else {
      final String baseDir = CatalogUtils.getString(sourceMap, BASE_DIR_FIELD);
      if (Strings.isNullOrEmpty(baseDir)) {
        throw new IAE(
            "When a local external table is used with a table function, %s must be set",
            BASE_DIR_FIELD
        );
      }
      final boolean hasFilter = !Strings.isNullOrEmpty(CatalogUtils.getString(sourceMap, FILTER_FIELD));
      final List<String> filesParam = CatalogUtils.getStringArray(args, FILES_PARAMETER);
      final boolean hasFilesParam = !CollectionUtils.isNullOrEmpty(filesParam);
      final String filterParam = CatalogUtils.getString(args, FILTER_PARAMETER);
      final boolean hasFilterParam = !Strings.isNullOrEmpty(filterParam);
      if (!hasFilter && !hasFilesParam && !hasFilterParam) {
        throw new IAE(
            "For a local input source, set either %s or %s",
            FILES_PARAMETER,

View on GitHub (pinned to 9b90983fd2)