GDD-Nantes / FedShop

Code for FedShop: The Federated Shop Benchmark
GNU General Public License v3.0
8 stars 0 forks source link

FedX crashes when not all triple patterns have source #25

Closed mhoangvslev closed 1 year ago

mhoangvslev commented 1 year ago

Given the q11 below:

PREFIX bsbm: <http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/vocabulary/>

SELECT DISTINCT ?property ?hasValue ?isValueOf WHERE {
    # const <http://www.vendor0.fr/Offer831>
    <http://www.vendor0.fr/Offer831> bsbm:product ?product . 
    { <http://www.vendor0.fr/Offer831> ?property ?hasValue }
    UNION
    { ?isValueOf ?property <http://www.vendor0.fr/Offer831> }
}

Because in BSBM schema, nothing has a link to an offer, { ?isValueOf ?property <http://www.vendor0.fr/Offer831> } yield no result. As such, there is no source pour that tp.

mhoangvslev commented 1 year ago

when parsing provenance.csv, split by default strip the result string, therefore if the empty source for the first or last triple pattern, it will get strip. The limit option allows us to work around this:

String test = "a,b,c"
System.out.println(test.split(',')) // output: [a, b]
System.out.println(test.split(',', -1)) // output: [a, b, '']