class Axiom::Optimizer::Algebra::Rename::RestrictionOperand

Optimize when the operand is a Restriction

Public Instance Methods

optimizable?() click to toggle source

Test if the operand is a Restriction

@return [Boolean]

@api private

# File lib/axiom/optimizer/algebra/rename.rb, line 160
def optimizable?
  operand.kind_of?(Axiom::Algebra::Restriction)
end
optimize() click to toggle source

Wrap the Rename in a Restriction

@return [Restriction]

@api private

# File lib/axiom/optimizer/algebra/rename.rb, line 169
def optimize
  wrap_operand.restrict(rename_predicate)
end

Private Instance Methods

rename_predicate() click to toggle source

Rename the operand predicate

@return [Function]

@api private

# File lib/axiom/optimizer/algebra/rename.rb, line 180
def rename_predicate
  operand.predicate.rename(aliases)
end