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

Double federated query does not work in v5 #5264

Open
davidkleiven opened this issue Mar 6, 2025 · 0 comments
Open

Double federated query does not work in v5 #5264

davidkleiven opened this issue Mar 6, 2025 · 0 comments
Labels
🐞 bug issue is a bug

Comments

@davidkleiven
Copy link

davidkleiven commented Mar 6, 2025

Current Behavior

For illustration purpuses a the following repo was populated with two triples

Image

The following query

select * {
 ?s ?p ?o .
 ?_repo1 <http://repo> ?repo1
 service ?repo1 {
   ?s ?p2 ?o2
  }
  
  optional {
    ?_repo2 <http://repo> ?repo2
    service ?repo2 {
      ?s ?p3 ?o3
    }
  }  
}

Fails with

Query evaluation error: SERVICE variables must be bound at evaluation time

But if I remove the last optional clause such that query becomes

select * {
  ?s ?p ?o .
  ?_repo1 <http://repo> ?repo1
   service ?repo1 {
     ?s ?p2 ?o2
    }
  
   ?_repo2 <http://repo> ?repo2
   service ?repo2 {
     ?s ?p3 ?o3
   } 
}

It returns successfully. Also if I remove the first federated call such that the query becomes

select * {
  ?s ?p ?o .
  optional {
    ?_repo2 <http://repo> ?repo2
    service ?repo2 {
       ?s ?p3 ?o3
      }
  }
}

it also works as expected. It appears like the issue started from v5.

Expected Behavior

Expected that the query with where one of the federations are inside an optional clause also works.

Steps To Reproduce

No response

Version

5.1.2

Are you interested in contributing a solution yourself?

Yes

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug issue is a bug
Projects
None yet
Development

No branches or pull requests

1 participant