prestodb/presto · error · TypeError

{type} no abstract type ValueSet

Error message

{type} no abstract type ValueSet 

What it means

Velox protocol serialization error: serializing a ValueSet whose _type is none of equatable/sortable/allOrNone. to_json exhausts the known subclass branches and throws TypeError, meaning an unknown ValueSet variant reached the native protocol conversion.

Source

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

  if (p == nullptr) {
    return;
  }
  String type = p->_type;

  if (type == "equatable") {
    j = *std::static_pointer_cast<EquatableValueSet>(p);
    return;
  }
  if (type == "sortable") {
    j = *std::static_pointer_cast<SortedRangeSet>(p);
    return;
  }
  if (type == "allOrNone") {
    j = *std::static_pointer_cast<AllOrNoneValueSet>(p);
    return;
  }

  throw TypeError(type + " no abstract type ValueSet ");
}

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

  if (type == "equatable") {
    std::shared_ptr<EquatableValueSet> k =
        std::make_shared<EquatableValueSet>();
    j.get_to(*k);
    p = std::static_pointer_cast<ValueSet>(k);
    return;
  }
  if (type == "sortable") {

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Ensure only EquatableValueSet, SortedRangeSet, or AllOrNoneValueSet are serialized
  2. Add the missing ValueSet subclass to the native protocol
  3. Check TupleDomain construction producing the unexpected variant
Defensive patterns

Strategy: type-guard

When it happens

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