prestodb/presto · error · PrestoException

GENERIC_INTERNAL_ERROR

GENERIC_INTERNAL_ERROR

Error message

GENERIC_INTERNAL_ERROR

What it means

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.

Source

Thrown at presto-main-base/src/main/java/com/facebook/presto/type/DecimalInequalityOperators.java:257

    {
        if (leftNull != rightNull) {
            return true;
        }
        if (leftNull) {
            return false;
        }
        return primitiveLongLong(left, right, IS_RESULT_NOT_EQUAL);
    }

    private static boolean invokeGetResult(MethodHandle getResultMethodHandle, int comparisonResult)
    {
        try {
            return (boolean) getResultMethodHandle.invokeExact(comparisonResult);
        }
        catch (Throwable t) {
            throwIfInstanceOf(t, Error.class);
            throwIfInstanceOf(t, PrestoException.class);
            throw new PrestoException(GENERIC_INTERNAL_ERROR, t);
        }
    }

    private static SqlScalarFunction betweenOperator()
    {
        Signature signature = SignatureBuilder.builder()
                .kind(SCALAR)
                .operatorType(BETWEEN)
                .argumentTypes(DECIMAL_SIGNATURE, DECIMAL_SIGNATURE, DECIMAL_SIGNATURE)
                .returnType(parseTypeSignature(BOOLEAN))
                .build();
        return SqlScalarFunction.builder(DecimalInequalityOperators.class, BETWEEN)
                .signature(signature)
                .deterministic(true)
                .choice(choice -> choice
                        .implementation(methodsGroup -> methodsGroup
                                .methods("betweenShortShortShort", "betweenLongLongLong")))
                .build();

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Report as a Presto bug with the query and stack trace
  2. Check for mismatched decimal comparison operator bindings in custom plugins
  3. Retry the query on a clean cluster to rule out JIT/generated-code corruption
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at presto-main-base/src/main/java/com/facebook/presto/type/DecimalInequalityOperators.java:257 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/31641498609628fd. Report an issue: GitHub.