[ 
https://issues.apache.org/jira/browse/RYA-261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Caleb Meier updated RYA-261:
----------------------------
    Description: 
When ParallelEvaluationStrategyImpl evaluates StatementPatterns, it doesn't 
take into account the possibility that context can be specified by the 
BindingSet parameter passed into its evaluate method.  The evaluate method 
scans Rya by building an Accumulo Range using all values relevant to the 
Accumulo Row that are included in the StatementPattern and BindingSet. However, 
it does not utilize context when building it Range object because context is 
stored in the Accumulo Column Family.  The results of this scan are effectively 
(Statement, BindingSet) pairs that are joined to form a result BindingSet.  
This join process does not take into account the fact that the BindingSet could 
contain a value for the context that is not the same as the context value in 
the Statement.  The context for the Statement is extracted and written to the 
BindingSet, possibly overwriting any value of context that was there.  Such 
behavior occurs when one queries for the named graph of Rya statements

select ?c ?x from graph ?c {where { ?x <uri:talksTo> <uri:Bob>; <uri:worksAt> 
<uri:GroceryStore> }} 

with the data (uri:Joe, uri:talksTo, uri:Bob, uri:context1), (uri:Joe, 
uri:worksAt, uri:GroceryStore, uri:context2) in Rya.  Because of the bug 
described above, the above query will incorrectly return [?x = uri:Joe, ?c = 
context2] when it should return no results.  

  was:
When ParallelEvaluationStrategyImpl evaluates StatementPatterns, it doesn't 
take into account the possibility that context can be specified by the 
BindingSet parameter passed into its evaluate method.  The evaluate method 
scans Rya by building an Accumulo Row Range using all values relevant to the 
Accumulo Row that are included in the StatementPattern and BindingSet. However, 
it does not utilize context during the evaluation process because context is 
stored in the Accumulo Column Family.  The results of this scan are effectively 
(Statement, BindingSet) pairs that are joined to form a result BindingSet.  
This join process does not take into account the fact that the BindingSet could 
contain a value for the context that is not the same as the context value in 
the Statement.  The context for the Statement is extracted and written to the 
BindingSet, possibly overwriting any value of context that was there.  Such 
behavior occurs when one queries for the named graph of Rya statements

select ?c ?x from graph ?c {where { ?x <uri:talksTo> <uri:Bob>; <uri:worksAt> 
<uri:GroceryStore> }} 

with the data (uri:Joe, uri:talksTo, uri:Bob, uri:context1), (uri:Joe, 
uri:worksAt, uri:GroceryStore, uri:context2) in Rya.  Because of the bug 
described above, the above query will incorrectly return [?x = uri:Joe, ?c = 
context2] when it should return no results.  


> Context Validation for StatementPattern Evaluation
> --------------------------------------------------
>
>                 Key: RYA-261
>                 URL: https://issues.apache.org/jira/browse/RYA-261
>             Project: Rya
>          Issue Type: Bug
>          Components: clients, dao
>    Affects Versions: 3.2.10
>            Reporter: Caleb Meier
>            Assignee: Caleb Meier
>             Fix For: 3.2.10
>
>
> When ParallelEvaluationStrategyImpl evaluates StatementPatterns, it doesn't 
> take into account the possibility that context can be specified by the 
> BindingSet parameter passed into its evaluate method.  The evaluate method 
> scans Rya by building an Accumulo Range using all values relevant to the 
> Accumulo Row that are included in the StatementPattern and BindingSet. 
> However, it does not utilize context when building it Range object because 
> context is stored in the Accumulo Column Family.  The results of this scan 
> are effectively (Statement, BindingSet) pairs that are joined to form a 
> result BindingSet.  This join process does not take into account the fact 
> that the BindingSet could contain a value for the context that is not the 
> same as the context value in the Statement.  The context for the Statement is 
> extracted and written to the BindingSet, possibly overwriting any value of 
> context that was there.  Such behavior occurs when one queries for the named 
> graph of Rya statements
> select ?c ?x from graph ?c {where { ?x <uri:talksTo> <uri:Bob>; <uri:worksAt> 
> <uri:GroceryStore> }} 
> with the data (uri:Joe, uri:talksTo, uri:Bob, uri:context1), (uri:Joe, 
> uri:worksAt, uri:GroceryStore, uri:context2) in Rya.  Because of the bug 
> described above, the above query will incorrectly return [?x = uri:Joe, ?c = 
> context2] when it should return no results.  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to