Module: Axiom::Optimizer::Relation::Operation::Unary::SortedOperand

Overview

Optimize when the operand is an Sorted

Instance Method Summary collapse

Instance Method Details

#optimizable?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Test if the operand is an Sorted

Returns:

  • (Boolean)


37
38
39
# File 'lib/axiom/optimizer/relation/operation/unary.rb', line 37

def optimizable?
  operand.kind_of?(Axiom::Relation::Operation::Sorted)
end

#optimizeSorted

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Drop the Sorted and wrap the operand

Returns:



46
47
48
# File 'lib/axiom/optimizer/relation/operation/unary.rb', line 46

def optimize
  wrap_operand
end