If the object can be added to the array list, then
add it, but store it in the hash table with the QueryObject
as the key and the StatisticsObject as the value.
add(String) -
Method in interface edu.wpi.cs.dsrg.xmldb.xat.common.treestructure.ListPattern
Statistics that wish to keep an aggregate value (total), mean, min and max, but report
their values in increments (such as the statistic from the last running) as opposed to
the overall total, should derive from this class instead of AggregateStatisticsObject.
An alternate definition for createString
This definition accepts a string, it then looks up the value in the varTable
and returns the representation with "." instead of "/" between steps
steps into one long string.
CREDITS -
Static variable in class edu.wpi.cs.dsrg.xmldb.xat.testfiles.TestKweelt
A global point to denote where is the current parent we are working with.
cut -
Static variable in class edu.wpi.cs.dsrg.xmldb.xat.testfiles.TestSXE
cutted -
Variable in class edu.wpi.cs.dsrg.xmldb.xat.component.schemacleanup.CutVisitor
Indicates whether some of the node got cutted.
CutVisitor - class edu.wpi.cs.dsrg.xmldb.xat.component.schemacleanup.CutVisitor.
This class will call the SchemaVisitor to compute the Minimum Schema,
call the RequiredVisitor to compute the Required Columns, and
do the cutting if the required columns not in produced and modified.
Delete redundent Rename operator
This method compares the old column name and new column, if they are equal
or both of them are null, then return true, else return false.
This function uses two static buffers to determine midpoint values,
therefore, if this code is used within recursive calls, it will
be necessary to call this function with "reset" as the parameter
in order to zero out the static strings.
find an operator, using post order breadth first search
call operator evaluator, then if take the resulting SQLFragment
and add it to the SQLIncrementalStatement if the operator was evaluated
GENERIC -
Static variable in class edu.wpi.cs.dsrg.xmldb.xat.component.statisticsgatherer.StatisticsGatherer
GEQ -
Static variable in interface edu.wpi.cs.dsrg.xmldb.xat.common.expression.BinCOMPExpression
Return the columnNames associated with this DomPatternNode
use the toListPattern method which traverses the tree
but toListPattern produces a Vector with both the tagNames and columnNames
in it, so we need to remove the tagNames
Therefore, create a new Vector which just has a string representation of
the columnNames of the ListPattern
The getMethod function will trying to get all the classes and also the interfaces from the lower level to the
higher level to figure out which will be the proper method to invoke.
Returns the value for given property of the queryObject in the current category
If this statistics object does not support this operation, an error will be thrown
traverse up the tree, starting from the startingPoint parameter,
checking if columnToFind is used
in any entry point in a Navigate, parameter in a Select, or
column in a Tagger.
Compute the Minimum Schema through the SchemaVisitor, the Required
Columns through the RequiredVisitor, and do the cutting if the required
columns not in produced and modified.
Return the correct factory as specified by a System parameter called
"edu.wpi.cs.dsrg.xmldb.xat.component.operatorfactory"
The property name can be accessed through OperatorFactory.factoryID
if no property is set then an exception is thrown and tree generation cannot continue
Creates a new instance of OperatorBuilder that will be used to generate operators
The various subclasses of this class will return different OperatorBuilders
based on the subclass
processOperator will call evaluateOperator on the param operator
then take the QueryResult object that was returned and will add the
sql fragment to the incremental SQL statement if the operator was evaluated
the toProcess operator will then be deleted from the tree
QueryFragment contains a fragment type,
a name, a binding, and in some cases, a list of parameters
The name is the name of the table or column name to use
The binding is what to rename the name to,
so SELCECT xxx AS yyy, has a name of xxx and a binding of yyy and the
clause type is select
This method recursively look at the DOM Tree, traverses through the DOMPattern tree,
which has a DOMPatternNoe as root, until it finds all TagNode and ColumnNameNode.
ReWriteTraversal is the traversal strategy used in the rewrite steps
It is responsible for iterating over an XAT algebra tree and finding 2 nodes
to evaluate equivalence rules on.
This method will strip the original column element from the Select
leaving the renamed value
string so that it can be used appropriately the outmost nest:
"s100004".EDGES AS "$col220001"
to
"$col220001"
The input will resemble "SELECT [DISTINCT]? "blue"."blee" as "blah"
The output will resemble "SELECT [DISTINCT]? "blah""
Creation date: (4/8/2003 2:14:35 PM)
This method will strip the renaming elements from the Select
string so that it can be used appropriately in nested queries:
"s100004".EDGES AS "$col220001"
to
"s100004".EDGES
The input will resemble "SELECT [DISTINCT]? "blue"."blee" as "blah"
The output will resemble "SELECT [DISTINCT]? "blue"."blee""
Creation date: (4/7/2003 2:14:35 PM)
This method will translate the rename element to the Column Name element
"$col220001"
to
"s100004".EDGES
The input will resemble "WHERE "blah" = ..."
The output will resemble "WHERE "blee.bloo" = ..."
Creation date: (4/8/2003 2:14:35 PM)
Iterates over a tree starting at the root parameter
traverses to the right child, then left child, then decides whether to evalutate this operator
Once an operator's children have been examined, the operator is then processed and the
result is added to sqlsmt.
tree -
Variable in class edu.wpi.cs.dsrg.utils.Debugger
Evaluates a Distinct Operator and determines the SQL equivalent of the destination
The result contains a fragment with the Distinct's output name in it
Evaluates a Function Operator and determines the SQL equivalent
The function name is the name parameter of the result
The function parameters go into the parameters field of the result
The function binding is the binding of the result
Evaluates an GroupBy Operator and determines the SQL equivalent of the destination
take all of the columns names in the orderBy and add them to the oderBy clause
the result will look like GroupBy col1, col2, etc
Evaluates an GroupBy Operator and determines the SQL equivalent of the destination
take all of the columns names in the orderBy and add them to the oderBy clause
the result will look like GroupBy col1, col2, etc
GroupBy returns multiple SQL fragments, 1 for the groupBy and 1 for each of the operators in its subTree
Therefore, we first visit the subTree first
Evaluates a Join Operator and determines the SQL equivalent of the destination
This adds to the where clause, it will look like Where $a = '10'
Same thing as select
Determines the type of XPath (child, descendant-or-self)
Contains an axis variable
Calls the NodeTest object
The result is either a NameTest or NodeType object visit call
Evaluates a Navigate Operator and determines the SQL equivalent of the destination
If the Navigate contains a row in the destination, it goes to the FROM, otherwise
it goes to the SELECT
Rules for pushing a Navigate operator through a Groupby operator
A Navigate can, but for the sake of order sensitive rewrite, is never
pushed through a groupby (due to the way the tree is generated, this
would normally only allow a navunnest of a text() to be pushed anyway).
Rules for pushing a Navigate operator through a NameColumn operator
A Navigate node can always be pushed through a NameColumn operartor
This rule is the same as NameColumn / Navigate
Rules for pushing a Navigate operator through a Project operator
A Navigate can always move through a Project, but the destination of the
Navigate node must be added to columns that are Projected
Evaluates an OrderBy Operator and determines the SQL equivalent of the destination
take all of the columns names in the orderBy and add them to the oderBy clause
the result will look like OrderBy col1, col2, etc
This is the first pattern that is visited
The QuiltQuery object contains the entire query
The visitor pattern visits the body of the QuiltQuery object,
which is the entire Quilt query
For each function definitions it will create a new XAT tree.
This is the rule to split a Select in half
The Select can be split in half iff it contains an AND or OR
If the Select contains an AND then the a new Select is created and the tree looks like this:
Before:
Select (exp1 AND exp2)
After:
Select (exp1)
|
Select (exp2)
If the Select contains an OR then we dont support it yet....
Evaluates a Source Operator and determines the SQL equivalent of the destination
The Source doesnt have an SQL equivalent so it is just a blank fragment
Evaluates a Source Operator and determines the XQuery equivalent of the destination
If a source has already been visited, then add this to the LET, otherwise, add it to FOR
Connect the bottom of the user query to the top of the view query
Add a Rename that takes the output of the root of the View query and renames the
Output of the Source s into that.