openlink / virtuoso-opensource

Virtuoso is a high-performance and scalable Multi-Model RDBMS, Data Integration Middleware, Linked Data Deployment, and HTTP Application Server Platform
https://vos.openlinksw.com
Other
867 stars 210 forks source link

Invalid SPARQL Query can be executed via isql #312

Open jakubklimek opened 9 years ago

jakubklimek commented 9 years ago

Commit: 9e0e2eb0f4a2516c41ec6722404584159b04c1ba Database db01 provided earlier to @HughWilliams

This query:

 define output:format '_JAVA_'
  define input:same-as "yes"
 define input:default-graph-uri <virt:DEFAULT>
PREFIX  br:   <http://purl.org/business-register#>
PREFIX  mpsv: <http://purl.org/mpsv/schools#>
PREFIX  owl:  <http://www.w3.org/2002/07/owl#>
PREFIX  ros:  <http://purl.org/register-of-schools#>
PREFIX  gn:   <http://www.geonames.org/ontology/>
PREFIX  cm:   <http://purl.org/czech-municipalities/geography#>
PREFIX  gr:   <http://purl.org/goodrelations/v1#>
PREFIX  vcard: <http://www.w3.org/2006/vcard/ns#>
PREFIX  foaf: <http://xmlns.com/foaf/0.1/>
PREFIX  dc:   <http://purl.org/dc/terms/>

CONSTRUCT
  { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ros:School .
    ?s ros:facilityType ?schoolType .
    ?s ros:resortIdentificator ?resortIdentificator .
    ?s dc:description ?description .
    ?s mpsv:taughtLanguage ?taughtLanguage .
    ?s mpsv:contact ?contact .
    ?contact vcard:email ?email .
    ?contact vcard:tel ?tel .
    ?contact vcard:url ?web .
    ?s mpsv:contactPerson ?contactPerson .
    ?contactPerson foaf:name ?personName .
    ?contactPerson foaf:phone ?personPhone .
    ?s mpsv:priceForFood ?priceForFood .
    ?priceForFood gr:hasCurrencyValue ?foodPrice .
    ?s mpsv:priceForAccommodation ?priceForAccommodation .
    ?priceForAccommodation gr:hasCurrencyValue ?accommodationPrice .
    ?s ros:dateOfStart ?dateOfStart .
    ?s ros:dateOfRegistry ?dateOfRegistry .
    ?s ros:teachingLanguage ?schoolLanguage .
    ?s ros:capacity ?schoolCapacity .}
FROM <http://ld.opendata.cz/resource/dataset/rejskol.msmt.cz>
FROM <http://ld.opendata.cz/resource/dataset/portal.mpsv.cz/skoly-evidovane-uradem-prace-cr>
WHERE
  { ?s ros:facilityType ?schoolType .
    ?s ros:resortIdentificator "107518317"
    OPTIONAL
      { ?s dc:description ?description }
    OPTIONAL
      { ?s mpsv:taughtLanguage ?taughtLanguage }
    OPTIONAL
      { ?s mpsv:contact ?contact }
    OPTIONAL
      { ?contact vcard:email ?email }
    OPTIONAL
      { ?contact vcard:tel ?tel }
    OPTIONAL
      { ?contact vcard:url ?web }
    OPTIONAL
      { ?s mpsv:contactPerson ?contactPerson }
    OPTIONAL
      { ?contactPerson foaf:name ?personName }
    OPTIONAL
      { ?contactPerson foaf:phone ?personPhone }
    OPTIONAL
      { ?s mpsv:priceForFood ?priceForFood .
        ?priceForFood gr:hasCurrencyValue ?foodPrice
      }
    OPTIONAL
      { ?s mpsv:priceForAccommodation ?priceForAccommodation .
        ?priceForAccommodation gr:hasCurrencyValue ?accomodationPrice
      }
    ?s ros:dateOfStart ?dateOfStart .
    ?s ros:dateOfRegistry ?dateOfRegistry .
    ?s ros:teachingLanguage ?schoolLanguage
    OPTIONAL
      { ?s ros:capacity ?schoolCapacity }
  }

is invalid (try to run it through the SPARQL endpoint). However, when executed via isql, it runs indefinitely or for a long time - and I am not even sure what it does when the query is not valid.

HughWilliams commented 9 years ago

I have recreated with the DB provided and reported to development to fix ...

HughWilliams commented 8 years ago

@jakubklimek: Due to server crash we have lost the DB u provided for recreating this issue. Can u check to see if this still occurs with the latest develop/7 build please ?

jakubklimek commented 8 years ago

@HughWilliams Yes, this issue still occurs in 492fc7cb48892760bd9db4c688caceea3419e09a

HughWilliams commented 8 years ago

@jakubklimek: Are you able to provide the database again, because as indicated in my previous post we lost the DB due to server machine failure which lost some of the test database ?