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

Use local vocabulary for VALUES clause #822

Merged
merged 3 commits into from
Nov 12, 2022
Merged

Conversation

hannahbast
Copy link
Member

So far, a row of a VALUES clause was ignored when one of the values did not occur in the normal vocabulary and could not be folded into an ID (like an integer or a double). Now all rows are considered and such OOV values are added to the local vocabulary.

On the side, the SPARQL parser for the VALUES clause is modified so that it does not produce a std::string for each value like it did so far, but a TripleComponent.

@hannahbast hannahbast force-pushed the values-with-local-vocab branch 2 times, most recently from 302bfab to 0d66199 Compare November 11, 2022 01:33
So far, a row of a VALUES clause was ignored when one of the values did not
occur in the normal vocabulary and could not be folded into an ID (like
an integer or a double). Now all rows are considered, and such OOV
values are added to the local vocabulary.

On the side, the SPARQL parser for the VALUES clause is modified so that
it does not produce an `std::string` for each value, like it did so far,
but a `TripleComponent`.
Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like your improvements very much.
I found some places next to the code you touch that you could improve along the way.
Most of it was not written by you, but I encourage everyone to also make the existing parts of the code better along the way (and so do you).

Refactoring the surrounding code was significantly more work than
expected.
Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice,
I only have one comment (Answer to a TODO) and two very minor suggestions in the parser.
Otherwise the code quality is now much much better, thank you.

@hannahbast
Copy link
Member Author

Thanks a lot for this very productive review. I have addressed your final comments, will wait for all our seven build tests to go through without errors, and then merge this PR into the master.

Copy link
Member

@joka921 joka921 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
Feel free to merge it as soon as the tests have finished.

@hannahbast hannahbast merged commit b8a4b3a into master Nov 12, 2022
@hannahbast hannahbast deleted the values-with-local-vocab branch November 12, 2022 15:47
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

Successfully merging this pull request may close these issues.

2 participants