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

Avoid using equality index for non-string values #753

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

seadowg
Copy link
Member

@seadowg seadowg commented Mar 4, 2024

Fixes the problem described in this forum post.

What has been done to verify that this works as intended?

New tests.

Why is this the best possible solution? Were any other approaches considered?

We could probably handle non-string values in our equality index, but we need to be really careful around how we carry out coercion to keep things consistent with XPathEqExpr#eval - I think that's something we can layer on later.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

This will fix the described issue, but will also make predicates that use non-string equality expressions slower. I'd imagine the most common cases will be similar to the one in the new test: an integer question being compared to an untyped select choice node.

@seadowg seadowg marked this pull request as ready for review March 4, 2024 18:06
@seadowg seadowg requested a review from lognaturel March 4, 2024 18:06
@seadowg seadowg changed the title Avoid using eq index for non-string values Avoid using equality index for non-string values Mar 4, 2024
@lognaturel lognaturel merged commit cff9f58 into getodk:master Mar 5, 2024
3 checks passed
@seadowg seadowg deleted the int-predicate branch March 8, 2024 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants