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

Optimize entity eq expressions for missing entity properties #6615

Open
seadowg opened this issue Feb 18, 2025 · 1 comment
Open

Optimize entity eq expressions for missing entity properties #6615

seadowg opened this issue Feb 18, 2025 · 1 comment

Comments

@seadowg
Copy link
Member

seadowg commented Feb 18, 2025

Currently, a predicate expression like missing_property = 'blah' or missing_property = 'blah' or other_property = 'blah' (where missing_property does not actually exist) will not be optimized by in the same way an expression for property that does exist is. That means that a form that uses an expression like this (possible to account for a later stage in the project) would end up loading the entire entity dataset into memory even though the expression is still value (a child that doesn't exist in XPath always evaluates to '').

This should be improved so that =/!= expressions against missing properties and and/or expressions containing them are still optimized.

@seadowg seadowg moved this to inbox in ODK Collect Feb 18, 2025
@lognaturel
Copy link
Member

lognaturel commented Feb 19, 2025

For expressions without and/or, there was a change going from v2024.3 (unknown properties handled in filter strategy) to v2025.1 (fall through to in-mem). It's likely not a serious performance issue because the case is most likely with empty lists.

@seadowg Can you please link to the code that handled missing properties for expressions without and/or? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: inbox
Development

No branches or pull requests

2 participants