Makes BIND evaluation pass the SPARQL tests

pull/10/head
Tpt 5 years ago
parent 4f00ed8266
commit 585917344c
  1. 21
      lib/src/sparql/eval.rs
  2. 6
      lib/tests/sparql_test_cases.rs

@ -241,20 +241,13 @@ impl<'a, S: StoreConnection + 'a> SimpleEvaluator<S> {
expression,
} => {
let eval = self.clone();
Box::new(
self.eval_plan(&*child, from)
.filter_map(move |tuple| match tuple {
Ok(mut tuple) => {
put_value(
*position,
eval.eval_expression(&expression, &tuple)?,
&mut tuple,
);
Some(Ok(tuple))
}
Err(error) => Some(Err(error)),
}),
)
Box::new(self.eval_plan(&*child, from).map(move |tuple| {
let mut tuple = tuple?;
if let Some(value) = eval.eval_expression(&expression, &tuple) {
put_value(*position, value, &mut tuple)
}
Ok(tuple)
}))
}
PlanNode::Sort { child, by } => {
let iter = self.eval_plan(&*child, from);

@ -76,8 +76,10 @@ fn sparql_w3c_query_evaluation_testsuite() -> Result<()> {
"http://www.w3.org/2001/sw/DataAccess/tests/data-r2/type-promotion/manifest.ttl",
];
let manifest_11_urls =
vec!["http://www.w3.org/2009/sparql/docs/tests/data-sparql11/exists/manifest.ttl"];
let manifest_11_urls = vec![
"http://www.w3.org/2009/sparql/docs/tests/data-sparql11/bind/manifest.ttl",
"http://www.w3.org/2009/sparql/docs/tests/data-sparql11/exists/manifest.ttl",
];
let test_blacklist = vec![
//Multiple writing of the same xsd:integer. Our system does strong normalization.

Loading…
Cancel
Save