prestodb/presto · error · IllegalArgumentException

Unknown page format: %s

Error message

Unknown page format: %s

What it means

Page-format dispatch in the gRPC UDF executor: the requested GrpcUdfPageFormat matches neither the Presto (block-encoding) nor the other handled format, so input pages cannot be serialized for the UDF call.

Source

Thrown at presto-grpc-api/src/main/java/com/facebook/presto/grpc/GrpcSqlFunctionExecutor.java:158

        }
        return resultFuture;
    }

    private GrpcUdfPage buildGrpcUdfPage(Page input, List<Integer> channels, GrpcUdfPageFormat grpcUdfPageFormat)
    {
        Block[] blocks = new Block[channels.size()];
        for (int i = 0; i < channels.size(); i++) {
            blocks[i] = input.getBlock(channels.get(i));
        }

        switch (grpcUdfPageFormat) {
            case Presto:
                checkState(blockEncodingSerde != null, "blockEncodingSerde not set");
                Page inputPage = wrapBlocksWithoutCopy(input.getPositionCount(), blocks);
                GrpcSerializedPage grpcSerializedPage = toGrpcSerializedPage(blockEncodingSerde, inputPage);
                return toGrpcUdfPage(grpcUdfPageFormat, grpcSerializedPage);
            default:
                throw new IllegalArgumentException(format("Unknown page format: %s", grpcUdfPageFormat));
        }
    }

    private SqlFunctionResult toSqlFunctionResult(GrpcUdfResult grpcUdfResult)
    {
        checkState(blockEncodingSerde != null, "blockEncodingSerde not set");
        GrpcUdfPage grpcUdfPage = grpcUdfResult.getResult();

        switch (grpcUdfPage.getGrpcUdfPageFormat()) {
            case Presto:
                Page resultPage = toPrestoPage(blockEncodingSerde, grpcUdfPage.getGrpcSerializedPage());
                return new SqlFunctionResult(resultPage.getBlock(0), grpcUdfResult.getUdfStats().getTotalCpuTimeMs());
            default:
                throw new IllegalArgumentException(format("Unknown page format: %s", grpcUdfPage.getGrpcUdfPageFormat()));
        }
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Set a supported gRPC UDF page format in the configuration
  2. Ensure client and server agree on the page format value
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at presto-grpc-api/src/main/java/com/facebook/presto/grpc/GrpcSqlFunctionExecutor.java:158 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/ae752ed8be275e1d. Report an issue: GitHub.