Class: Veritas::Optimizer::Function::Connective::Conjunction::OptimizableToExclusion

Inherits:
Veritas::Optimizer::Function::Connective::Conjunction show all
Defined in:
lib/veritas/optimizer/function/connective/conjunction.rb

Overview

Optimize when the operands are inequality predicates for the same attribute

Constant Summary

Constant Summary

Constants inherited from Veritas::Optimizer

Identity, VERSION

Instance Attribute Summary

Attributes included from Binary

#left, #right

Attributes inherited from Veritas::Optimizer

#operation

Instance Method Summary (collapse)

Methods included from Binary

#initialize

Methods inherited from Veritas::Optimizer

chain, #initialize, link_optimizers

Instance Method Details

- (Boolean) optimizable?

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 operands are inequality predicates for the same attribute



65
66
67
# File 'lib/veritas/optimizer/function/connective/conjunction.rb', line 65

def optimizable?
  inequality_with_same_attributes?
end

- (Exclusion) optimize

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.

Return an Exclusion for an attribute against a set of values



74
75
76
# File 'lib/veritas/optimizer/function/connective/conjunction.rb', line 74

def optimize
  left.left.exclude(merged_right_enumerables).optimize
end