We're updating the issue view to help you get more done. 

GroupGraphPattern with non-optional after optional not processed correctly

Description

Example query:

1 2 3 4 5 6 PREFIX : <http://example.org/> SELECT * WHERE { ?s :p1 ?v1 . OPTIONAL {?s :p2 ?v2 } . ?s :p3 ?v2 }

results in the following algebra:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 LeftJoin Join StatementPattern Var (name=s) Var (name=-const-1, value=http://example.org/p1, anonymous) Var (name=v1) StatementPattern Var (name=s) Var (name=-const-3, value=http://example.org/p3, anonymous) Var (name=v2) StatementPattern Var (name=s) Var (name=-const-2, value=http://example.org/p2, anonymous) Var (name=v2)

but it should be:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 Join LeftJoin StatementPattern Var (name=s) Var (name=-const-1, value=http://example.org/p1, anonymous) Var (name=v1) StatementPattern Var (name=s) Var (name=-const-2, value=http://example.org/p2, anonymous) Var (name=v2) StatementPattern Var (name=s) Var (name=-const-3, value=http://example.org/p3, anonymous) Var (name=v2)

Environment

None

Status

Assignee

JeenB

Reporter

JeenB

Labels

None

Components

Fix versions

Affects versions

2.7.3

Priority

Major