diff --git a/lib/src/sparql/plan_builder.rs b/lib/src/sparql/plan_builder.rs
index 873db541..2608ca23 100644
--- a/lib/src/sparql/plan_builder.rs
+++ b/lib/src/sparql/plan_builder.rs
@@ -775,7 +775,8 @@ impl<'a> PlanBuilder<'a> {
TermOrVariable::Variable(variable) => {
PatternValue::Variable(variable_key(variables, variable))
}
- TermOrVariable::Term(Term::BlankNode(bnode)) => {
+ TermOrVariable::NamedNode(node) => PatternValue::Constant(self.build_named_node(node)?),
+ TermOrVariable::BlankNode(bnode) => {
PatternValue::Variable(variable_key(
variables,
&Variable {
@@ -784,7 +785,9 @@ impl<'a> PlanBuilder<'a> {
))
//TODO: very bad hack to convert bnode to variable
}
- TermOrVariable::Term(term) => PatternValue::Constant(self.build_term(term)?),
+ TermOrVariable::Literal(literal) => {
+ PatternValue::Constant(self.build_literal(literal)?)
+ }
})
}
@@ -806,7 +809,7 @@ impl<'a> PlanBuilder<'a> {
fn encode_bindings(
&mut self,
table_variables: &[Variable],
- rows: &[Vec