Sha256: 2e033dc69ac3b0d307855eb18f118f4148211d02cfd0323f957d789fa8832257
Contents?: true
Size: 1.66 KB
Versions: 1
Compression:
Stored size: 1.66 KB
Contents
# encoding: utf-8 module Axiom class Optimizer module Algebra # Abstract base class representing Difference optimizations class Difference < Relation::Operation::Binary # Optimize when operands are equal class EqualOperands < self include Relation::Operation::Binary::EqualOperands # A Difference with equal operands is empty # # @return [Relation::Empty] # # @api private def optimize Axiom::Relation::Empty.new(operation.header) end end # class EqualOperands # Optimize when the left operand is empty class EmptyLeft < self include Relation::Operation::Binary::EmptyLeft # A Difference with an empty left operand is empty # # @return [Relation::Empty] # # @api private def optimize left end end # class EmptyLeft # Optimize when the right operand is empty class EmptyRight < self include Relation::Operation::Binary::EmptyRight # A Difference with an empty right operand is equivalent to the left # # @return [Relation] # # @api private def optimize left end end # class EmptyRight Axiom::Algebra::Difference.optimizer = chain( EqualOperands, EmptyLeft, EmptyRight, OrderLeft, OrderRight, MaterializedOperands, UnoptimizedOperands ) end # class Difference end # module Algebra end # class Optimizer end # module Axiom
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axiom-optimizer-0.1.1 | lib/axiom/optimizer/algebra/difference.rb |