( Reported by @james-whiteside )
A null pointer exception is encountered in a schema transaction when 1. a rule is defined and 2. A type which is in the set of inferred types of some variable in the said rule is undefined.
Environment
TypeDB distribution: Core
TypeDB version: 2.26.6
Environment: Mac
Client and version: Any
Other details:
Reproducible Steps
Set up
Define the schema (attached).
Execute
Execute the following queries in the same transaction. The bug is thrown when the transaction is committed.
define
rule transitive-location:
when {
(location: $parent-place, located: $child-place) isa locating;
(location: $child-place, located: $x) isa locating;
} then {
(location: $parent-place, located: $x) isa locating;
};
undefine
indirect-locating sub locating;
3. Unexpected result
A null pointer exception is thrown and the commit is aborted.
## Expected result
Successfully commits the rule & undefines the type as would be if two separate transactions were used.
## Additional information
`TypeGraph::Statistics::outRelates(Stream<TypeVertex>)` receives a null from the stream.
Description
( Reported by @james-whiteside ) A null pointer exception is encountered in a schema transaction when 1. a rule is defined and 2. A type which is in the set of inferred types of some variable in the said rule is undefined.
Environment
Reproducible Steps
Set up Define the schema (attached).
Execute Execute the following queries in the same transaction. The bug is thrown when the transaction is committed.
undefine indirect-locating sub locating;