Sergio Fernández created MARMOTTA-578:
-----------------------------------------

             Summary: Evaluation of GROUP BY and ORDER BY together fails on 
PostgreSQL
                 Key: MARMOTTA-578
                 URL: https://issues.apache.org/jira/browse/MARMOTTA-578
             Project: Marmotta
          Issue Type: Bug
          Components: KiWi Triple Store
    Affects Versions: 3.3.0
            Reporter: Sergio Fernández
            Assignee: Sergio Fernández
             Fix For: 3.3.1, 3.4.0


Any SPARQL query with both constructions:

{code:none}
SELECT ?person ?name
WHERE {
  ?person a foaf:Person ;
    foaf:name ?name .
}
GROUP BY ?person ?name
ORDER BY ?name
LIMIT 10
{code}

looks to fail:

{code:none}
org.openrdf.query.QueryEvaluationException: org.postgresql.util.PSQLException: 
ERROR: column "p2_object_v2.svalue" must appear in the GROUP BY clause or be 
used in an aggregate function
  Position: 431
        at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
        at 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
        at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
        at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560)
        at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
        at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
        at 
org.apache.marmotta.kiwi.sparql.evaluation.KiWiEvaluationStrategy$1.call(KiWiEvaluationStrategy.java:220)
        at 
org.apache.marmotta.kiwi.sparql.evaluation.KiWiEvaluationStrategy$1.call(KiWiEvaluationStrategy.java:216)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
{code}



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

Reply via email to