2015-09-02 26 views
3

芝麻2.8.4似乎有bug。 芝麻2.8.4子查詢限制錯誤修復?

如果我有下面的數據集:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. 
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>. 
@prefix : <http://example.org/>. 

:a rdf:type :AClass . 
:a :hasName "a"^^xsd:string . 
:a :hasProperty :xa . 
:a :hasProperty :ya . 
:a :hasProperty :za . 

:b rdf:type :AClass . 
:b :hasName "b"^^xsd:string . 
:b :hasProperty :xb . 
:b :hasProperty :yb . 

:c rdf:type :AClass . 
:c :hasName "c"^^xsd:string . 
:c :hasProperty :xc . 

,並在其上運行以下查詢:

prefix : <http://example.org/> 
select ?s ?p ?o { 
#-- first, select two instance of :AClass 
{ select ?s { ?s a :AClass } limit 2 } 

#-- then, select all the triples of 
#-- which they are subjects 
?s ?p ?o 
} 

結果我得到的回覆是這樣的:

-------------------------------------------------------------------- 
| s | p             | o  | 
==================================================================== 
| :a | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | :AClass | 
| :a | :hasName           | "a"  | 
-------------------------------------------------------------------- 

而不是這個是正確的結果:

-------------------------------------------------------------------- 
| s | p             | o  | 
==================================================================== 
| :a | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | :AClass | 
| :a | :hasName           | "a"  | 
| :a | :hasProperty          | :xa  | 
| :a | :hasProperty          | :ya  | 
| :a | :hasProperty          | :za  | 
| :b | <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> | :AClass | 
| :b | :hasName           | "b"  | 
| :b | :hasProperty          | :xb  | 
| :b | :hasProperty          | :yb  | 
-------------------------------------------------------------------- 

有沒有人知道這個錯誤?有沒有人遇到同樣的問題?還是有另一個版本的芝麻修復了這個bug?

爲了避免任何混淆:我的問題得到回答後加入

下一行bug是在工作臺,而不是查詢引擎。 查詢引擎完美工作。

+2

不回答你的問題,但你需要'{select ** DISTINCT **?s {?s a:AClass} limit 2}'現在,內部select可以返回:a和:a。 – AndyS

+0

@AndyS對不起,但如果我添加** DISTINCT **它給了我完全相同的結果。它沒有其他作用。我已經嘗試過了。 – whitefang1993

+0

@AndyS:爲什麼內部select會返回兩次相同的URI?圖中不應該只有一個三元組(::rdf:type:AClass)? – AKSW

回答

2

您看到的問題不是查詢引擎中的錯誤,而是Workbench客戶端應用程序中的錯誤(這也解釋了爲什麼我以前無法重現它,因爲我使用的是命令行客戶端)。出於某種原因,工作臺錯誤地呈現的結果,僅示出2行(儘管在頭說有9周的結果被示出):

問題是在工作臺相關的結果尋呼功能,因爲當您更改設置突然不顯示完整的結果:

這個問題現在已經被記錄爲芝麻的問題跟蹤器中的錯誤:SES-2307