net.sf.farrago.query
Class FarragoReentrantStmtExecutor
java.lang.Object
net.sf.farrago.query.FarragoReentrantStmt
net.sf.farrago.query.FarragoReentrantStmtExecutor
- Direct Known Subclasses:
- FarragoReduceExpressionsRule.ReentrantValuesStmt, FarragoReentrantSubquery
public abstract class FarragoReentrantStmtExecutor
- extends FarragoReentrantStmt
FarragoReentrantStmtExecutor extends FarragoReentrantStmt
by
providing a base method for executing a query plan and returning its result.
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/query/FarragoReentrantStmtExecutor.java#4 $
- Author:
- John V. Sichi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tracer
private static final Logger tracer
rexBuilder
protected final RexBuilder rexBuilder
results
protected final List<RexNode> results
failed
protected boolean failed
FarragoReentrantStmtExecutor
FarragoReentrantStmtExecutor(FarragoSessionStmtContext rootStmtContext,
RexBuilder rexBuilder,
List<RexNode> results)
- Constructs a FarragoReentrantStmtExecutor.
- Parameters:
rootStmtContext
- statement context for the root statement of this
reentrant statementrexBuilder
- rex builderresults
- the resulting evaluated expressions
executePlan
protected void executePlan(RelNode plan,
List<RexNode> exprs,
boolean isExists,
boolean excludeReduceExprRule)
throws Exception
- Executes a query given a plan containing the corresponding RelNode tree.
- Parameters:
plan
- the query to be executedexprs
- list of expressions that will be evaluatedisExists
- whether the query being executed is part of an EXISTS
expression; in this case, the result is either a TRUE or FALSE boolean
literal, depending on whether the query returns zero or at least one rowexcludeReduceExprRule
- true if this execution is already being done
to reduce individual expressions
- Throws:
Exception
getResultRow
private void getResultRow(List<RexNode> exprs,
ResultSet resultSet)
throws Exception
- Throws:
Exception
broadenType
private SqlTypeName broadenType(SqlTypeName typeName)