Stardog 5 RC1 - Query with reasoning not working from Java

Hi,

I’m wondering if this is a a known issue?

I’m running a query through a regular Stardog connection with reasoning, and I’m not seeing any results. Running the same query from the terminal works as expected. Code worked fine with Stardog 4.

Query and plan from terminal:

Explaining Query:

select distinct ?skjulbarEnhet  where {  
   ?skjulbarEnhet a virksomhet:SkjulbarEnhet.      
}

The Query Plan:

From all
Distinct [#35]
`─ Projection(?skjulbarEnhet) [#139]
   `─ Union [#139]
      +─ Union [#135]
      │  +─ Union [#133]
      │  │  +─ Scan[POSC](?skjulbarEnhet, rdf:type, <http://data.einnsyn.no/virksomhetmeta/Kommune>) [#1]
      │  │  `─ Scan[POSC](?skjulbarEnhet, rdf:type, <http://data.einnsyn.no/virksomhetmeta/Virksomhet>) [#132]
      │  `─ Union [#2]
      │     +─ Filter(Datatype(?zgivghrw) = xsd:string) [#1]
      │     │  `─ MergeJoin(?skjulbarEnhet) [#1]
      │     │     +─ Scan[POSC](?skjulbarEnhet, rdf:type, <http://data.einnsyn.no/virksomhetmeta/AdministrativEnhet>) [#199]
      │     │     `─ Scan[PSOC](?skjulbarEnhet, <http://data.einnsyn.no/virksomhetmeta/orgnummer>, ?zgivghrw) [#140]
      │     `─ Filter(Datatype(?aczbfunf) = xsd:string) [#1]
      │        `─ MergeJoin(?skjulbarEnhet) [#1]
      │           +─ Scan[POSC](?skjulbarEnhet, rdf:type, <http://data.einnsyn.no/virksomhetmeta/Bydel>) [#15]
      │           `─ Scan[PSOC](?skjulbarEnhet, <http://data.einnsyn.no/virksomhetmeta/orgnummer>, ?aczbfunf) [#140]
      `─ Union [#4]
         +─ Union [#2]
         │  +─ Filter(Datatype(?bmsjiknk) = xsd:string) [#1]
         │  │  `─ MergeJoin(?skjulbarEnhet) [#1]
         │  │     +─ Scan[POSC](?skjulbarEnhet, rdf:type, <http://data.einnsyn.no/virksomhetmeta/DummyEnhet>) [#3]
         │  │     `─ Scan[PSOC](?skjulbarEnhet, <http://data.einnsyn.no/virksomhetmeta/orgnummer>, ?bmsjiknk) [#140]
         │  `─ Filter(Datatype(?laankbhz) = xsd:string) [#1]
         │     `─ MergeJoin(?skjulbarEnhet) [#1]
         │        +─ Scan[POSC](?skjulbarEnhet, rdf:type, <http://data.einnsyn.no/virksomhetmeta/Enhet>) [#2]
         │        `─ Scan[PSOC](?skjulbarEnhet, <http://data.einnsyn.no/virksomhetmeta/orgnummer>, ?laankbhz) [#140]
         `─ Union [#2]
            +─ Filter(Datatype(?lzxiigae) = xsd:string) [#1]
            │  `─ MergeJoin(?skjulbarEnhet) [#1]
            │     +─ Scan[POSC](?skjulbarEnhet, rdf:type, <http://data.einnsyn.no/virksomhetmeta/Organ>) [#2]
            │     `─ Scan[PSOC](?skjulbarEnhet, <http://data.einnsyn.no/virksomhetmeta/orgnummer>, ?lzxiigae) [#140]
            `─ Filter(Datatype(?jlocplsi) = xsd:string) [#1]
               `─ MergeJoin(?skjulbarEnhet) [#1]
                  +─ Scan[POSC](?skjulbarEnhet, rdf:type, <http://data.einnsyn.no/virksomhetmeta/Utvalg>) [#30]
                  `─ Scan[PSOC](?skjulbarEnhet, <http://data.einnsyn.no/virksomhetmeta/orgnummer>, ?jlocplsi) [#140]

I’m seeing the same plan from Java, but no results.

Cheers,
Håvard

Do you see the same plan with Stardog 5?

That plan is from Stardog 5. I see the same plan in java as in the terminal. But no results from java. No results from the web GUI either.

Hi,

I’m unable to reproduce with the data set that I have. Could you share the java code you’re using to run the query?

I’ll have to try to make a proof of concept for you before I go on vacation tomorrow.

Håvard

I’m not able to reproduce this anymore (deleted my original code unfortunately). Let’s hope that is was just a typo.