{"record":{"id":"7098ac51d0fe2ed5","repo":"prestodb/presto","slug":"learn-must-run-on-a-single-machine-7098ac","errorCode":null,"errorMessage":"LEARN must run on a single machine","messagePattern":"LEARN must run on a single machine","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"presto-ml/src/main/java/com/facebook/presto/ml/LearnVarcharClassifierAggregation.java","lineNumber":46,"sourceCode":"\n@AggregationFunction(value = \"learn_classifier\", decomposable = false)\npublic final class LearnVarcharClassifierAggregation\n{\n    private LearnVarcharClassifierAggregation() {}\n\n    @InputFunction\n    public static void input(\n            @AggregationState LearnState state,\n            @SqlType(VARCHAR) Slice label,\n            @SqlType(\"map(bigint,double)\") Block features)\n    {\n        LearnLibSvmVarcharClassifierAggregation.input(state, label, features, Slices.utf8Slice(\"\"));\n    }\n\n    @CombineFunction\n    public static void combine(@AggregationState LearnState state, @AggregationState LearnState otherState)\n    {\n        throw new UnsupportedOperationException(\"LEARN must run on a single machine\");\n    }\n\n    @OutputFunction(\"Classifier<varchar>\")\n    public static void output(@AggregationState LearnState state, BlockBuilder out)\n    {\n        LearnLibSvmVarcharClassifierAggregation.output(state, out);\n    }\n}\n","sourceCodeStart":28,"sourceCodeEnd":55,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-ml/src/main/java/com/facebook/presto/ml/LearnVarcharClassifierAggregation.java#L28-L55","documentation":"Unsupported-operation guard in LearnVarcharClassifierAggregation.combine: learn_classifier with varchar labels is non-decomposable, so merging partial aggregation states is unsupported. Encountering it indicates the planner attempted distributed execution of the SVM training.","triggerScenarios":"Thrown at presto-ml/src/main/java/com/facebook/presto/ml/LearnVarcharClassifierAggregation.java:46 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Execute the learn_classifier aggregation on a single machine","Feed a single pre-merged input to the training function","Avoid query shapes that produce partial aggregation for non-decomposable functions"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}