{"record":{"id":"b7258d103c3719ef","repo":"prestodb/presto","slug":"type-no-abstract-type-inputdistribution","errorCode":null,"errorMessage":"{type} no abstract type InputDistribution ","messagePattern":"(.+?) no abstract type InputDistribution ","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp","lineNumber":3853,"sourceCode":"      p.schemaTableName,\n      \"DeleteHandle\",\n      \"SchemaTableName\",\n      \"schemaTableName\");\n}\n} // namespace facebook::presto::protocol\nnamespace facebook::presto::protocol {\nvoid to_json(json& j, const std::shared_ptr<InputDistribution>& p) {\n  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  }","sourceCodeStart":3835,"sourceCodeEnd":3871,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp#L3835-L3871","documentation":"Velox protocol serialization error: serializing an InputDistribution whose _type discriminator is not '.BaseInputDistribution' (the only known subclass). to_json falls through all recognized branches and throws TypeError, meaning an unknown InputDistribution subclass reached the native protocol layer.","triggerScenarios":"Thrown at presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp:3853 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure only BaseInputDistribution instances are used in native plans","Add the missing subclass to the C++ protocol mapping","Check for protocol drift between Java and presto_cpp versions"],"exampleFix":null,"handlingStrategy":"type-guard","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"}