Class: Veritas::Optimizer::Relation::Materialized::EmptyOperand
- Inherits:
-
Veritas::Optimizer::Relation::Materialized
- Object
- Veritas::Optimizer
- Veritas::Optimizer::Relation::Materialized
- Veritas::Optimizer::Relation::Materialized::EmptyOperand
- Defined in:
- lib/veritas/optimizer/relation/materialized.rb
Overview
Optimize when the operand is Empty
Constant Summary
Constants inherited from Veritas::Optimizer
Instance Attribute Summary
Attributes inherited from Veritas::Optimizer
Instance Method Summary collapse
-
#optimizable? ⇒ Boolean
private
Test if the operand is empty.
-
#optimize ⇒ Empty
private
Return a new Empty relation with the operation’s headers.
Methods inherited from Veritas::Optimizer
Constructor Details
This class inherits a constructor from Veritas::Optimizer
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 empty
18 19 20 |
# File 'lib/veritas/optimizer/relation/materialized.rb', line 18 def optimizable? operation.empty? end |
#optimize ⇒ Empty
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 a new Empty relation with the operation’s headers
27 28 29 30 |
# File 'lib/veritas/optimizer/relation/materialized.rb', line 27 def optimize operation = self.operation Veritas::Relation::Empty.new(operation.header, operation) end |