apache/druid · error · IAE

Column name must be provided and non-empty

Error message

Column name must be provided and non-empty

What it means

Constructor validation guard for the ColumnSignature record: the JSON-deserialized or programmatically built column signature must carry a name, since every signature in a segment's column-signature set is keyed by its column name and an empty/null name would be ambiguous. It fires when a signature is constructed with a missing or empty 'name' property (e.g. malformed metadata JSON or a caller passing null); supply a non-empty column name. A null type is explicitly allowed.

Source

Thrown at processing/src/main/java/org/apache/druid/segment/column/ColumnSignature.java:53

class ColumnSignature
{
  private final String name;

  @Nullable
  private final ColumnType type;

  @JsonCreator
  ColumnSignature(
      @JsonProperty("name") String name,
      @JsonProperty("type") @Nullable ColumnType type
  )
  {
    this.name = name;
    this.type = type;

    // Name must be nonnull, but type can be null (if the type is unknown)
    if (name == null || name.isEmpty()) {
      throw new IAE("Column name must be provided and non-empty");
    }
  }

  @JsonProperty("name")
  String name()
  {
    return name;
  }

  @Nullable
  @JsonProperty("type")
  @JsonInclude(JsonInclude.Include.NON_NULL)
  ColumnType type()
  {
    return type;
  }

  @Override

View on GitHub (pinned to 9b90983fd2)

Solutions

  1. Pass a non-empty column name to the constructor
  2. If deserializing from JSON, include the required "name" property
  3. Trace the upstream planner/datasource code that yields an empty name and fix it to propagate the real column identifier

Example fix

// before
new ColumnSignature(null, ColumnType.LONG);
// after
new ColumnSignature("myColumn", ColumnType.LONG);
Defensive patterns

Strategy: validation

Validate before calling

if (name == null || name.isEmpty()) { throw new IllegalArgumentException("Column name required"); }
ColumnSignature sig = new ColumnSignature(name, type);

Type guard

static boolean isValidColumnName(String n) { return n != null && !n.isEmpty(); }

Try / catch

try { new ColumnSignature(name, type); } catch (IAE e) { /* reject payload and report missing name */ }

Prevention

When it happens

Trigger: Constructing ColumnSignature (directly or via its factories/JSON deserialization) with name == null or name.isEmpty().

Common situations: Hand-building signatures in code/tests without a name; JSON payloads missing the "name" field; downstream planner code producing a signature for an anonymous/generated column.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


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