The Sort-merge Join plan operator
![]() | CloseHandle (XxxDerivedRelation::CursorInfo* Handle, XxxRelation* *RelationArray) Closes the scan this plan operator offers |
![]() | GetNextRecord (XxxSetCursor& SCsr, XxxRelation* *RelationArray, const XxxRecordSchema* Schema, XxxRecord*& ReturnRec) Gets the next record from this plan operator |
![]() | InitHandle (XxxDerivedRelation::CursorInfo* Handle, XxxRelation* *RelationArray) Initializes this plan operator |
![]() | PrintString () Returns a string representation of this plan operator |
![]() | RelSMPlanOp (int NumChildren, RelPlanOp* Children[], RelCatalogInfo* CatInfo, XxxValExprPlanList* ExprPlanList, XxxBooleanExpressionPlan** SelPredPlans, XxxBooleanExpressionPlan** JoinPredPlans, XxxBooleanExpressionPlan** ResidPredPlans, XxxBooleanExpressionPlan* InitPlan) Constructor |
![]() | ~RelSMPlanOp () Destructor |
![]() | Group Encapsulates the concept of a record group; maintains a linked- list of records and information on which attribute the join is based upon
| ||||||||||||||||||||||||||||||
![]() | SMJoinInfo Contains the relevant information to store in the operator handle between calls to GetNextRecord
|
![]() | createJoinInfo (XxxDerivedRelation::CursorInfo* Handle, SMJoinInfo *&JoinInfo) Creates the join info object for the SM run |
![]() | getNextItem (XxxRelation* *RelationArray, XxxDerivedRelation::CursorInfo* Handle, int Index, XxxBool& Valid) Gets the next record from the relation in the RelationArray indexed by the parameter |
![]() | isEqual (XxxRecord *LeftRec, int LeftAttrIndex, XxxRecordSchema *LeftSchema, XxxRecord *RightRec, int RightAttrIndex, XxxRecordSchema *RightSchema) Compares a left and right record and returns XXX_TRUE if they are equal with respect to their critical attributes |
![]() | isLessThan (XxxRecord *LeftRec, int LeftAttrIndex, XxxRecordSchema *LeftSchema, XxxRecord *RightRec, int RightAttrIndex, XxxRecordSchema *RightSchema) Compares a left and right record and returns XXX_TRUE if the left is less than the right with respect to their critical attributes |
![]() | joinGroups (XxxDerivedRelation::CursorInfo* Handle, XxxRelation* *RelationArray, const XxxRecordSchema* Schema, SMJoinInfo *JoinInfo) Joins the left and right groups by a cross-product (assuming the groups ought to be joined) and populates the output group |
![]() | parseJoinPlan (XxxDerivedRelation::CursorInfo* Handle, int &LeftAttrIndex, int &LeftRelIndex, int &RightAttrIndex, int &RightRelIndex) Parses the join plan, finding the location of the left and right relations and finding the indices of the critical attributes in each's records |
The Sort-merge Join plan operator. This operator assumes it has two input streams or records, both sorted by a single attribute. The join condition must be an equality of these two attributes, e.g., ... WHERE A.id = B.id
Member* members
Member* currentMember
int attrIndex
XxxBool scanValid
Group(int attrIndexNum)
~Group()
int AttrIndex()
XxxBool IsEmpty()
void AddRecord(XxxRecord *Rec)
void FlushAllRecords(XxxBool DestroyRecs)
void InitScan()
XxxBool ScanIsValid()
XxxRecord* GetNext()
int LeftRelIndex
Group LeftGroup
SMJoinInfo(int RightRelIndex, int LeftRelIndex, int RightAttrIndex, int LeftAttrIndex)
virtual XxxErrCode getNextItem(XxxRelation* *RelationArray, XxxDerivedRelation::CursorInfo* Handle, int Index, XxxBool& Valid)
virtual XxxErrCode joinGroups(XxxDerivedRelation::CursorInfo* Handle, XxxRelation* *RelationArray, const XxxRecordSchema* Schema, SMJoinInfo *JoinInfo)
virtual XxxErrCode parseJoinPlan(XxxDerivedRelation::CursorInfo* Handle, int &LeftAttrIndex, int &LeftRelIndex, int &RightAttrIndex, int &RightRelIndex)
virtual XxxBool isEqual(XxxRecord *LeftRec, int LeftAttrIndex, XxxRecordSchema *LeftSchema, XxxRecord *RightRec, int RightAttrIndex, XxxRecordSchema *RightSchema)
virtual XxxBool isLessThan(XxxRecord *LeftRec, int LeftAttrIndex, XxxRecordSchema *LeftSchema, XxxRecord *RightRec, int RightAttrIndex, XxxRecordSchema *RightSchema)
virtual const char* PrintString()
virtual XxxErrCode GetNextRecord(XxxSetCursor& SCsr, XxxRelation* *RelationArray, const XxxRecordSchema* Schema, XxxRecord*& ReturnRec)
virtual XxxErrCode InitHandle(XxxDerivedRelation::CursorInfo* Handle, XxxRelation* *RelationArray)
virtual XxxErrCode CloseHandle(XxxDerivedRelation::CursorInfo* Handle, XxxRelation* *RelationArray)
RelSMPlanOp(int NumChildren, RelPlanOp* Children[], RelCatalogInfo* CatInfo, XxxValExprPlanList* ExprPlanList, XxxBooleanExpressionPlan** SelPredPlans, XxxBooleanExpressionPlan** JoinPredPlans, XxxBooleanExpressionPlan** ResidPredPlans, XxxBooleanExpressionPlan* InitPlan)
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de