W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2007

Re: [jena-dev] COUNT syntax

From: Ivan Mikhailov <imikhailov@openlinksw.com>
Date: Wed, 05 Dec 2007 07:25:59 +0600
To: Andreas Langegger <al@jku.at>
Cc: jena-dev@yahoogroups.com, public-rdf-dawg@w3.org
Message-Id: <1196817959.3657.139.camel@master.iv.dev.null>

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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:37 GMT