prestodb/presto · error · UnsupportedOperationException

Unknown Pinot split type: %s

Error message

Unknown Pinot split type: %s

What it means

Pinot splits come in several types (e.g. broker splits and segment splits), and createPageSource dispatches on the split type with a switch. If the connector encounters a PinotSplit whose split type is not one of the handled cases, it throws this UnsupportedOperationException. This indicates an internal inconsistency rather than a user error: a split kind the provider was never written to serve.

Source

Thrown at presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/PinotPageSourceProvider.java:107

            case SEGMENT:
                return new PinotSegmentPageSource(
                    session,
                    pinotConfig,
                    pinotStreamingQueryClient,
                    pinotSplit,
                    handles);
            case BROKER:
                return new PinotBrokerPageSource(
                    pinotConfig,
                    session,
                    pinotSplit.getBrokerPinotQuery().get(),
                    handles,
                    pinotSplit.getExpectedColumnHandles(),
                    clusterInfoFetcher,
                    objectMapper,
                    brokerAuthenticationProvider);
            default:
                throw new UnsupportedOperationException("Unknown Pinot split type: " + pinotSplit.getSplitType());
        }
    }

    @VisibleForTesting
    static GrpcConfig extractGrpcQueryClientConfig(PinotConfig config)
    {
        Map<String, Object> target = new HashMap<>();
        target.put(CONFIG_USE_PLAIN_TEXT, !config.isUseSecureConnection());
        target.put(CONFIG_MAX_INBOUND_MESSAGE_BYTES_SIZE, config.getStreamingServerGrpcMaxInboundMessageBytes());
        if (config.isUseSecureConnection()) {
            setOrRemoveProperty(target, "tls.keystore.path", config.getGrpcTlsKeyStorePath());
            setOrRemoveProperty(target, "tls.keystore.password", config.getGrpcTlsKeyStorePassword());
            setOrRemoveProperty(target, "tls.keystore.type", config.getGrpcTlsKeyStoreType());
            setOrRemoveProperty(target, "tls.truststore.path", config.getGrpcTlsTrustStorePath());
            setOrRemoveProperty(target, "tls.truststore.password", config.getGrpcTlsTrustStorePassword());
            setOrRemoveProperty(target, "tls.truststore.type", config.getGrpcTlsTrustStoreType());
        }
        return new GrpcConfig(target);

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Ensure all Presto nodes (coordinator and workers) run the same plugin/connector version so split types are consistent
  2. Rebuild/redeploy the pinot toolkit so the switch handles every PinotSplitType value
  3. Check for stale worker processes serving an old jar after an upgrade; restart the full cluster
  4. If you added a custom split type, add a corresponding case in the switch that builds the right PageSource

Example fix

// before
default:
    throw new UnsupportedOperationException("Unknown Pinot split type: " + pinotSplit.getSplitType());
// after
case SEGMENT:
    return createSegmentPageSource(...);
case BROKER:
    return new PinotBrokerPageSource(...);
default:
    throw new UnsupportedOperationException("Unknown Pinot split type: " + pinotSplit.getSplitType());
Defensive patterns

Strategy: validation

Validate before calling

// before submitting, ensure the split type is one the connector serves
if (split instanceof PinotSplit) {
    PinotSplitType type = ((PinotSplit) split).getSplitType();
    if (type != PinotSplitType.BROKER && type != PinotSplitType.SEGMENT) {
        throw new IllegalStateException("Unsupported split type: " + type);
    }
}

Type guard

boolean isSupportedSplit(PinotSplit s) {
    return s.getSplitType() == PinotSplitType.BROKER || s.getSplitType() == PinotSplitType.SEGMENT;
}

Prevention

When it happens

Trigger: A PinotSplit with a new or unexpected PinotSplitType reaches PinotPageSourceProvider.createPageSource and falls into the switch's default branch.

Common situations: Running a coordinator/worker with mismatched plugin versions where a newer split type is generated upstream; custom forks that add split types; classpath mixing of different connector builds.

Related errors


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