prestodb/presto · error · PinotException

PINOT_DATA_FETCH_EXCEPTION

PINOT_DATA_FETCH_EXCEPTION

Error message

Encountered Pinot exceptions when fetching data table from Split: < %s >

What it means

While reading the gRPC server response payload into a DataTable in getNextPage, an IOException means the data fetch itself failed (malformed or truncated payload, transport problem). The connector wraps it as PINOT_DATA_FETCH_EXCEPTION with the split's segment query and the cause.

Source

Thrown at presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/PinotSegmentPageSource.java:212

            //   - 1 metadata of the query results.
            // So we need to check ResponseType of each ServerResponse.
            if (serverResponseIterator.hasNext()) {
                long startTimeNanos = System.nanoTime();
                Server.ServerResponse serverResponse = serverResponseIterator.next();
                readTimeNanos += System.nanoTime() - startTimeNanos;
                final String responseType = serverResponse.getMetadataOrThrow("responseType");
                switch (responseType) {
                    case CommonConstants.Query.Response.ResponseType.DATA:
                        estimatedMemoryUsageInBytes = serverResponse.getSerializedSize();
                        // Store each dataTable which will later be constructed into Pages.
                        try {
                            byteBuffer = serverResponse.getPayload().asReadOnlyByteBuffer();
                            DataTable dataTable = DataTableFactory.getDataTable(byteBuffer);
                            checkExceptions(dataTable, split, PinotSessionProperties.isMarkDataFetchExceptionsAsRetriable(session));
                            currentDataTable = new PinotSegmentPageSource.PinotDataTableWithSize(dataTable, serverResponse.getSerializedSize());
                        }
                        catch (IOException e) {
                            throw new PinotException(
                                PINOT_DATA_FETCH_EXCEPTION,
                                split.getSegmentPinotQuery(),
                                String.format("Encountered Pinot exceptions when fetching data table from Split: < %s >", split),
                                e);
                        }
                        break;
                    case CommonConstants.Query.Response.ResponseType.METADATA:
                        // The last part of the response is Metadata
                        currentDataTable = null;
                        serverResponseIterator = null;
                        close();
                        return null;
                    default:
                        throw new PinotException(
                            PINOT_UNEXPECTED_RESPONSE,
                            split.getSegmentPinotQuery(),
                            String.format("Encountered Pinot exceptions, unknown response type - %s", responseType));
                }

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Retry the query; this exception is classified as a data-fetch failure and may succeed on retry
  2. Check network stability and gRPC max message size settings between Presto and Pinot
  3. Verify Pinot broker/server and Presto connector client versions are compatible (DataTable serialization format)
  4. Inspect Pinot server logs for crashes or oversized responses; reduce page/batch size or narrow the query to shrink the payload
Defensive patterns

Strategy: retry

Try / catch

catch (PinotException e) {
    if (e.getErrorCode() == PINOT_DATA_FETCH_EXCEPTION.toErrorCode().getCode()) {
        // transient IO/grpc failure: retry with exponential backoff
        // if persistent, check network, gRPC limits, and version compatibility
    }
}

Prevention

When it happens

Trigger: DataTableFactory.getDataTable(byteBuffer) or reading serverResponse payload throws IOException during getNextPage's response processing.

Common situations: Network interruptions between broker/server and Presto worker, gRPC message size limits truncating payloads, Pinot server crashes mid-response, or deserialization incompatibilities across Pinot client/server versions.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/0a7c560d769ac4fb. Report an issue: GitHub.