[ 
https://issues.apache.org/jira/browse/RYA-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15155061#comment-15155061
 ] 

ASF GitHub Bot commented on RYA-41:
-----------------------------------

Github user amihalik commented on the pull request:

    https://github.com/apache/incubator-rya/pull/20#issuecomment-186440469
  
    Looks good.  I'll merge this on Sunday unless there are other concerns.


> SPARQL queries with the DISTINCT keyword throws an exception when performing 
> a PCJ enabled query.
> -------------------------------------------------------------------------------------------------
>
>                 Key: RYA-41
>                 URL: https://issues.apache.org/jira/browse/RYA-41
>             Project: Rya
>          Issue Type: Bug
>            Reporter: Kevin Chilton
>            Assignee: Kevin Chilton
>
> Steps to reproduce:
> 1. Load some data into the core Rya tables within Accumulo.
> 2. Create a PCJ for a query using those Rya tables.
> 3. Run a query where PCJ Inexing is enabled that uses the "DISTINCT" keyword.
> The application will throw a ClassCastException because it expects the top 
> most node of a ParsedQuery to be a Projection node, but it is a Distinct node.
> The fix is to navigate the query's structure until you find the Projection 
> node instead of assuming it is the top most node.
> Stack Trace:
> 1875 [main] WARN org.apache.accumulo.core.client.ClientConfiguration  - Found 
> no client.conf in default paths. Using default client configuration values.
> org.openrdf.query.QueryEvaluationException: java.lang.ClassCastException: 
> org.openrdf.query.algebra.Distinct cannot be cast to 
> org.openrdf.query.algebra.Projection
>       at 
> org.openrdf.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:67)
>       at 
> org.openrdf.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:75)
>       at EntityDirectExample.testQuery(EntityDirectExample.java:235)
>       at EntityDirectExample.runQuery(EntityDirectExample.java:259)
>       at EntityDirectExample.runBenchmarks(EntityDirectExample.java:193)
>       at EntityDirectExample.main(EntityDirectExample.java:102)
> Caused by: org.openrdf.sail.SailException: java.lang.ClassCastException: 
> org.openrdf.query.algebra.Distinct cannot be cast to 
> org.openrdf.query.algebra.Projection
>       at 
> mvm.rya.rdftriplestore.RdfCloudTripleStoreConnection.evaluateInternal(RdfCloudTripleStoreConnection.java:418)
>       at 
> org.openrdf.sail.helpers.SailConnectionBase.evaluate(SailConnectionBase.java:295)
>       at 
> org.openrdf.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:60)
>       ... 5 more
> Caused by: java.lang.ClassCastException: org.openrdf.query.algebra.Distinct 
> cannot be cast to org.openrdf.query.algebra.Projection
>       at 
> mvm.rya.indexing.external.tupleSet.AccumuloIndexSet.<init>(AccumuloIndexSet.java:126)
>       at 
> mvm.rya.indexing.external.PrecompJoinOptimizer.getAccIndices(PrecompJoinOptimizer.java:858)
>       at 
> mvm.rya.indexing.external.PrecompJoinOptimizer.setConf(PrecompJoinOptimizer.java:134)
>       at 
> mvm.rya.rdftriplestore.RdfCloudTripleStoreConnection.evaluateInternal(RdfCloudTripleStoreConnection.java:291)
>       ... 7 more



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to