Use a more sophisticated representation of datoms to insert in order to detect errors #180

Open
opened 2020-08-06 16:56:16 +00:00 by gburd · 0 comments
gburd commented 2020-08-06 16:56:16 +00:00 (Migrated from github.com)

#531 is the original issue. #533 made it so that an error is thrown, but it's not a useful error: it's very internal. It would be better to detect the two datoms that failed.

One way to do this is to build a trie of e -> a -> v instead of a vector of ReducedEntity, which not only eliminates duplication and perhaps gives us a more efficient time with insertion, but also lets us exactly detect duplicates. If we can build this trie as part of the last transact generation pass, then this might be cheap or even a saving.

#531 is the original issue. #533 made it so that an error is thrown, but it's not a useful error: it's very internal. It would be better to detect the two datoms that failed. One way to do this is to build a trie of `e -> a -> v` instead of a vector of `ReducedEntity`, which not only eliminates duplication and perhaps gives us a more efficient time with insertion, but also lets us exactly detect duplicates. If we can build this trie as part of the last transact generation pass, then this might be cheap or even a saving.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/mentat#180
No description provided.