A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
pdb::Lambda< ReturnType > Class Template Reference

#include <Lambda.h>

+ Collaboration diagram for pdb::Lambda< ReturnType >:

Public Member Functions

 Lambda (LambdaTree< Ptr< ReturnType >> treeWithPointer)
 
 Lambda (LambdaTree< ReturnType > tree)
 
unsigned int getInputIndex ()
 
void toMap (std::map< std::string, GenericLambdaObjectPtr > &returnVal, int &suffix)
 
std::vector< std::string > getAllInputs (MultiInputsBase *multiInputsBase)
 
std::string toTCAPString (std::string inputTupleSetName, std::vector< std::string > &inputColumnNames, std::vector< std::string > &inputColumnsToApply, std::vector< std::string > &childrenLambdaNames, int &lambdaLabel, std::string computationName, int computationLabel, std::string &outputTupleSetName, std::vector< std::string > &outputColumnNames, std::string &addedOutputColumnName, std::string &myLambdaName, bool whetherToRemoveUnusedOutputColumns, MultiInputsBase *multiInputsComp=nullptr, bool amIPartOfJoinPredicate=false)
 

Private Member Functions

void getInputs (std::vector< std::string > &allInputs, GenericLambdaObjectPtr root, MultiInputsBase *multiInputsBase)
 

Static Private Member Functions

static void traverse (std::map< std::string, GenericLambdaObjectPtr > &fillMe, GenericLambdaObjectPtr root, int &startLabel)
 
static void getTCAPString (std::vector< std::string > &tcapStrings, std::vector< std::string > &inputTupleSetNames, std::vector< std::string > &inputColumnNames, std::vector< std::string > &inputColumnsToApply, std::vector< std::string > &childrenLambdaNames, GenericLambdaObjectPtr root, int &lambdaLabel, std::string computationName, int computationLabel, std::string &addedOutputColumnName, std::string &myLambdaName, std::string &outputTupleSetName, MultiInputsBase *multiInputsComp=nullptr, bool amIPartOfJoinPredicate=false, bool amILeftChildOfEqualLambda=false, bool amIRightChildOfEqualLambda=false, std::string parentLambdaName="", bool isSelfJoin=false)
 

Private Attributes

std::shared_ptr
< TypedLambdaObject
< ReturnType > > 
tree
 

Detailed Description

template<class ReturnType>
class pdb::Lambda< ReturnType >

Template Parameters
ReturnType

Definition at line 41 of file Lambda.h.

Constructor & Destructor Documentation

template<class ReturnType>
pdb::Lambda< ReturnType >::Lambda ( LambdaTree< Ptr< ReturnType >>  treeWithPointer)
inline

create a lambda tree that returns a pointer this is an implicit

Parameters
treeWithPointer

Definition at line 49 of file Lambda.h.

template<class ReturnType>
pdb::Lambda< ReturnType >::Lambda ( LambdaTree< ReturnType >  tree)
inline

create a lambda tree that returns a non-pointer

Parameters
tree

Definition at line 62 of file Lambda.h.

Member Function Documentation

template<class ReturnType>
std::vector<std::string> pdb::Lambda< ReturnType >::getAllInputs ( MultiInputsBase multiInputsBase)
inline

Definition at line 77 of file Lambda.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class ReturnType>
unsigned int pdb::Lambda< ReturnType >::getInputIndex ( )
inline

Definition at line 64 of file Lambda.h.

template<class ReturnType>
void pdb::Lambda< ReturnType >::getInputs ( std::vector< std::string > &  allInputs,
GenericLambdaObjectPtr  root,
MultiInputsBase multiInputsBase 
)
inlineprivate
Parameters
allInputs
root
multiInputsBase

Definition at line 243 of file Lambda.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class ReturnType>
static void pdb::Lambda< ReturnType >::getTCAPString ( std::vector< std::string > &  tcapStrings,
std::vector< std::string > &  inputTupleSetNames,
std::vector< std::string > &  inputColumnNames,
std::vector< std::string > &  inputColumnsToApply,
std::vector< std::string > &  childrenLambdaNames,
GenericLambdaObjectPtr  root,
int &  lambdaLabel,
std::string  computationName,
int  computationLabel,
std::string &  addedOutputColumnName,
std::string &  myLambdaName,
std::string &  outputTupleSetName,
MultiInputsBase multiInputsComp = nullptr,
bool  amIPartOfJoinPredicate = false,
bool  amILeftChildOfEqualLambda = false,
bool  amIRightChildOfEqualLambda = false,
std::string  parentLambdaName = "",
bool  isSelfJoin = false 
)
inlinestaticprivate

JiaNote: below function is to generate a sequence of TCAP Strings for this Lambda tree

Parameters
tcapStrings
inputTupleSetNames
inputColumnNames
inputColumnsToApply
childrenLambdaNames
root
lambdaLabel
computationName
computationLabel
addedOutputColumnName
myLambdaName
outputTupleSetName
multiInputsComp
amIPartOfJoinPredicate
amILeftChildOfEqualLambda
amIRightChildOfEqualLambda
parentLambdaName
isSelfJoin

Definition at line 284 of file Lambda.h.

+ Here is the caller graph for this function:

template<class ReturnType>
void pdb::Lambda< ReturnType >::toMap ( std::map< std::string, GenericLambdaObjectPtr > &  returnVal,
int &  suffix 
)
inline

convert one of these guys to a map

Parameters
returnVal
suffix

Definition at line 73 of file Lambda.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class ReturnType>
std::string pdb::Lambda< ReturnType >::toTCAPString ( std::string  inputTupleSetName,
std::vector< std::string > &  inputColumnNames,
std::vector< std::string > &  inputColumnsToApply,
std::vector< std::string > &  childrenLambdaNames,
int &  lambdaLabel,
std::string  computationName,
int  computationLabel,
std::string &  outputTupleSetName,
std::vector< std::string > &  outputColumnNames,
std::string &  addedOutputColumnName,
std::string &  myLambdaName,
bool  whetherToRemoveUnusedOutputColumns,
MultiInputsBase multiInputsComp = nullptr,
bool  amIPartOfJoinPredicate = false 
)
inline

This is to get the TCAPString for this lambda tree

Parameters
inputTupleSetName
inputColumnNames
inputColumnsToApply
childrenLambdaNames
lambdaLabel
computationName
computationLabel
outputTupleSetName
outputColumnNames
addedOutputColumnName
myLambdaName
whetherToRemoveUnusedOutputColumns
multiInputsComp
amIPartOfJoinPredicate
Returns

Definition at line 101 of file Lambda.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class ReturnType>
static void pdb::Lambda< ReturnType >::traverse ( std::map< std::string, GenericLambdaObjectPtr > &  fillMe,
GenericLambdaObjectPtr  root,
int &  startLabel 
)
inlinestaticprivate

does the actual tree traversal JiaNote: I changed below method from pre-order traversing to post-order traversing, so that it follows the lambda execution ordering

Parameters
fillMe
root
startLabel

Definition at line 222 of file Lambda.h.

+ Here is the caller graph for this function:

Member Data Documentation

template<class ReturnType>
std::shared_ptr<TypedLambdaObject<ReturnType> > pdb::Lambda< ReturnType >::tree
private

in case we wrap up a non-pointer type

Definition at line 212 of file Lambda.h.


The documentation for this class was generated from the following file: