lib/axiom/optimizer/algebra/rename.rb in axiom-optimizer-0.1.1 vs lib/axiom/optimizer/algebra/rename.rb in axiom-optimizer-0.2.0

- old
+ new

@@ -133,11 +133,11 @@ # # @return [Hash] # # @api private def alias_names - aliases.to_hash.values.map { |attribute| attribute.name } + aliases.to_hash.values.map(&:name) end # Returns the attributes removed from the projection # # @return [#all?] @@ -247,35 +247,35 @@ wrap_operand.reverse end end # class ReverseOperand - # Optimize when the operand is an Order - class OrderOperand < self - include Relation::Operation::Unary::OrderOperand + # Optimize when the operand is an Sorted + class SortedOperand < self + include Relation::Operation::Unary::SortedOperand - # Wrap the Rename in an Order + # Wrap the Rename in an Sorted # - # @return [Order] + # @return [Sorted] # # @api private def optimize - wrap_operand.sort_by { directions } + wrap_operand.sort_by(directions) end private # Return the renamed directions # - # @return [Relation::Operation::Order::DirectionSet] + # @return [Relation::Operation::Sorted::DirectionSet] # # @api private def directions operand.directions.rename(aliases) end - end # class OrderOperand + end # class SortedOperand # Optimize when the operand is a Limit class LimitOperand < self # Test if the operand is a Limit @@ -365,10 +365,10 @@ RenameOperand, ProjectionOperand, RestrictionOperand, SetOperand, ReverseOperand, - OrderOperand, + SortedOperand, LimitOperand, OffsetOperand, EmptyOperand, MaterializedOperand, UnoptimizedOperand