Skip to content

Commit

Permalink
actually fix projection from sub-queries
Browse files Browse the repository at this point in the history
fixes #607 (for real this time)
  • Loading branch information
gromgull committed Jan 20, 2017
1 parent 0f38e7d commit b1113d7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 60 deletions.
6 changes: 6 additions & 0 deletions rdflib/plugins/sparql/algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,12 @@ def simplify(n):

def analyse(n, children):

"""
Some things can be lazily joined.
This propegates whether they can up the tree
and sets lazy flags for all joins
"""

if isinstance(n, CompValue):
if n.name == 'Join':
n["lazy"] = all(children)
Expand Down
2 changes: 1 addition & 1 deletion rdflib/plugins/sparql/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def evalLazyJoin(ctx, join):
for a in evalPart(ctx, join.p1):
c = ctx.thaw(a)
for b in evalPart(c, join.p2):
yield b
yield b.merge(a) # merge, as some bindings may have been forgotten


def evalJoin(ctx, join):
Expand Down
59 changes: 0 additions & 59 deletions test/test_issue607.py

This file was deleted.

0 comments on commit b1113d7

Please sign in to comment.