class Axiom::Optimizer::Algebra::Projection::UnionOperand
Optimize when the operand is a Union
Public Instance Methods
optimizable?()
click to toggle source
Test if the operand is a Union
@return [Boolean]
@api private
# File lib/axiom/optimizer/algebra/projection.rb, line 120 def optimizable? operand.kind_of?(Axiom::Algebra::Union) end
optimize()
click to toggle source
Wrap each operand in the Union
in a Projection
@return [Set]
@api private
# File lib/axiom/optimizer/algebra/projection.rb, line 129 def optimize wrap_left.union(wrap_right) end
Private Instance Methods
wrap_left()
click to toggle source
Utility method to wrap the left operand in a Projection
@return [Projection]
@api private
# File lib/axiom/optimizer/algebra/projection.rb, line 140 def wrap_left wrap_operand(operand.left) end
wrap_right()
click to toggle source
Utility method to wrap the right operand in a Projection
@return [Projection]
@api private
# File lib/axiom/optimizer/algebra/projection.rb, line 149 def wrap_right wrap_operand(operand.right) end