In file exprplan.h:

class XxxValueExprPlan : public XxxGenericPlan

An expression plan is used to evaluate an expression (i

Inheritance:


Public Classes

class VarRemapping
A VarRemapping helps modify an expression plan through join order changes
struct SrcMapping*SrcMappingArray
/ array that specifies the new mapping
int* NewAttrMapping
mappings for child attrs

Public Methods

virtual XxxErrCode Accumulate (const XxxRecord* Rec[], const XxxRecordSchema* Schema[], XxxAggrOpHandle *Handle, const XxxValueEnv* Env = NULL)
/ Accumulate into handle
XxxErrCode Evaluate (const XxxRecord* Rec, const XxxRecordSchema* Schema, XxxADTValue *Result, const XxxValueEnv* Env = NULL)
/ evaluate, when there is a single input
virtual XxxErrCode GetDependencies (XxxBitMap& Dependendency)
/ Similar method for XxxExpression as well
virtual XxxErrCode Init (XxxAggrOpHandle *Handle)
/ Initialize handle
virtual XxxErrCode MakeOpHandle (XxxAggrOpHandle*& Handle)
/ Make a handle to hold ongoing aggregation
virtual XxxErrCode RedirectDependencies (const VarRemapping& Remap, int CorrelationHeight = 0)
virtual XxxGenericPlan* Replicate ()
Replication
virtual XxxErrCode Terminate (XxxAggrOpHandle *Handle, const XxxRecord* Rec[], const XxxRecordSchema* Schema[], XxxADTValue *FinalVal, const XxxValueEnv* Env = NULL)
/ Terminates the aggregation and performs any postprocessing
virtual XxxErrCode UsageOfPlan (PlanUsage& Usage)
/ member of XxxGenericPlan
XxxValueExprPlan (XxxExpression * Exp, XxxValueExprPlan* Children[])
this is the most commonly used constructor
XxxValueExprPlan (const XxxValueExprPlan &Plan)
Copy constructor
XxxValueExprPlan (int Arity, XxxBool Constant, XxxValueExprPlan* Children[])

Public


/ Gets input stream dependencies.

/ 4 methods to evaluate an aggregate expression

Protected Methods

XxxErrCode changeDependency (const VarRemapping& Remap)
this method will be called from RedirectDependencies

Private Fields

XxxValueExpression* sourceExpr
/ a copy of the source expression (needed for index expressions)

Documentation

An expression plan is used to evaluate an expression (i.e ValueExpression) All plans must be subclasses of XxxGenericPlan, which defines a cost for the expression.
XxxValueExpression* sourceExpr
/ a copy of the source expression (needed for index expressions)

class VarRemapping
A VarRemapping helps modify an expression plan through join order changes. Every variable (XxxUnknownValue) in an expression gets resolved with a SrcChild and SrcAttrIndex during type checking. These persist into the ExprPlan. However, during join optimization, a query block can be split into several different join operators with a different join order. The ExprPlans need to be suitably modified to reflect this. The VarReMapping provides the necessary information to do so.

struct SrcMapping* SrcMappingArray
/ array that specifies the new mapping

int* NewAttrMapping
mappings for child attrs

XxxErrCode changeDependency(const VarRemapping& Remap)
this method will be called from RedirectDependencies

XxxValueExprPlan(XxxExpression * Exp, XxxValueExprPlan* Children[])
this is the most commonly used constructor

XxxValueExprPlan(const XxxValueExprPlan &Plan)
Copy constructor

XxxValueExprPlan(int Arity, XxxBool Constant, XxxValueExprPlan* Children[])

virtual XxxGenericPlan* Replicate()
Replication

XxxErrCode Evaluate(const XxxRecord* Rec, const XxxRecordSchema* Schema, XxxADTValue *Result, const XxxValueEnv* Env = NULL)
/ evaluate, when there is a single input

/ 4 methods to evaluate an aggregate expression

virtual XxxErrCode MakeOpHandle(XxxAggrOpHandle*& Handle)
/ Make a handle to hold ongoing aggregation

virtual XxxErrCode Init(XxxAggrOpHandle *Handle)
/ Initialize handle

virtual XxxErrCode Accumulate(const XxxRecord* Rec[], const XxxRecordSchema* Schema[], XxxAggrOpHandle *Handle, const XxxValueEnv* Env = NULL)
/ Accumulate into handle

virtual XxxErrCode Terminate(XxxAggrOpHandle *Handle, const XxxRecord* Rec[], const XxxRecordSchema* Schema[], XxxADTValue *FinalVal, const XxxValueEnv* Env = NULL)
/ Terminates the aggregation and performs any postprocessing

virtual XxxErrCode UsageOfPlan(PlanUsage& Usage)
/ member of XxxGenericPlan

/ Gets input stream dependencies.

virtual XxxErrCode GetDependencies(XxxBitMap& Dependendency)
/ Similar method for XxxExpression as well

virtual XxxErrCode RedirectDependencies(const VarRemapping& Remap, int CorrelationHeight = 0)


Direct child classes:
UnknownValuePlan
FuncPlan
ConstPlan
CastPlan
XxxBooleanExpressionPlan
ArithPlan
ArgValuePlan
Author:
Praveen
See Also:
XxxGenericPlan

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de