apache/druid · error · IllegalArgumentException
No such system field
Error message
No such system field[%s]
What it means
SystemField.fromFieldName looks up a system field (such as __partition_column or __file) by its column name and throws this IllegalArgumentException when no registered enum constant matches the given field name.
Solutions
- Use an exact supported system field name (e.g. __file, __partition_column)
- Check spelling and double-underscore prefix
- Consult SystemField enum for the list of valid names in your Druid version
Example fix
// before SELECT __parition_column FROM TABLE(EXTERN(...)) // after SELECT __partition_column FROM TABLE(EXTERN(...))
Defensive patterns
Strategy: validation
Validate before calling
boolean known = Arrays.stream(SystemField.values()).anyMatch(f -> f.getFieldName().equals(name));
Type guard
Optional<SystemField> safeFromFieldName(String n) { try { return Optional.of(SystemField.fromFieldName(n)); } catch (IllegalArgumentException e) { return Optional.empty(); } } Try / catch
try { SystemField.fromFieldName(name); } catch (IllegalArgumentException e) { log.error("Unknown system field {}", name); } Prevention
- Only use documented system field names like __file and __partition_column
- Double-check spelling and the leading double underscore
- List SystemField values' fieldNames when unsure
When it happens
Trigger: Referencing a system field column name in an MSQ/ingestion query or spec that does not equal any SystemField's getFieldName(), e.g. a typo like '__parition_column' or an unsupported field name.
Common situations: Typoed system field names in SQL queries against external input, copying field names from older Druid versions where names changed, case mismatches.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- argument must be a LONG constant
- Cannot filter datasource
- Cannot handle constant condition
- Cannot handle equality condition involving left-hand…
- Cannot handle non-equijoin condition
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/b3865d8745084012.
Report an issue: GitHub.
Appendix: source
Thrown at processing/src/main/java/org/apache/druid/data/input/impl/systemfield/SystemField.java:60
private final String fieldName;
private final ColumnType columnType;
SystemField(final String fieldName, final ColumnType columnType)
{
this.fieldName = fieldName;
this.columnType = columnType;
}
@JsonCreator
public static SystemField fromFieldName(final String fieldName)
{
for (final SystemField field : values()) {
if (field.getFieldName().equals(fieldName)) {
return field;
}
}
throw new IAE("No such system field[%s]", fieldName);
}
/**
* Name of this system field.
*/
@JsonValue
public String getFieldName()
{
return fieldName;
}
/**
* Type of this system field.
*/
@SuppressWarnings("unused") // Not used, but still useful for signifying intent
public ColumnType getColumnType()
{
return columnType;View on GitHub (pinned to 9b90983fd2)