com.lucidera.lcs
Class LcsIndexOptimizer.Filter2IndexMapping

java.lang.Object
  extended by com.lucidera.lcs.LcsIndexOptimizer.Filter2IndexMapping
Enclosing class:
LcsIndexOptimizer

private static class LcsIndexOptimizer.Filter2IndexMapping
extends Object


Field Summary
(package private)  Map<LcsIndexOptimizer.SargColumnFilter,FemLocalIndex> filter2IndexMap
           
(package private)  Map<FemLocalIndex,Integer> index2MatchedPosMap
           
 
Constructor Summary
LcsIndexOptimizer.Filter2IndexMapping()
           
 
Method Summary
(package private)  void add(LcsIndexOptimizer.IndexFilterTuple tup)
          adds a tuple(index,listOfFilters).
(package private)  void add(LcsIndexOptimizer.SargColumnFilter filter, FemLocalIndex index)
           
(package private)  void clear()
           
(package private)  void copyFrom(LcsIndexOptimizer.Filter2IndexMapping srcMapping)
           
(package private)  Double getSelectivity(RelStatSource tabStats)
           
 int hashCode()
           
(package private)  void remove(LcsIndexOptimizer.SargColumnFilter filter)
          Remove a filter from the current mapping.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filter2IndexMap

Map<LcsIndexOptimizer.SargColumnFilter,FemLocalIndex> filter2IndexMap

index2MatchedPosMap

Map<FemLocalIndex,Integer> index2MatchedPosMap
Constructor Detail

LcsIndexOptimizer.Filter2IndexMapping

LcsIndexOptimizer.Filter2IndexMapping()
Method Detail

add

void add(LcsIndexOptimizer.SargColumnFilter filter,
         FemLocalIndex index)

add

void add(LcsIndexOptimizer.IndexFilterTuple tup)
adds a tuple(index,listOfFilters). a tuple (filter, index) is always added regardless the existence of the filter in the filter2IndexMap existing (filter,index) will be overridden, but the mapped position of the overridden index will not be changed Example:

Parameters:
tup - the tuple to add

remove

void remove(LcsIndexOptimizer.SargColumnFilter filter)
Remove a filter from the current mapping. Note this method removes the mapping of a filter that maps to an index with all prior positions still mapped to other filters. The recursion that callss this method ensures filters are "popped" in the reverse order they are matched to index positions, and the adjustment to "mapped index position" is therefore -1.

Example:

Filter2Indexmapping goes through the following state change in one call of getBestIndex(). The fields in () are the index and its current mapped position. The mapping in [] are the ones costed. C (X,1) -> C,A (X,2) -> [C,A,B (X,3)] -> C,A (X,2) -> C (X,1) -> C (Y,1) -> C,B(Y,2) -> [C,B,A (Y,3)]

Parameters:
filter - filter to unmap

clear

void clear()

copyFrom

void copyFrom(LcsIndexOptimizer.Filter2IndexMapping srcMapping)

getSelectivity

Double getSelectivity(RelStatSource tabStats)

hashCode

public int hashCode()
Overrides:
hashCode in class Object