|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.sarg.SargRexAnalyzer
public class SargRexAnalyzer
SargRexAnalyzer attempts to translate a rex predicate into a SargBinding
. It assumes that the predicate expression is already
well-formed.
Nested Class Summary | |
---|---|
private class |
SargRexAnalyzer.BooleanConvertlet
|
private class |
SargRexAnalyzer.CallConvertlet
|
private class |
SargRexAnalyzer.ComparisonConvertlet
|
private class |
SargRexAnalyzer.NodeVisitor
|
Field Summary | |
---|---|
private RexInputRef |
boundInputRef
|
private Map<SqlOperator,SargRexAnalyzer.CallConvertlet> |
convertletMap
|
private RexNode |
coordinate
|
private List<SargExpr> |
exprStack
|
private SargFactory |
factory
|
private boolean |
failed
|
private int |
lowerRexInputIdx
If >= 0, treat RexInputRefs whose index is within the range [lowerRexInputIdx, upperRexInputIdx) as coordinates in expressions |
private List<RexNode> |
nonSargFilterList
|
private boolean |
reverse
|
private List<RexNode> |
rexCFList
|
private Map<SargExpr,RexNode> |
sarg2RexMap
|
private List<SargBinding> |
sargBindingList
|
private boolean |
simpleMode
If true, conjuntions on the same input reference are disallowed, as well as all disjunctions. |
private int |
upperRexInputIdx
If >= 0, treat RexInputRefs whose index is within the range [lowerRexInputIdx, upperRexInputIdx) as coordinates in expressions |
private boolean |
variableSeen
|
Constructor Summary | |
---|---|
SargRexAnalyzer(SargFactory factory,
boolean simpleMode)
|
|
SargRexAnalyzer(SargFactory factory,
boolean simpleMode,
int lowerRexInputRef,
int upperRexInputRef)
|
Method Summary | |
---|---|
SargBinding |
analyze(RexNode rexPredicate)
Analyzes a rex predicate. |
List<SargBinding> |
analyzeAll(RexNode rexPredicate)
Analyzes a rex predicate. |
private void |
clearLeaf()
|
RexNode |
getNonSargFilterRexNode()
Reconstructs a rex predicate from the non-sargable filter predicates which are AND'ed together. |
RexNode |
getPostFilterRexNode()
Deprecated. use getNonSargFilterRexNode() |
RexNode |
getResidualSargRexNode(List<SargBinding> residualSargList)
Deprecated. use getSargBindingListToRexNode(List) |
RexNode |
getSargBindingListToRexNode(List<SargBinding> sargBindingList)
Reconstructs a rex predicate from a list of SargBindings which are AND'ed together. |
private void |
recomposeConjunction()
Reconstructs a rex predicate from a list of SargExprs which will be AND'ed together. |
private void |
registerConvertlet(SqlOperator op,
SargRexAnalyzer.CallConvertlet convertlet)
|
private boolean |
testDynamicParamSupport(SargExpr sargExpr)
Tests whether we can support the usage of dynamic parameters in a given SargExpr. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final SargFactory factory
private final boolean simpleMode
private final Map<SqlOperator,SargRexAnalyzer.CallConvertlet> convertletMap
private boolean failed
private RexInputRef boundInputRef
private RexNode coordinate
private boolean variableSeen
private boolean reverse
private List<SargExpr> exprStack
private List<RexNode> rexCFList
private List<RexNode> nonSargFilterList
private List<SargBinding> sargBindingList
private Map<SargExpr,RexNode> sarg2RexMap
private int lowerRexInputIdx
private int upperRexInputIdx
Constructor Detail |
---|
SargRexAnalyzer(SargFactory factory, boolean simpleMode)
SargRexAnalyzer(SargFactory factory, boolean simpleMode, int lowerRexInputRef, int upperRexInputRef)
Method Detail |
---|
private void registerConvertlet(SqlOperator op, SargRexAnalyzer.CallConvertlet convertlet)
private void recomposeConjunction()
public List<SargBinding> analyzeAll(RexNode rexPredicate)
rexPredicate
- predicate to be analyzed
private boolean testDynamicParamSupport(SargExpr sargExpr)
sargExpr
- expression to test
public RexNode getNonSargFilterRexNode()
public RexNode getPostFilterRexNode()
getNonSargFilterRexNode()
public RexNode getSargBindingListToRexNode(List<SargBinding> sargBindingList)
sargBindingList
- list of SargBindings to be converted.
public RexNode getResidualSargRexNode(List<SargBinding> residualSargList)
getSargBindingListToRexNode(List)
public SargBinding analyze(RexNode rexPredicate)
rexPredicate
- predicate to be analyzed
private void clearLeaf()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |