Skip to content
This repository has been archived by the owner on Dec 29, 2017. It is now read-only.

Commit

Permalink
Minor bug fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Feb 15, 2011
1 parent afdd054 commit 4c6fb5f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/sparql/algebra/operator/left_join.rb
Expand Up @@ -4,7 +4,7 @@ class Operator
# The SPARQL GraphPattern `leftJoin` operator.
#
# @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
class LeftJoin < Operator
class LeftJoin < Operator
include Query

NAME = [:leftjoin]
Expand Down Expand Up @@ -50,7 +50,7 @@ def execute(queryable, options = {})
# @return [Union, RDF::Query] `self`
def optimize
ops = operands.map {|o| o.optimize }.select {|o| o.respond_to?(:empty?) && !o.empty?}
expr = ops.pop if unless ops.last.executable?
expr = ops.pop unless ops.last.executable?
expr = nil if expr.respond_to?(:true?) && expr.true?

# ops now is one or two executable operators
Expand Down
4 changes: 2 additions & 2 deletions lib/sparql/algebra/operator/prefix.rb
Expand Up @@ -4,7 +4,7 @@ class Operator
# The SPARQL GraphPattern `prefix` operator.
#
# @see http://www.w3.org/TR/xpath-functions/#func-numeric-add
class Prefix < Operator::Binary
class Prefix < Binary
include Query

NAME = [:prefix]
Expand All @@ -22,7 +22,7 @@ class Prefix < Operator::Binary
# the resulting solution sequence
# @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
def execute(queryable, options = {})
@solutions = operands.last.execute(queriable, options = {})
@solutions = operands.last.execute(queryable, options = {})
end

##
Expand Down
4 changes: 2 additions & 2 deletions lib/sparql/algebra/operator/project.rb
Expand Up @@ -23,8 +23,8 @@ class Project < Operator::Binary
# @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
def execute(queryable, options = {})
@solutions = operands.last.
execute(queriable, options = {}).
project(operands.first)
execute(queryable, options = {}).
project(*(operands.first))
end

##
Expand Down

0 comments on commit 4c6fb5f

Please sign in to comment.