{"record":{"id":"31641498609628fd","repo":"prestodb/presto","slug":"generic-internal-error-316414","errorCode":"GENERIC_INTERNAL_ERROR","errorMessage":"GENERIC_INTERNAL_ERROR","messagePattern":"GENERIC_INTERNAL_ERROR","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-main-base/src/main/java/com/facebook/presto/type/DecimalInequalityOperators.java","lineNumber":257,"sourceCode":"    {\n        if (leftNull != rightNull) {\n            return true;\n        }\n        if (leftNull) {\n            return false;\n        }\n        return primitiveLongLong(left, right, IS_RESULT_NOT_EQUAL);\n    }\n\n    private static boolean invokeGetResult(MethodHandle getResultMethodHandle, int comparisonResult)\n    {\n        try {\n            return (boolean) getResultMethodHandle.invokeExact(comparisonResult);\n        }\n        catch (Throwable t) {\n            throwIfInstanceOf(t, Error.class);\n            throwIfInstanceOf(t, PrestoException.class);\n            throw new PrestoException(GENERIC_INTERNAL_ERROR, t);\n        }\n    }\n\n    private static SqlScalarFunction betweenOperator()\n    {\n        Signature signature = SignatureBuilder.builder()\n                .kind(SCALAR)\n                .operatorType(BETWEEN)\n                .argumentTypes(DECIMAL_SIGNATURE, DECIMAL_SIGNATURE, DECIMAL_SIGNATURE)\n                .returnType(parseTypeSignature(BOOLEAN))\n                .build();\n        return SqlScalarFunction.builder(DecimalInequalityOperators.class, BETWEEN)\n                .signature(signature)\n                .deterministic(true)\n                .choice(choice -> choice\n                        .implementation(methodsGroup -> methodsGroup\n                                .methods(\"betweenShortShortShort\", \"betweenLongLongLong\")))\n                .build();","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/type/DecimalInequalityOperators.java#L239-L275","documentation":"Internal-error sentinel from invokeGetResult: invoking the comparison-result transformation MethodHandle threw an unexpected Throwable (not an Error or PrestoException). It is rethrown as GENERIC_INTERNAL_ERROR — this indicates an engine bug or corrupted generated operator, not user input.","triggerScenarios":"Thrown at presto-main-base/src/main/java/com/facebook/presto/type/DecimalInequalityOperators.java:257 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Report as a Presto bug with the query and stack trace","Check for mismatched decimal comparison operator bindings in custom plugins","Retry the query on a clean cluster to rule out JIT/generated-code corruption"],"exampleFix":null,"handlingStrategy":"try-catch","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"}