You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Holger Knublauch <ho...@knublauch.com> on 2012/07/19 19:50:59 UTC

Minor GROUP_CONCAT issues

Andy,

just to double-check: GROUP_CONCAT is supposed to take potentially 
multiple expressions as arguments, but ARQ seems to be incomplete here?

Also, could you please make AggGroupConcat/Distinct.getSeparator() 
public? I need this for the ARQ->SPIN RDF syntax conversion.

Thanks
Holger


Re: Minor GROUP_CONCAT issues

Posted by Andy Seaborne <an...@apache.org>.
On 19/07/12 21:56, Holger Knublauch wrote:
> On 7/19/2012 13:51, Andy Seaborne wrote:
>> On 19/07/12 18:50, Holger Knublauch wrote:
>>> Andy,
>>>
>>> just to double-check: GROUP_CONCAT is supposed to take potentially
>>> multiple expressions as arguments, but ARQ seems to be incomplete here?
>>>
>>
>> Example?
>>
>> CONCAT != GROUP_CONCAT
>>
>> 'GROUP_CONCAT' '(' 'DISTINCT'? Expression ( ';' 'SEPARATOR' '=' String
>> )? ')'
>>
>> So no, exactly one expression and at most one separator.
>
> Ah good, my fault: I must have looked at an older draft of SPARQL 1.1,
> plus I saw email threads where the separator syntax was discussed that
> included examples with multiple expressions.
>
> Given that it only takes one expression argument, it would be great if
> the separator syntax could be simplified, so that the separator is
> simply the second argument, e.g. GROUP_CONCAT(?name, "|"). Does it still
> make sense to suggest this on the W3C list or is this a dead horse?

Too late - the WG considered it and preferred to note that the arguments 
perform very different roles.  One is an argument to the operator (the 
separator) one to the aggregation.  After 2 LCs with this, and the WG 
did consider the other design, you can guess the likely outcome of a 
comment.

[[
I liked

GROUP_CONCAT["|"](?name)

because the separator argument is creating a function for the aggregation.
]]

>
>>
>>> Also, could you please make AggGroupConcat/Distinct.getSeparator()
>>> public? I need this for the ARQ->SPIN RDF syntax conversion.
>>
>> Done - you get back the separator as seen (so it may be null), not the
>> effective separator (defaults to space).
>
> Great!
>
> Thanks
> Holger
>



Re: Minor GROUP_CONCAT issues

Posted by Holger Knublauch <ho...@knublauch.com>.
On 7/19/2012 13:51, Andy Seaborne wrote:
> On 19/07/12 18:50, Holger Knublauch wrote:
>> Andy,
>>
>> just to double-check: GROUP_CONCAT is supposed to take potentially
>> multiple expressions as arguments, but ARQ seems to be incomplete here?
>>
>
> Example?
>
> CONCAT != GROUP_CONCAT
>
> 'GROUP_CONCAT' '(' 'DISTINCT'? Expression ( ';' 'SEPARATOR' '=' String 
> )? ')'
>
> So no, exactly one expression and at most one separator.

Ah good, my fault: I must have looked at an older draft of SPARQL 1.1, 
plus I saw email threads where the separator syntax was discussed that 
included examples with multiple expressions.

Given that it only takes one expression argument, it would be great if 
the separator syntax could be simplified, so that the separator is 
simply the second argument, e.g. GROUP_CONCAT(?name, "|"). Does it still 
make sense to suggest this on the W3C list or is this a dead horse?

>
>> Also, could you please make AggGroupConcat/Distinct.getSeparator()
>> public? I need this for the ARQ->SPIN RDF syntax conversion.
>
> Done - you get back the separator as seen (so it may be null), not the 
> effective separator (defaults to space).

Great!

Thanks
Holger


Re: Minor GROUP_CONCAT issues

Posted by Andy Seaborne <an...@apache.org>.
On 19/07/12 18:50, Holger Knublauch wrote:
> Andy,
>
> just to double-check: GROUP_CONCAT is supposed to take potentially
> multiple expressions as arguments, but ARQ seems to be incomplete here?
>

Example?

CONCAT != GROUP_CONCAT

'GROUP_CONCAT' '(' 'DISTINCT'? Expression ( ';' 'SEPARATOR' '=' String 
)? ')'

So no, exactly one expression and at most one separator.

> Also, could you please make AggGroupConcat/Distinct.getSeparator()
> public? I need this for the ARQ->SPIN RDF syntax conversion.

Done - you get back the separator as seen (so it may be null), not the 
effective separator (defaults to space).

>
> Thanks
> Holger

	Andy