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

ondisk not working #280

Closed
luigi-asprino opened this issue Jul 30, 2022 · 8 comments
Closed

ondisk not working #280

luigi-asprino opened this issue Jul 30, 2022 · 8 comments
Labels
Bug Something isn't working
Milestone

Comments

@luigi-asprino
Copy link
Member

This query

PREFIX  fx:   <http://sparql.xyz/facade-x/ns/>

SELECT  *
WHERE
  { SERVICE <x-sparql-anything:location=https://sparql-anything.cc/example1.json,ondisk=/Users/lgu/Desktop/tmp>
      { ?s  ?p  ?o }
  }

gives

-------------
| s | p | o |
=============
-------------

After inspecting the code I discovered that in the case of ondisk set, the query has to indicate the graph to be queried.
We can ignore for a moment that the query is supposed to give the same result with and without the ondisk set, but this

PREFIX  fx:   <http://sparql.xyz/facade-x/ns/>

SELECT  *
WHERE
  { SERVICE <x-sparql-anything:location=https://sparql-anything.cc/example1.json,ondisk=/Users/lgu/Desktop/tmp>
      { GRAPH <https://sparql-anything.cc/example1.json#>
          { ?s  ?p  ?o }
      }
  }

raises an exception org.apache.jena.dboe.transaction.txn.TransactionException: Not in a transaction.

Probably, this is because the FacadeXOpExecutor doesn't start a READ transaction before executing the operation.

luigi-asprino added a commit that referenced this issue Jul 30, 2022
@luigi-asprino
Copy link
Member Author

With this the OpExecutor starts a Read transaction before executing the query. I leave the issue open since I would like to avoid the user indicating the graph to be queried (as for the queries without ondisk property).

@justin2004
Copy link
Contributor

oh, for on ondisk you must do graph ?g -- that is you can't query the union graph like you can with an in memory graph.
i put a comment in the code about it. i'll find it.

@justin2004
Copy link
Contributor

justin2004 commented Jul 30, 2022

i tried to make ondisk behave just like in memory but it turned out that getUnionGraph() isn't implemented for the DatasetGraph used when you use a TDB2 on disk.

i almost opened an apache jena bug because i remember thinking it looks like it should be implemented.

luigi-asprino added a commit that referenced this issue Jul 31, 2022
@luigi-asprino
Copy link
Member Author

I tried to set the global property symUnionDefaultGraph as true as suggested here but didn't work.
Then, I made the OpExecutor execute the query on the union graph (in case of ondisk set) and it seems to be working

@luigi-asprino
Copy link
Member Author

Closed via 6a1b0e1

@enridaga enridaga added this to the v0.8.0 milestone Aug 1, 2022
@enridaga enridaga added the Bug Something isn't working label Aug 1, 2022
@luigi-asprino
Copy link
Member Author

Doesn't work when passing arguments in the BGP.

@luigi-asprino luigi-asprino reopened this Aug 8, 2022
luigi-asprino added a commit that referenced this issue Aug 8, 2022
luigi-asprino added a commit that referenced this issue Aug 8, 2022
@luigi-asprino
Copy link
Member Author

Closed with 29b08b1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants