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

Fixed a Bug that caused externalized entities to have multiple Ids. #462

Merged
merged 1 commit into from
Sep 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/index/VocabularyGeneratorImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ void VocabularyMerger::writeQueueWordsToIdVec(
} else {
// we have to strip the externalization character again
auto& c = _lastWritten[0];
// Keep a copy of the first character to later restore it.
auto originalFirstChar = c;
switch (c) {
case EXTERNALIZED_LITERALS_PREFIX_CHAR:
c = '"';
Expand All @@ -177,6 +179,9 @@ void VocabularyMerger::writeQueueWordsToIdVec(
_outfileExternal << RdfEscaping::escapeNewlinesAndBackslashes(
_lastWritten)
<< '\n';
// restore the original value, so that the check _lastWritten ==
// top.value above works again.
c = originalFirstChar;
}

// write id to corresponding vec
Expand Down