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
- Retry the query; this exception is classified as a data-fetch failure and may succeed on retry
- Check network stability and gRPC max message size settings between Presto and Pinot
- Verify Pinot broker/server and Presto connector client versions are compatible (DataTable serialization format)
- 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
- Use retries with backoff for data-fetch exceptions
- Set gRPC max inbound message size large enough for full DataTable payloads
- Keep Pinot client/server and connector versions compatible; monitor network stability
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
- PINOT_DATA_FETCH_EXCEPTION_OR_PINOT_EXCEPTION
- PINOT_EXCEPTION
- PINOT_INVALID_SEGMENT_QUERY_GENERATED
- Only [SQL] Payload type is allowed:
- ARROW_FLIGHT_CLIENT_ERROR
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/0a7c560d769ac4fb.
Report an issue: GitHub.