When matching types, there can be a situation where no types are matched by the schema.
Using a concept variable that matches no types as a type in an isa produces an error.
Environment
TypeDB distribution: Core
TypeDB version: 2.26.6
Environment: macOS
Client and version: Studio 2.26.0
Other details:
Reproducible Steps
Set up
Any schema with no @key annotations.
The @key here is not of utmost importance, just a convenient way of matching no types.
Execute
match
$f isa! $type;
$type owns $a @key;
get;
Unexpected result
[QRY16] Invalid Query Pattern: Could not infer compatible types for the match pattern:
'{{ $type owns $a@@key;
$f isa! $type; }}'.
Expected result
Empty collection (iterator/stream).
Additional information
Relevant logs from TypeDB or Driver:
14:32:11.725 [typedb-service::0] ERROR com.vaticle.typedb.core.server.TransactionService -- [QRY16] Invalid Query Pattern: Could not infer compatible types for the match pattern:
'{{ $type owns $a@@key;
$f isa! $type; }}'.
I'm not sure why @ is duplicated in the server logs.
Description
When matching types, there can be a situation where no types are matched by the schema. Using a concept variable that matches no types as a type in an
isa
produces an error.Environment
Reproducible Steps
Any schema with no
@key
annotations. The@key
here is not of utmost importance, just a convenient way of matching no types.Expected result
Empty collection (iterator/stream).
Additional information
Relevant logs from TypeDB or Driver:
I'm not sure why @ is duplicated in the server logs.