Re: [jena-dev] COUNT syntax

Hello,

I've just committed a patch that lets aggregates be nested into result
set expressions. As a side effect, select (count(*)) ... is now a valid
syntax.

sparql select ?s ?p (2 + max (bif:length(str(?o)))) where {?s ?p ?o .
filter (isliteral (?o)) };

is now also valid query.

Best Regards,
Ivan Mikahilov
OpenLink Software.

> On 12/3/07, Andreas Langegger <al@jku.at> wrote:
>         Hello,
>         
>         it has already been noted that there are different syntax
>         styles 
>         around for aggregate functions like COUNT which are out of
>         scope of 
>         the SPARQL Rec:
>         https://www.blogger.com/comment.g?blogID=18002060&postID=4691605369637965896
>         
>         In my case it's also an issue. The problem is, even if I just
>         use a 
>         "SELECT COUNT(*)" without additional parentheses - which
>         should work 
>         for both ARQ and Virtuoso (DBpedia e.g.) - ARQ will add the
>         ARQ-style 
>         parentheses when serializing the Query back into a String:
>         "SELECT 
>         (COUNT(*))" e.g. when executing remote queries...
>         
>         I'd like to here some comments and appraisal from the
>         community. Is 
>         there a chance that aggregate functions become part of
>         official 
>         SPARQL? When? ;-)
>         
>         A possible solution for ARQ would be to add a
>         Syntax.syntaxVirtuoso, 
>         however this is not really a solution for this issue.
>         
>         Thanks,
>         Andy
>         
>         PS@ Andy Seaborne:
>         Concerning my remote-bug - it was my fault. However I was
>         already 
>         confused enough cause I had another strange behavior with D2R 
>         resulting in empty variable mappings when joining. Switched
>         off the 
>         optimizer sinze I'm using some custom Transforms... now it's
>         working. 
>         Thanks a lot and sorry for the false alarm!
>         
>         ----------------------------------------------------------
>         Dipl.-Ing.(FH) Andreas Langegger
>         Institute for Applied Knowledge Processing
>         Johannes Kepler University Linz
>         A-4040 Linz, Altenberger Strafle 69
>         http://www.faw.at
>         http://www.langegger.at

> 

Received on Wednesday, 5 December 2007 01:29:53 UTC