-
-
Notifications
You must be signed in to change notification settings - Fork 322
Closed
Milestone
Description
The current way the frontend handles lineage is incorrect. Fixing lineage will require #2258 because of collector.
How lineage affects connectability is described by this pseudocode:
let sourceL = getLineage(sourceNode);
if (isIterator(targetNode)) {
// the inputs of iterator nodes only allow non-iterator connections
return sourceL === undefined ? CONNECTABLE : INVALID;
}
if (isRegularNode(targetNode)) {
if (sourceL === undefined) return CONNECTABLE;
let targetL = getLineage(targetNode, excluded=targetInput)
return targetL === undefined || targetL === sourceL ? CONNECTABLE : INVALID;
}
assert(isCollector(targetNode));
if (isIteratorInput(targetInput)) {
if (sourceL === undefined) return INVALID;
let targetL = getLineage(targetNode.iteratorInputs, excluded=targetInput)
return targetL === undefined || targetL === sourceL ? CONNECTABLE : INVALID;
} else {
// the non-iterator inputs of collector nodes only allow non-iterator connections
return sourceL === undefined ? CONNECTABLE : INVALID;
}
Metadata
Metadata
Assignees
Labels
No labels