All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface Expressions.Expression

public interface Expression
Expression is used to represents all the SQL expressions that can be found in WHERE or SELECT clause. Two main operations that the Expressions should implement are typechecking and executable creations. Expressions are created by the parser.


Method Index

 o collect(Vector, Vector)
Append the exclusive (as defined above) expressions to the vector of expressions
 o createExec(Vector[])
Once the expression is correctly typechecked and the query is optimized, this expression will generate an executable version of itself so that the actual operations like additions and multiplications can be executed at runtime.
 o exclusive(Vector)
Returns true if this expression (including all of its children) refers only to tables listed in vector of aliases
 o getType()
 o printTypes()
 o toString()
 o typeCheck(SymbolTable)
Type check this expression, based on the information present in the symbol table.

Methods

 o toString
 public abstract String toString()
Overrides:
toString in class Object
 o printTypes
 public abstract String printTypes()
 o getType
 public abstract TypeDesc getType()
 o typeCheck
 public abstract Expression typeCheck(SymbolTable st)
Type check this expression, based on the information present in the symbol table. Symbol table contains previously type checked expressions. This method first tries to find this expression in the sybol table and, if found, it returns the referEnce to the symbol table object. If this expression was not found, the expression is typechecked, entered into the sybol table and returns with the reference to itself. Purpose of this procedure is to eliminate all the duplicate expressions from the query.

 o createExec
 public abstract ExecExpr createExec(Vector projLists[]) throws InternalError
Once the expression is correctly typechecked and the query is optimized, this expression will generate an executable version of itself so that the actual operations like additions and multiplications can be executed at runtime. To create executable, one needs to know the left (and optionally right) input streams to this expression and that is why the arguments to this method are one or two OptNodes.

 o exclusive
 public abstract boolean exclusive(Vector aliases)
Returns true if this expression (including all of its children) refers only to tables listed in vector of aliases

 o collect
 public abstract void collect(Vector aliases,
                              Vector expressions)
Append the exclusive (as defined above) expressions to the vector of expressions


All Packages  Class Hierarchy  This Package  Previous  Next  Index