{"record":{"id":"cadc36cbc535d5e6","repo":"prestodb/presto","slug":"parse-error-inputdistribution-inputdistribution","errorCode":null,"errorMessage":"{parse_error} InputDistribution  InputDistribution","messagePattern":"(.+?) InputDistribution  InputDistribution","errorType":"validation","errorClass":"ParseError","httpStatus":null,"severity":"error","filePath":"presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp","lineNumber":3861,"sourceCode":"  if (p == nullptr) {\n    return;\n  }\n  String type = p->_type;\n\n  if (type == \".BaseInputDistribution\") {\n    j = *std::static_pointer_cast<BaseInputDistribution>(p);\n    return;\n  }\n\n  throw TypeError(type + \" no abstract type InputDistribution \");\n}\n\nvoid from_json(const json& j, std::shared_ptr<InputDistribution>& p) {\n  String type;\n  try {\n    type = p->getSubclassKey(j);\n  } catch (json::parse_error& e) {\n    throw ParseError(\n        std::string(e.what()) + \" InputDistribution  InputDistribution\");\n  }\n\n  if (type == \".BaseInputDistribution\") {\n    std::shared_ptr<BaseInputDistribution> k =\n        std::make_shared<BaseInputDistribution>();\n    j.get_to(*k);\n    p = std::static_pointer_cast<InputDistribution>(k);\n    return;\n  }\n\n  throw TypeError(type + \" no abstract type InputDistribution \");\n}\n} // namespace facebook::presto::protocol\nnamespace facebook::presto::protocol {\nDeleteNode::DeleteNode() noexcept {\n  _type = \".DeleteNode\";\n}","sourceCodeStart":3843,"sourceCodeEnd":3879,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp#L3843-L3879","documentation":"Velox protocol deserialization error: extracting the subclass key of an InputDistribution from JSON threw a parse error. from_json wraps the json::parse_error with the InputDistribution tag, indicating a malformed serialized input-distribution entry in the plan fragment.","triggerScenarios":"Thrown at presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp:3861 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the serialized JSON contains the expected type field","Match Java and native protocol definitions for InputDistribution","Re-run without native execution to isolate the protocol mismatch"],"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"}