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

XQuery: Check existence of paths in predicates #2109

Closed
ChristianGruen opened this issue May 21, 2022 · 0 comments
Closed

XQuery: Check existence of paths in predicates #2109

ChristianGruen opened this issue May 21, 2022 · 0 comments

Comments

@ChristianGruen
Copy link
Member

The following query…

db:open('factbook')/mondial/country/country

…will be rewritten to an empty sequence at compile time, because the country element has no country child elements.

The existence checks should be enhanced to also support steps with predicates…

db:open('factbook')/mondial/country/country[@population]

…and paths within predicates:

db:open('factbook')/mondial/country[country]

The optimizations could serve as preparatory step for #2069.

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

No branches or pull requests

1 participant