You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Sumit Raja <su...@gmail.com> on 2011/06/02 10:52:22 UTC

ARQ differences between H2 and Postgresql

Hi,

I am seeing slight differences between an H2 backend and Postgres when
running a SPARQL query.

I have an ARQ extension function that wasn't correctly distinguishing
between nodes and anonymous nodes. The for the query is below:

select distinct ?res
 where
{
(?1syy5oi7c08oj ?dist) mb:withinDistanceOf (-0.0838332 51.6160623 20000) .
 ?1syy5oi7c08oj ns0:type ns0:Seq.
?res ?1203d0wuxbkle ?1syy5oi7c08oj .
}

The query generates results for the mb:withinDistanceOf  but on h2 I get a
result if ?1syy5oi7c08oj is a Seq but on Postgres I do not. I have stepped
though as far as the Triple Matcher and it looks like the actual Graph
implementation does something different when finding a match.

I'm going to fix the mb:withinDistanceOf function to make the distinction
between the nodes but what is the actual expected behaviour? Is this a
defect in the H2 graph implementation?

Thanks

Sumit

Re: ARQ differences between H2 and Postgresql

Posted by Andy Seaborne <an...@epimorphics.com>.
What's mb:withinDistanceOf?

On 02/06/11 09:52, Sumit Raja wrote:
> Hi,
>
> I am seeing slight differences between an H2 backend and Postgres when
> running a SPARQL query.
>
> I have an ARQ extension function that wasn't correctly distinguishing
> between nodes and anonymous nodes. The for the query is below:
>
> select distinct ?res
>   where
> {
> (?1syy5oi7c08oj ?dist) mb:withinDistanceOf (-0.0838332 51.6160623 20000) .
>   ?1syy5oi7c08oj ns0:type ns0:Seq.
> ?res ?1203d0wuxbkle ?1syy5oi7c08oj .
> }
>
> The query generates results for the mb:withinDistanceOf  but on h2 I get a
> result if ?1syy5oi7c08oj is a Seq but on Postgres I do not. I have stepped
> though as far as the Triple Matcher and it looks like the actual Graph
> implementation does something different when finding a match.

Could you explain what the difference is?

> I'm going to fix the mb:withinDistanceOf function to make the distinction
> between the nodes but what is the actual expected behaviour? Is this a
> defect in the H2 graph implementation?

It may be how H2 parses the generated SQL - it may be something else.
 From the details you've given we can't tell.

Do you have a complete, minimal example that can be run?

>
> Thanks
>
> Sumit
>

	Andy