Skip to content

[Bug] Diagram editor errors when using named keys to Join #170

@mxgrey

Description

@mxgrey

The join operation supports joining messages from buffers based on name (to create structs/maps) or based on sequence (to create vectors or tuples). The UI of the diagram editor is made to support either, but an overly eager exception makes it impossible to use named keys.

To reproduce the problem, follow these steps:

  • Open the diagram editor
  • Create a Join operation
  • Create two buffer operations
  • Connect each buffer to the join
  • Click the edge from either buffer to the join
  • Under Slot, change Index to Key

Depending on which buffer you changed, you'll get one of these two exceptions:

After the exception is thrown, the editor crashes, making it impossible to use keys in the join operation.

Instead of an exception, the change from index to key or vice-versa should either:

  1. Update all the other connections into the Join operation to match the Slot type.
  2. Highlight that an error exists in the diagram until all the connections match. The ability to export diagrams needs to be blocked or diminished (e.g. can't export the connections of the broken Join) until the issue is resolved.

An alternative solution would be to toggle between named keys and sequential keys from inside the Join operation itself and then update the state of all connections into it accordingly.

As an alternative to any of the above, we could update the BufferSelection schema to support a mix of indices and keys. This is technically something the executor is able to support, but so far there isn't any data structure that makes sense to join with a combination of indices and named fields, so having a mix of the two is almost certainly a user error.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions