prestodb/presto · error · ParseError

{parse_error} ConnectorPartitioningHandle

Error message

{parse_error} ConnectorPartitioningHandle

What it means

Velox (C++ presto_native) protocol deserialization error: reading the JSON for a ConnectorPartitioningHandle failed because the payload's type discriminator could not be parsed. The jjson parse_error message is prefixed with the class name; indicates a malformed/mismatched serialized plan fragment crossing the Java-to-native protocol boundary.

Source

Thrown at presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp:3167

void to_json(json& j, const std::shared_ptr<ConnectorPartitioningHandle>& p) {
  if (p == nullptr) {
    return;
  }
  String type = p->_type;

  if (type == "$remote") {
    j = *std::static_pointer_cast<SystemPartitioningHandle>(p);
    return;
  }
  getConnectorProtocol(type).to_json(j, p);
}

void from_json(const json& j, std::shared_ptr<ConnectorPartitioningHandle>& p) {
  String type;
  try {
    type = p->getSubclassKey(j);
  } catch (json::parse_error& e) {
    throw ParseError(std::string(e.what()) + " ConnectorPartitioningHandle");
  }

  if (j.contains("customSerializedValue")) {
    VELOX_CHECK(
        !type.empty() && type[0] != '$',
        "Internal handle type '{}' should not have customSerializedValue",
        type);
    std::string binaryData = velox::encoding::Base64::decode(
        j["customSerializedValue"].get<std::string>());
    getConnectorProtocol(type).deserialize(binaryData, p);
    return;
  }

  if (type == "$remote") {
    auto k = std::make_shared<SystemPartitioningHandle>();
    j.get_to(*k);
    p = k;
    return;

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Ensure Java coordinator and Velox worker protocol versions match
  2. Check that the serialized connector handle comes from a compatible connector
  3. Reproduce with plan serialization enabled to inspect the offending JSON
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp:3167 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/16ce1046e5318d37. Report an issue: GitHub.