Hi Ivan,

Here is a dataset: http://www.mediafire.com/?drtwizwozq5

Here are sample queries to compare:

prefix geo:           <http://www.w3.org/2003/01/geo/wgs84_pos#>
prefix geonames:      <http://www.geonames.org/ontology#>
SELECT DISTINCT ?cityName
FROM <http://www.geonames.org#>
WHERE
{
?city ?predicate ?value .
?city geonames:featureClass ?featureClass .
?city geonames:name ?cityName .
?value bif:contains '"tomsk"' .
FILTER (?featureClass = "http://www.geonames.org/ontology#P";)
}

and

prefix geo:           <http://www.w3.org/2003/01/geo/wgs84_pos#>
prefix geonames:      <http://www.geonames.org/ontology#>
SELECT DISTINCT ?cityName
FROM <http://www.geonames.org#>
WHERE
{
?city ?predicate ?value .
?city geonames:featureClass "http://www.geonames.org/ontology#P"; .
?city geonames:name ?cityName .
?value bif:contains '"tomsk"' .
}

Regards,
Alexander

2010/4/24 Ivan Mikhailov <imikhai...@openlinksw.com>

> Hello Alexander,
>
> What is the complete text of the query and what are the data in
> question? Additionally, what is exact server version? The case is quite
> strange because "by default" these two should result in identical
> fragments of SQL.
>
> Best Regards,
>
> Ivan Mikhailov
> OpenLink Software
> http://virtuoso.openlinksw.com
>
>
> On Fri, 2010-04-23 at 23:28 +0700, Alexander Sidorov wrote:
> > I forgot to notice that first query doesn't work.
> >
> > 2010/4/23 Alexander Sidorov <alexi...@gmail.com>
> >         Hello!
> >
> >         Should these queries:
> >
> >         WHERE
> >         {
> >         ?s <http://www.geonames.org/ontology#featureClass>
> >         "http://www.geonames.org/ontology#P"; .
> >         }
> >
> >         WHERE
> >         {
> >         ?s
> >         <http://www.geonames.org/ontology#featureClass> ?featureClass .
> >         FILTER (?featureClass = "http://www.geonames.org/ontology#P";)
> >         }
> >
> >         be equivalent?
> >
> >         Yes, I know featureClass predicate stores URIs but not
> >         literals at GeoNames dataset. But my custom GeoNames dataset
> >         first stored it as literals (it really doesn't change anything
> >         from semantic point of view as there is now URI
> >         <http://www.geonames.org/ontology#P>). Then for performance
> >         reasons I have reimplemented RDF generator so that
> >         featureClass stores URIs. But there is a chance this problem
> >         can be reproduced on more real usecases so I decided to report
> >         it.
> >
> >         Regards,
> >         Alexander
>
>
>

Reply via email to