|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.axiondb.engine.commands.AxionQueryOptimizer
public class AxionQueryOptimizer
Axion Query Optimizer
Constructor Summary | |
---|---|
AxionQueryOptimizer()
|
Method Summary | |
---|---|
static Selectable |
createOneRootFunction(java.util.Set conditions)
Compose back the decomposed condition into a single condition tree. |
static java.util.Set[] |
decomposeWhereConditionNodes(java.util.Set flattenConditionSet,
boolean isAllInnerJoin)
Decomose a where/join condition into three part: (1) column-column comparision function (2) column-literal conditions. |
static java.util.Set |
deriveTableFilter(java.util.Set flattenConditions,
boolean isAllInnerJoin)
Decomposes the given WhereNode into a Set of nodes that were
originally joined by ANDs, and adds to this set predicates that are implied by the
original tree (for example, given A = 1 and A = B, we can
infer B = 1.) |
static Function |
findColumnLiteralEqualFunction(TableIdentifier tid,
Table table,
java.util.Set conditions,
boolean mustCheckForIndex)
|
static Function |
findColumnLiteralFunction(TableIdentifier tid,
Table table,
java.util.Set conditions,
boolean mustCheckForIndex)
Find column-literal comparision function for a given table. |
static ComparisonFunction |
findFirstColumnColumnComparisonFunction(java.util.Set columnColumnConditions,
TableIdentifier tid,
Table table,
boolean mustCheckForIndex)
|
static EqualFunction |
findFirstEqualFunction(java.util.Set columnColumnConditions,
TableIdentifier tid,
Table table,
boolean mustCheckForIndex)
|
static java.util.Set |
flatConditionTree(Selectable conditionTree)
Flatten the given condition tree into an ANDed set |
static Selectable |
getColumnRefersTable(ComparisonFunction fn,
TableIdentifier tid)
|
static boolean |
hasTableReference(ComparisonFunction fn,
TableIdentifier tid)
|
static boolean |
isAllInnerJoin(java.lang.Object node)
|
static Function |
isColumnIndexed(TableIdentifier tid,
Table table,
Selectable condition,
boolean mustCheckForIndex)
|
static boolean |
onlyReferencesTable(TableIdentifier table,
Selectable conditionNode)
Check if the given table is the only table refernce in the condition |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AxionQueryOptimizer()
Method Detail |
---|
public static Selectable createOneRootFunction(java.util.Set conditions)
conditions
- decomposed condition set
public static java.util.Set[] decomposeWhereConditionNodes(java.util.Set flattenConditionSet, boolean isAllInnerJoin)
flattenConditionSet
- Flatten Condition Set, created from the where/join
condition, or combined where and join condition set
public static boolean hasTableReference(ComparisonFunction fn, TableIdentifier tid)
public static Selectable getColumnRefersTable(ComparisonFunction fn, TableIdentifier tid)
public static java.util.Set deriveTableFilter(java.util.Set flattenConditions, boolean isAllInnerJoin) throws AxionException
WhereNode
into a Set
of nodes that were
originally joined by ANDs, and adds to this set predicates that are implied by the
original tree (for example, given A = 1 and A = B, we can
infer B = 1.)
flattenConditions
-
AxionException
public static Function findColumnLiteralFunction(TableIdentifier tid, Table table, java.util.Set conditions, boolean mustCheckForIndex)
tid
- TableIdentifierconditions
- decomposed condition set
public static Function findColumnLiteralEqualFunction(TableIdentifier tid, Table table, java.util.Set conditions, boolean mustCheckForIndex)
public static Function isColumnIndexed(TableIdentifier tid, Table table, Selectable condition, boolean mustCheckForIndex)
public static ComparisonFunction findFirstColumnColumnComparisonFunction(java.util.Set columnColumnConditions, TableIdentifier tid, Table table, boolean mustCheckForIndex) throws AxionException
AxionException
public static EqualFunction findFirstEqualFunction(java.util.Set columnColumnConditions, TableIdentifier tid, Table table, boolean mustCheckForIndex) throws AxionException
AxionException
public static java.util.Set flatConditionTree(Selectable conditionTree)
conditionTree
- condition tree
public static boolean onlyReferencesTable(TableIdentifier table, Selectable conditionNode)
table
- TableIdentifierconditionNode
-
public static boolean isAllInnerJoin(java.lang.Object node)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |