Nice. For what it's worth, congratulation for the beautiful work and code quality reached in Marmotta. Fabian
>>> Sebastian Schaffert <sebastian.schaff...@gmail.com> 10.10.2014 10:16 >>> Hi Fabian, there is an extensive collection of SPARQL tests in libraries/kiwi/kiwi-sparql where we both use the complete collection of Sesame standard tests (several 100) and 36 custom tests where we collected SPARQL queries of varying complexity that had problems and compare them with plain Sesame. I suggest adding all new tests there and not to the web service tests. Apparently neither we nor Sesame has a test for Sum, though ;-) org.apache.marmotta.kiwi.sparql.test.ComplexKiWiSparqlQueryTest (subclassing the standard Sesame tests) org.apache.marmotta.kiwi.sparql.test.KiWiSparqlJoinTest (our own tests beyond the ones in Sesame) Testing the web service is also an option, but starting up the environment takes much more time, so we only do few web service tests that mainly test the REST protocol and functionality. Note that the SUM implementation currently has a problem in the case of the sum being 0 because no values exist. In that case the implementation will return null instead of 0.0 because the relational database returns NULL (which we typically interpret as "not bound"). We would need a special treatment for aggregation constructs here, but that might have side effects I am not yet aware of. Greetings, Sebastian 2014-10-10 9:07 GMT+02:00 Fabian Cretton <fabian.cret...@hevs.ch>: I know it is easier to say than to do, but I suggest adding all supported SPARQL queries to the unit test: "org.apache.marmotta.platform.sparql.webservices.SparqlWebServiceTest.java" I guess those queries are just too "new" to be already there, but on the other hand I saw a first discussion about soon moving 3.3.0 to a realease if I'm not mistaken. Fabian >>> Sebastian Schaffert <sebastian.schaff...@gmail.com> 09.10.2014 16:54 >>> Can you update your git repository, build again and try again? building libraries/kiwi/kiwi-sparql should be enough in case you have a recent snapshot. Otherwise do a "mvn clean install -DskipTests" in the root directory to save time ;-) Greetings, Sebastian 2014-10-09 16:24 GMT+02:00 Sebastian Schaffert <sebastian.schaff...@gmail.com>: It's a copy-paste bug. Class Cast Exception, fixing it now. Greetings, Sebastian 2014-10-09 16:08 GMT+02:00 Sebastian Schaffert <sebastian.schaff...@gmail.com>: SUM is implemented, of course. But sometimes the translation into SQL still yields invalid SQL queries. Turn on logging for SPARQL and check in the marmotta-debug log file. I can also try with my setup. I would also recommend you to update the latest snapshot of the repository, because there are many bug fixes especially in the SPARQL part. Greetings, Sebastian 2014-10-09 15:42 GMT+02:00 Fabian Cretton <fabian.cret...@hevs.ch>: Hi, Is SPARQL-sum implemented in the current version under developpment (3.3.0) ? I did refresh my fork two weeks ago, and this query doesnt' work: prefix sdmx-measure: <http://purl.org/linked-data/sdmx/2009/measure#> SELECT (SUM(?value) as ?valSum) WHERE { ?obs sdmx-measure:obsValue ?value. } I have an error message in the interface: unknown exception while evaluating SPARQL query I can't see the logs right now (I have to check out why my logs no more work since my last synchronisation) But is "sum" implemented or not ? or maybe I do have a simple syntax mistake ? thank you for any help Fabian