|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.rel.AbstractRelNode org.eigenbase.rel.TableFunctionRelBase net.sf.farrago.query.FarragoJavaUdxRel
public class FarragoJavaUdxRel
FarragoJavaUdxRel is the implementation for a TableFunctionRel
which
invokes a Java UDX (user-defined transformation).
Field Summary | |
---|---|
private String |
serverMofId
|
Fields inherited from class org.eigenbase.rel.TableFunctionRelBase |
---|
inputs |
Fields inherited from class org.eigenbase.rel.AbstractRelNode |
---|
digest, id, traits |
Fields inherited from interface org.eigenbase.rel.RelNode |
---|
emptyArray |
Constructor Summary | |
---|---|
FarragoJavaUdxRel(RelOptCluster cluster,
RexNode rexCall,
RelDataType rowType,
String serverMofId)
Creates a FarragoJavaUdxRel with no relational inputs. |
|
FarragoJavaUdxRel(RelOptCluster cluster,
RexNode rexCall,
RelDataType rowType,
String serverMofId,
RelNode[] inputs)
Creates a FarragoJavaUdxRel . |
Method Summary | |
---|---|
FarragoJavaUdxRel |
clone()
Clones this RelNode. |
RelOptCost |
computeSelfCost(RelOptPlanner planner)
Returns the cost of this plan (not including children). |
void |
explain(RelOptPlanWriter pw)
|
private Expression |
generateTypeLookupCall(JavaRelImplementor implementor,
RelNode relNode)
Stores the row type for a relational expression in the PreparingStmt, and generates a call which will retrieve it from the executable context at runtime. |
ParseTree |
implement(JavaRelImplementor implementor)
Creates a plan for this expression according to a calling convention. |
static RelNode |
newUdxRel(FarragoPreparingStmt preparingStmt,
RelDataType rowType,
String udxSpecificName,
String serverMofId,
RexNode[] args,
RelNode[] relInputs)
Constructs a new instance of FarragoJavaUdxRel via a lookup from
the catalog. |
Methods inherited from class org.eigenbase.rel.TableFunctionRelBase |
---|
deriveRowType, getCall, getChildExps, getColumnMappings, getInputs, getRows, replaceInput, setColumnMappings |
Methods inherited from class org.eigenbase.rel.AbstractRelNode |
---|
childrenAccept, cloneTraits, collectVariablesSet, collectVariablesUsed, computeDigest, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getOrCreateCorrelVariable, getQuery, getRelTypeName, getRowType, getTable, getTraits, getVariablesStopped, inheritTraitsFrom, isAccessTo, isDistinct, isValid, onRegister, recomputeDigest, register, registerCorrelVariable, setCorrelVariable, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eigenbase.rel.RelNode |
---|
childrenAccept, collectVariablesSet, collectVariablesUsed, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getInputs, getOrCreateCorrelVariable, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraits, getVariablesStopped, isAccessTo, isDistinct, isValid, onRegister, recomputeDigest, registerCorrelVariable, replaceInput, setCorrelVariable |
Field Detail |
---|
private final String serverMofId
Constructor Detail |
---|
public FarragoJavaUdxRel(RelOptCluster cluster, RexNode rexCall, RelDataType rowType, String serverMofId, RelNode[] inputs)
FarragoJavaUdxRel
.
cluster
- RelOptCluster
this relational expression belongs
torexCall
- function invocation expressionrowType
- row type produced by functionserverMofId
- MOFID of data server to associate with this UDX
invocation, or null for noneinputs
- 0 or more relational inputspublic FarragoJavaUdxRel(RelOptCluster cluster, RexNode rexCall, RelDataType rowType, String serverMofId)
FarragoJavaUdxRel
with no relational inputs.
cluster
- RelOptCluster
this relational expression belongs
torexCall
- function invocation expressionrowType
- row type produced by functionserverMofId
- MOFID of data server to associate with this UDX
invocation, or null for noneMethod Detail |
---|
public static RelNode newUdxRel(FarragoPreparingStmt preparingStmt, RelDataType rowType, String udxSpecificName, String serverMofId, RexNode[] args, RelNode[] relInputs)
FarragoJavaUdxRel
via a lookup from
the catalog. This is intended for use by optimizer rules which need to
insert system-defined UDX invocations into a plan.
preparingStmt
- statement being preparedrowType
- type descriptor for UDX output rowudxSpecificName
- specific name with which the UDX was created
(either via the SPECIFIC keyword or the invocation name if SPECIFIC was
not specified); this can be a qualified name, possibly with quoted
identifiers, e.g. x.y.z or x."y".zserverMofId
- if not null, the invoked UDX can access a SQL/MED data
server with the given MOFID at runtime via FarragoUdrRuntime.getDataServerRuntimeSupport(java.lang.Object)
args
- arguments to UDX invocationrelInputs
- relational inputspublic FarragoJavaUdxRel clone()
RelNode
Traits of the RelNode must be explicitly cloned, using AbstractRelNode.inheritTraitsFrom(AbstractRelNode)
, as the RelNode may
have traits of which it has no knowledge. Example implementation:
public MyRelNode clone() { MyRelNode clone = new MyRelNode(...); clone.inheritTraitsFrom(this); return clone; }N.B.: This method must be overridden whenever an existing, concrete RelNode is extended. Otherwise, calling clone() will produce a differently typed RelNode, resulting in invalid or incorrect query plans.
clone
in interface RelNode
clone
in class AbstractRelNode
public RelOptCost computeSelfCost(RelOptPlanner planner)
RelNode
NOTE jvs 29-Mar-2006: Don't call this method directly. Instead, use
RelMetadataQuery.getNonCumulativeCost(org.eigenbase.rel.RelNode)
, which gives plugins a
chance to override the rel's default ideas about cost.
computeSelfCost
in interface RelNode
computeSelfCost
in class AbstractRelNode
public void explain(RelOptPlanWriter pw)
explain
in interface RelNode
explain
in class TableFunctionRelBase
public ParseTree implement(JavaRelImplementor implementor)
JavaRel
implement
in interface JavaRel
implementor
- implementorprivate Expression generateTypeLookupCall(JavaRelImplementor implementor, RelNode relNode)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |