Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RecordTypeKeyComparison fails if the included type is synthetic #2586

Open
alecgrieser opened this issue Mar 15, 2024 · 0 comments
Open

RecordTypeKeyComparison fails if the included type is synthetic #2586

alecgrieser opened this issue Mar 15, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@alecgrieser
Copy link
Contributor

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)
@alecgrieser alecgrieser added the bug Something isn't working label Mar 15, 2024
@alecgrieser alecgrieser self-assigned this Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant