{"record":{"id":"ed85e0cf2083f6e1","repo":"prestodb/presto","slug":"invalid-function-argument-ed85e0","errorCode":"INVALID_FUNCTION_ARGUMENT","errorMessage":"In differential_entropy UDF, invalid method: %s","messagePattern":"In differential_entropy UDF, invalid method: (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-main-base/src/main/java/com/facebook/presto/operator/aggregation/differentialentropy/DifferentialEntropyStateStrategy.java","lineNumber":57,"sourceCode":"    static DifferentialEntropyStateStrategy getStrategy(\n            DifferentialEntropyStateStrategy strategy,\n            long size,\n            double sample,\n            double weight,\n            String method,\n            double min,\n            double max)\n    {\n        if (strategy == null) {\n            switch (method) {\n                case DifferentialEntropyStateStrategy.FIXED_HISTOGRAM_MLE_METHOD_NAME:\n                    strategy = new FixedHistogramMleStateStrategy(size, min, max);\n                    break;\n                case DifferentialEntropyStateStrategy.FIXED_HISTOGRAM_JACKNIFE_METHOD_NAME:\n                    strategy = new FixedHistogramJacknifeStateStrategy(size, min, max);\n                    break;\n                default:\n                    throw new PrestoException(\n                            INVALID_FUNCTION_ARGUMENT,\n                            format(\"In differential_entropy UDF, invalid method: %s\", method));\n            }\n        }\n        else {\n            switch (method) {\n                case DifferentialEntropyStateStrategy.FIXED_HISTOGRAM_MLE_METHOD_NAME:\n                    if (!(strategy instanceof FixedHistogramMleStateStrategy)) {\n                        throw new PrestoException(\n                                INVALID_FUNCTION_ARGUMENT,\n                                format(\"In differential_entropy, strategy class is not compatible with entropy method: %s %s\", strategy.getClass().getSimpleName(), method));\n                    }\n                    break;\n                case DifferentialEntropyStateStrategy.FIXED_HISTOGRAM_JACKNIFE_METHOD_NAME:\n                    if (!(strategy instanceof FixedHistogramJacknifeStateStrategy)) {\n                        throw new PrestoException(\n                                INVALID_FUNCTION_ARGUMENT,\n                                format(\"In differential_entropy, strategy class is not compatible with entropy method: %s %s\", strategy.getClass().getSimpleName(), method));","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/operator/aggregation/differentialentropy/DifferentialEntropyStateStrategy.java#L39-L75","documentation":"Validation in DifferentialEntropyStateStrategy.getStrategy: the 'method' argument of differential_entropy does not match any known strategy name (fixed histogram MLE/Jackknife, vector ML, etc.), so no state strategy can be constructed for the call.","triggerScenarios":"Thrown at presto-main-base/src/main/java/com/facebook/presto/operator/aggregation/differentialentropy/DifferentialEntropyStateStrategy.java:57 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the documented method names (e.g. 'fixed_histogram_mle', 'fixed_histogram_jackknife')","Check for typos and case sensitivity in the method string argument","Omit the method argument to use the default strategy"],"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"}