Skip to content

Commit

Permalink
Fix matching of records with predicate variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
kenwenzel committed Dec 17, 2024
1 parent aaebd58 commit 5986330
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ static Value toRdfValue(Object value, ValueFactory vf) {
Base64.getEncoder().encodeToString(idStr.getBytes(StandardCharsets.UTF_8)));
default:
// do not convert the reference to an IRI
// drop id string
idStr = null;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,12 @@ public CloseableIteration<BindingSet, QueryEvaluationException> evaluate(Stateme

@Override
public boolean hasNext() throws QueryEvaluationException {
if (next == null && it.hasNext()) {
while (next == null && it.hasNext()) {
Record r = it.next();
Value newObjectValue = toRdfValue(r.getValue());
if (objectValue != null && !objectValue.equals(newObjectValue)) {
return false;
// try next value
continue;
}

CompositeBindingSet newBs = new CompositeBindingSet(bs);
Expand Down

0 comments on commit 5986330

Please sign in to comment.