Hi, Adina,

Thanks for the pointer, and I wish I had seen this prior to starting my effort. 
My work is essentially complete with the exception of the aforementioned defect 
in applying default and named graph filters, and it covers pretty much that 
entire Jira issue. I have no way of contacting Jurgen, as I only have read 
access to the JIRA instance you linked, but it seems that no work has been done 
on that 'In Progress' issue for more than 6 months.


Boris

________________________________
From: Adina Crainiceanu <ad...@usna.edu>
Sent: Wednesday, December 5, 2018 9:32:17 AM
To: dev@rya.incubator.apache.org
Subject: Re: Dataset not applied to queries

Hi Boris,

There is some work currently being done on the SPARQL endpoint by Jurgen in
RYA-477 https://issues.apache.org/jira/browse/RYA-477
Let's make sure we discuss there ideas and design decisions on the dev
list. I would hate if someone's work gets duplicated. In general, please
check whether a JIRA issue for the bug/desired feature does not already
exist https://issues.apache.org/jira/browse/RYA. If it does, collaborate
with the person assigned to that issue (if any) or assign the issue to
yourself (if none assigned). If not, create the issue and assign it to
yourself. If you cannot assign an issue to yourself, send a message to the
dev list with the Jira username, so you can be added to the list of
contributors in JIRA.

Looking forward to your contributions!
Adina



On Tue, Dec 4, 2018 at 11:16 AM Puja Valiyil <puja...@gmail.com> wrote:

> I can definitely take a look, but Aaron would also be a good person if its
> mostly using Accumulo backed Rya.  You're touching core Rya classes so the
> more eyes the better!
>
> On Tue, Dec 4, 2018 at 10:14 AM Boris Pelakh <
> boris.pel...@semanticarts.com>
> wrote:
>
> > Thanks, Puja, that's very helpful. I am making the changes in a forked
> > repo, would I assign pull requests to you once I am finished?
> >
> > Boris Pelakh
> > Ontologist, Developer, Software Architect
> > boris.pel...@semanticarts.com
> > +1-321-243-3804
> >
> >
> > -----Original Message-----
> > From: Puja Valiyil <puja...@gmail.com>
> > Sent: Tuesday, December 4, 2018 10:12 AM
> > To: dev@rya.incubator.apache.org
> > Subject: Re: Dataset not applied to queries
> >
> > Hi Boris,
> > The execution of the query plan is done by the
> ParallelEvaluationStrategy:
> >
> >
> https://github.com/apache/incubator-rya/blob/master/sail/src/main/java/org/apache/rya/rdftriplestore/evaluation/ParallelEvaluationStrategyImpl.java
> >
> > It looks like whoever did the rdf4j upgrade updated that class to take
> the
> > dataset object in its constructor, but it doesn't seem to be used
> anywhere
> > in query evaluation.  That would be the class to modify,  but I'm still
> not
> > clear on what the changes would look like since I'm not familiar with
> what
> > the contract is supposed to be.
> >
> >
> >
> > On Tue, Dec 4, 2018 at 9:45 AM Boris Pelakh <
> boris.pel...@semanticarts.com
> > >
> > wrote:
> >
> > > So, a /sparql?query=SELECT...WHERE...&default-graph-uri=my-named-graph
> > > is logically equivalent to
> > >
> > > SELECT ...
> > > FROM <my-named-graph>
> > > WHERE ...
> > >
> > > (overriding whatever FROM/FROM NAMED clauses actually specified in the
> > > query) I looked at
> > > org.apache.rya.rdftriplestore.RdfCloudTripleStoreConnection.evaluateIn
> > > ternal(), and the dataset containing the overriding graph names is
> > > passed in, but does not seem to be honored, i.e if I have the
> > > following data:
> > >
> > > ns:g1 { ns:p1 ns:pred ns:o1 }
> > > ns:g2 { ns:p2 ns:pred ns:o2 }
> > >
> > > and I execute 'SELECT COUNT(?s) where { ?s ns:pred ?o }' with
> > > default-graph-uri set to ns:g1, I expect to get 1, but I get 2.
> > >
> > > I am assuming that there is someplace where the TupleExpr passed to
> > > evaluateInternal gets transformed into a scan pattern for Accumulo,
> > > after the right index (spo/ops/pso) is identified. If I remember
> > > correctly, S/P/O is used the the row ID, and the graph is the column
> > > name (or family?). So the dataset should modify the scan filter if
> > applied correctly.
> > >
> > > Boris Pelakh
> > > Ontologist, Developer, Software Architect
> > > boris.pel...@semanticarts.com
> > > +1-321-243-3804
> > >
> > >
> > > -----Original Message-----
> > > From: Puja Valiyil <puja...@gmail.com>
> > > Sent: Tuesday, December 4, 2018 9:31 AM
> > > To: dev@rya.incubator.apache.org
> > > Subject: Re: Dataset not applied to queries
> > >
> > > Hi Boris,
> > > Unfortunately I'm not very familiar with that method -- can you
> > > provide some more details into exactly what its supposed to do?
> > > All of the connectors for implementing the sail api are in the
> > > rya.sail, and the main classes to look at are RdfCloudTripleStore,
> > > RyaSailRepository, and RdfCloudTripleStoreConnection. All of these
> > > classes all extend abstract implementations SAIL provides out of the
> > > box, so typically the way you extend them to do more stuff is to look
> > > at the Sail implementation and customize it for Rya's data structures.
> > > If you need any help or want to bounce any implementation ideas off of
> > > anyone, please send out an email over the dev list. Just let us know
> > > how we can help!
> > > Thanks,
> > > Puja
> > >
> > >
> > > On Tue, Dec 4, 2018 at 9:19 AM Boris Pelakh
> > > <boris.pel...@semanticarts.com
> > > >
> > > wrote:
> > >
> > > > I am in the process of implementing a SPARQL 1.1-compliant endpoint
> > > > for web.rya so that Rya can be used as a federated repository with
> > > > RDF4J workbench.
> > > >
> > > >
> > > >
> > > > One of requirements is to be able to pass default-graph-uri and
> > > > named-graph-uri filters external to the query to override the graph
> > > > filter in the query itself (see
> > > > https://www.w3.org/TR/sparql11-protocol/#query-operation).
> > > >
> > > >
> > > >
> > > > In the sail API this is accomplished by setting the dataset on the
> > > > query object (see
> > > > http://docs.rdf4j.org/javadoc/2.2/org/eclipse/rdf4j/query/Operation.
> > > > ht ml#setDataset-org.eclipse.rdf4j.query.Dataset-),
> > > > but that setting does not seem to be honored by the Rya SAIL
> > > > implementation. Any ideas on where I can start digging to correct
> this?
> > > >
> > > >
> > > >
> > > > (I have also tried wrapping the Rya repository connection in a
> > > > ContextAwareConnection and setting readContexts, but the effect is
> > > > the same).
> > > >
> > > >
> > > >
> > > > *Boris Pelakh*
> > > >
> > > > *Ontologist, Developer, Software Architect*
> > > >
> > > > *boris.pel...@semanticarts.com <boris.pel...@semanticarts.com>*
> > > >
> > > > *+1-321-243-3804*
> > > >
> > > > [image: SemanticArtsLogo]
> > > >
> > > >
> > > >
> > >
> >
>


--
Dr. Adina Crainiceanu
Associate Professor
Computer Science Department
United States Naval Academy
410-293-6822
ad...@usna.edu
http://www.usna.edu/Users/cs/adina/

Reply via email to