apache/druid · error · IllegalArgumentException
No such join algorithm
Error message
No such join algorithm [%s]. Supported values are: %s
What it means
JoinAlgorithm is a closed enum (broadcast, sort-merge) parsed from its string id via fromString/JsonCreator. An unrecognized id throws this IllegalArgumentException listing the supported values, since joins cannot proceed without a valid algorithm choice.
Solutions
- Use one of the supported values listed in the error message (e.g. "broadcast" or "sortMerge").
- Check the exact spelling/casing against the enum ids in your Druid version.
- If migrating from another version, consult that version's JoinAlgorithm enum for valid ids.
Example fix
// before "joinAlgorithm": "hash" // after "joinAlgorithm": "broadcast"
Defensive patterns
Strategy: validation
Validate before calling
Set<String> valid = Set.of("broadcast", "sortMerge");
if (joinAlgorithm != null && !valid.contains(joinAlgorithm)) {
throw new IllegalArgumentException("Unsupported joinAlgorithm: " + joinAlgorithm);
} Try / catch
try {
JoinAlgorithm alg = JoinAlgorithm.fromString(id);
} catch (IllegalArgumentException e) {
alg = JoinAlgorithm.BROADCAST; // or surface a friendly message
} Prevention
- Use JoinAlgorithm enum constants in code instead of raw strings.
- Copy valid values from the error message listing supported ids.
- Pin client JSON generation to your Druid version's enum ids.
When it happens
Trigger: Submitting a query or datasource JSON with "joinAlgorithm":"something" that isn't one of the enum's ids, or an older client string no longer supported by this Druid version.
Common situations: Typos in joinAlgorithm in hand-written native query JSON; clients written against a different Druid version with different supported algorithms; case-sensitivity mistakes in the id.
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
- Ambiguous directions
- BroadcastTablesTooLarge
- Caching is not supported. Check `isCacheable` before…
- Cannot build hash-join matcher on non-equi-join condition
- Cannot build hash-join matcher on non-key-based condition
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/653ac2f0ecce7ad4.
Report an issue: GitHub.
Appendix: source
Thrown at processing/src/main/java/org/apache/druid/query/JoinAlgorithm.java:61
};
private final String id;
JoinAlgorithm(String id)
{
this.id = id;
}
@JsonCreator
public static JoinAlgorithm fromString(final String id)
{
for (final JoinAlgorithm value : values()) {
if (value.id.equals(id)) {
return value;
}
}
throw new IAE("No such join algorithm [%s]. Supported values are: %s", id, Arrays.toString(values()));
}
@JsonValue
public String getId()
{
return id;
}
/**
* Whether this join algorithm requires subqueries for all inputs.
*/
public abstract boolean requiresSubquery();
@Override
public String toString()
{
return id;
}View on GitHub (pinned to 9b90983fd2)