prestodb/presto · error · UnsupportedOperationException
LEARN must run on a single machine
Error message
LEARN must run on a single machine
What it means
Unsupported-operation guard in LearnRegressorAggregation.combine: the base learn_regressor aggregation delegates to the LibSVM variant but still must not merge partial states — the aggregation is declared decomposable=false, and combine is only a placeholder that rejects distributed execution of the training.
Source
Thrown at presto-ml/src/main/java/com/facebook/presto/ml/LearnRegressorAggregation.java:56
@SqlType(BIGINT) long label,
@SqlType("map(bigint,double)") Block features)
{
input(state, (double) label, features);
}
@InputFunction
public static void input(
@AggregationState LearnState state,
@SqlType(DOUBLE) double label,
@SqlType("map(bigint,double)") Block features)
{
LearnLibSvmRegressorAggregation.input(state, label, features, Slices.utf8Slice(""));
}
@CombineFunction
public static void combine(@AggregationState LearnState state, @AggregationState LearnState otherState)
{
throw new UnsupportedOperationException("LEARN must run on a single machine");
}
@OutputFunction(RegressorType.NAME)
public static void output(@AggregationState LearnState state, BlockBuilder out)
{
LearnLibSvmRegressorAggregation.output(state, out);
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Run learn_regressor on a single node / single split
- Ensure no partial-aggregation plan is generated for this function
- Reduce input to one worker before training
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at presto-ml/src/main/java/com/facebook/presto/ml/LearnRegressorAggregation.java:56 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/838624eb91df8498.
Report an issue: GitHub.