{"record":{"id":"16ce1046e5318d37","repo":"prestodb/presto","slug":"parse-error-connectorpartitioninghandle","errorCode":null,"errorMessage":"{parse_error} ConnectorPartitioningHandle","messagePattern":"(.+?) ConnectorPartitioningHandle","errorType":"validation","errorClass":"ParseError","httpStatus":null,"severity":"error","filePath":"presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp","lineNumber":3167,"sourceCode":"void to_json(json& j, const std::shared_ptr<ConnectorPartitioningHandle>& p) {\n  if (p == nullptr) {\n    return;\n  }\n  String type = p->_type;\n\n  if (type == \"$remote\") {\n    j = *std::static_pointer_cast<SystemPartitioningHandle>(p);\n    return;\n  }\n  getConnectorProtocol(type).to_json(j, p);\n}\n\nvoid from_json(const json& j, std::shared_ptr<ConnectorPartitioningHandle>& p) {\n  String type;\n  try {\n    type = p->getSubclassKey(j);\n  } catch (json::parse_error& e) {\n    throw ParseError(std::string(e.what()) + \" ConnectorPartitioningHandle\");\n  }\n\n  if (j.contains(\"customSerializedValue\")) {\n    VELOX_CHECK(\n        !type.empty() && type[0] != '$',\n        \"Internal handle type '{}' should not have customSerializedValue\",\n        type);\n    std::string binaryData = velox::encoding::Base64::decode(\n        j[\"customSerializedValue\"].get<std::string>());\n    getConnectorProtocol(type).deserialize(binaryData, p);\n    return;\n  }\n\n  if (type == \"$remote\") {\n    auto k = std::make_shared<SystemPartitioningHandle>();\n    j.get_to(*k);\n    p = k;\n    return;","sourceCodeStart":3149,"sourceCodeEnd":3185,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp#L3149-L3185","documentation":"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.","triggerScenarios":"Thrown at presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp:3167 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure Java coordinator and Velox worker protocol versions match","Check that the serialized connector handle comes from a compatible connector","Reproduce with plan serialization enabled to inspect the offending JSON"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}