fdb-record-layer
fdb-record-layer copied to clipboard
RecordTypeKeyComparison fails if the included type is synthetic
The RecordTypeKeyComparison
operator fails if it operates on a synthetic record type because when it gets the comparand, it calls getRecordType
, which ignores synthetic types. This means that if there is an index scan on a synthetic record type that ends up including the record type key in its scan range, it will fail.
One way that I think this can show up is if you had an index on something like:
concat(field("a").nest("foo"), field("b").nest("bar))
On a synthetic type with "a" and "b" constituents. If you issue a query on:
Query.field("a").matches(Query.field("foo").equalsParameter(fooParam),
Query.field("b").matches(Query.field("bar").equalsParameter(barParam)