View Source Tablex.Optimizer.Helper (tablex v0.3.0)
Link to this section Summary
Functions
Check if a input condition covers by another.
Fix ids of rules.
Check if an output is meaningful. A meaningful output is one that does not contain all :any elements.
Merge two input stubs
Merge two inputs.
Merge two outputs. Stub value with higher priority wins.
Order an already sorted, list of rules by hit policy.
Order a list of table rules by priority, high to low.
Sort the rules according to a hit policy.
Link to this section Types
@type order() :: :h2l | :l2h
@type rule() :: Tablex.Table.rule()
Link to this section Functions
Check if a input condition covers by another.
Fix ids of rules.
Check if an output is meaningful. A meaningful output is one that does not contain all :any elements.
Merge two input stubs
Merge two inputs.
Merge two outputs. Stub value with higher priority wins.
example
Example
iex > merge_outputs([1, 2, 3], [2, 4, 6]) [1, 2, 3]
iex > merge_outputs([:any, 2, :any], [2, :any, 6]) [2, 2, 6]
@spec order_by_priority( [rule()], current_order :: order(), Tablex.HitPolicy.hit_policy() ) :: [rule()]
Order an already sorted, list of rules by hit policy.
Order a list of table rules by priority, high to low.
Sort the rules according to a hit policy.