|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FarragoSessionPreparingStmt
FarragoSessionPreparingStmt represents the process of Farrago-specific
preparation of a single SQL statement (it's not a context for executing a
series of statements; for that, see FarragoSessionStmtContext
). The
result is a FarragoSessionExecutableStmt
.
FarragoSessionPreparingStmt has a fleeting lifetime, which is why its name is in the progressive tense. Once its job is done, it should be discarded (and can't be reused).
Method Summary | |
---|---|
void |
analyzeSql(SqlNode sqlNode,
FarragoSessionAnalyzedSql analyzedSql)
Analyzes an SQL expression, and returns information about it. |
void |
disableStatementCaching()
Disables caching for the statement |
FarragoTypeFactory |
getFarragoTypeFactory()
|
FennelDbHandle |
getFennelDbHandle()
|
FarragoSessionIndexMap |
getIndexMap()
|
JavaRelImplementor |
getRelImplementor(RexBuilder rexBuilder)
Obtains an implementor for relational expressions. |
RelOptCluster |
getRelOptCluster()
|
FarragoRepos |
getRepos()
|
FarragoSessionStmtContext |
getRootStmtContext()
|
FarragoSession |
getSession()
|
String |
getSql()
|
SqlOperatorTable |
getSqlOperatorTable()
|
SqlToRelConverter |
getSqlToRelConverter()
|
SqlValidator |
getSqlValidator()
|
FarragoSessionStmtValidator |
getStmtValidator()
|
FarragoSessionExecutableStmt |
implement(RelNode rootRel,
SqlKind sqlKind,
boolean logical)
Implements a logical or physical query plan but does not execute it. |
RelOptTable |
loadColumnSet(SqlIdentifier name)
Looks up a named ColumnSet and loads its optimizer representation. |
boolean |
mayCacheImplementation()
Test if the implementation may be saved for reuse. |
void |
postValidate(SqlNode validatedSqlNode)
Performs post-validation work after SqlValidator has been called. |
void |
preImplement()
Sets up the environment the FarragoPreparingStmt needs in order to implement (i.e. |
FarragoSessionExecutableStmt |
prepare(SqlNode sqlNode,
SqlNode sqlNodeOriginal)
Prepares (translates and implements) a parsed query or DML statement, but does not execute it. |
Methods inherited from interface org.eigenbase.util.ClosableAllocation |
---|
closeAllocation |
Method Detail |
---|
FarragoSessionExecutableStmt prepare(SqlNode sqlNode, SqlNode sqlNodeOriginal)
sqlNode
- top-level node of parsed statementsqlNodeOriginal
- original form of sqlNode if it has been rewritten
by validation; otherwise, same as sqlNode
void analyzeSql(SqlNode sqlNode, FarragoSessionAnalyzedSql analyzedSql)
sqlNode
- SQL expression to be analyzedanalyzedSql
- receives analysis resultvoid preImplement()
prepare(org.eigenbase.sql.SqlNode, org.eigenbase.sql.SqlNode)
) this happens automatically. But when
implementing a query presented as a query plan (by calling implement(org.eigenbase.rel.RelNode, org.eigenbase.sql.SqlKind, boolean)
), you must call this method first, even before constructing
the query plan.
void postValidate(SqlNode validatedSqlNode)
validatedSqlNode
- output of SqlValidatorFarragoSessionExecutableStmt implement(RelNode rootRel, SqlKind sqlKind, boolean logical)
preImplement()
first, in fact before constructing the
query plan.
rootRel
- root of query plan (relational expression)sqlKind
- SqlKind for the relational expression: only
SqlKind.Explain and SqlKind.Dml are special cases.logical
- true for a logical query plan (still needs to be
optimized), false for a physical plan.
boolean mayCacheImplementation()
void disableStatementCaching()
FarragoSessionStmtValidator getStmtValidator()
SqlOperatorTable getSqlOperatorTable()
SqlValidator getSqlValidator()
SqlToRelConverter getSqlToRelConverter()
RelOptCluster getRelOptCluster()
FarragoRepos getRepos()
FennelDbHandle getFennelDbHandle()
FarragoTypeFactory getFarragoTypeFactory()
FarragoSessionIndexMap getIndexMap()
FarragoSession getSession()
String getSql()
JavaRelImplementor getRelImplementor(RexBuilder rexBuilder)
rexBuilder
- RexBuilder to use for constructing row expressions
RelOptTable loadColumnSet(SqlIdentifier name)
name
- name of ColumnSet
FarragoSessionStmtContext getRootStmtContext()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |