Hi Eric,

I don’t quite follow what you are asking as both queries you provide are the 
same whereas you imply they should be different ? Anyway the query with the 
distinct you indicate returns 0 rows for you returns 2 rows for me:

SQL> rdfs_rule_set ('ifps', 'ifp_list');

Done. -- 230 msec.
SQL> SPARQL define input:inference "ifps"  SELECT * FROM <ifps> WHERE {<john1> 
?p ?o};
p                                                                               
  o
VARCHAR                                                                         
  VARCHAR
_______________________________________________________________________________

http://www.w3.org/1999/02/22-rdf-syntax-ns#type                                 
  person
http://www.w3.org/2002/07/owl#sameAs                                            
  john2
name                                                                            
  John
name                                                                            
  Tarzan
address                                                                         
  101 A street
http://www.w3.org/1999/02/22-rdf-syntax-ns#type                                 
  person
name                                                                            
  John
address                                                                         
  102 B street
knows                                                                           
  mike

9 Rows. -- 134 msec.
SQL> SPARQL define input:inference "ifps" SELECT distinct ?p FROM <ifps> WHERE 
{ ?p a <person>};
p
VARCHAR
_______________________________________________________________________________

john1
mary
mike

3 Rows. -- 123 msec.
SQL> SPARQL define input:inference "ifps"  SELECT DISTINCT * FROM <ifps> WHERE 
{?person <name> ?name};
person                                                                          
  name
VARCHAR                                                                         
  VARCHAR
_______________________________________________________________________________

john1                                                                           
  John
john1                                                                           
  Tarzan

2 Rows. -- 214 msec.
SQL> 

As you are running a 6.1.2 build which is over a year old (probably from a 
Linux Distro ???), I would suggest you update your build to the latest snapshot 
6.1.4 RC1 available from:

        
ftp://download.openlinksw.com/support/vos/virtuoso-opensource-6-20110915.tar.gz

and repeat your test ...

Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support
Twitter: http://twitter.com/OpenLink

On 13 Oct 2011, at 03:00, Eric Rozell wrote:

> Hi Virtuoso team,
> 
> (Sorry for the repeat emails.)
> 
> I'm using Virtuoso for a project and have a simple RDFS inferencing use case. 
>  Rather than giving you the details of the use case, I replicated the error 
> for one of the examples on the RDFS inferencing page 
> (http://docs.openlinksw.com/virtuoso/rdfsparqlrule.html).  Specifically, I am 
> working off of the example in section 16.13.9 Identity With Inverse 
> Functional Properties.
> 
> I need to perform a SELECT DISTINCT query using literal values in this data 
> with a single query.  So, going on the example given, my query might look 
> like:
> 
> SQL>SPARQL define input:inference "ifps"  SELECT DISTINCT * FROM <ifps> WHERE 
> {?person <name> ?name};
> 
> If I execute the query, I get no results (see below):
> 
> person                                                                        
>     name
> VARCHAR                                                                       
>     VARCHAR
> _______________________________________________________________________________
> 
> 
> 0 Rows. -- 2 msec.
> 
> 
> If I execute the query without the DISTINCT constraint, I get results (see 
> below):
> 
> SQL>SPARQL define input:inference "ifps"  SELECT DISTINCT * FROM <ifps> WHERE 
> {?person <name> ?name};
> 
> person                                                                        
>     name
> VARCHAR                                                                    
> VARCHAR
> _______________________________________________________________________________
> 
> john1                                                                         
>     John
> john2                                                                         
>     John
> john1                                                                         
>     Tarzan
> 
> 3 Rows. -- 1 msec.
> 
> Given the results from the second query, I would expect the same results for 
> a SELECT DISTINCT query.  Any thoughts on what is causing this error?  I am 
> using Virtuoso 6.1.2.
> 
> Thanks,
> -Eric Rozell
> 
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct_______________________________________________
> Virtuoso-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/virtuoso-devel

Reply via email to