On 22 Mar 2012, at 18:43, Diogo FC Patrao wrote:
> Hello
Hi Diogo,
> I have a Virtuoso server serving a triplestore, which I'm querying with
> ARQ. I was using version 2.8.1 and the following query was working fine:
>
> SELECT <bif:year>(?date) <bif:month>(?date) count(distinct ?document)
> However, when I switched to 2.8.8, I suddenly started to get this error
> message:
>
>> Non-group key variable in SELECT: ?date in expression <bif:year>(?date)
> Am I doing something wrong, or is it really a bug?
ARQ changed the default syntax to SPARQL 1.1 from the 1.0 with ARQ extensions
syntax. SPARQL 1.1 requires that you use AS, it won't generate aliases.
So you could move to 1.1 syntax:
SELECT (<bif:year>(?date) AS ?year)
(<bif:month>(?date) AS ?month)
(count(distinct ?document) AS ?doccount)
or explicitly use ARQ syntax:
Query q = QueryFactory.create(queryString, Syntax.ARQ);
(I'd move to the former)
Damian