CMappingColIdVar.h 1.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
//---------------------------------------------------------------------------
//	Greenplum Database
//	Copyright (C) 2011 Greenplum, Inc.
//
//	@filename:
//		CMappingColIdVar.h
//
//	@doc:
//		Abstract base class of ColId to VAR mapping when translating CDXLScalars
//		If we need a CDXLScalar translator during DXL->PlStmt or DXL->Query translation
//		we implement a colid->Var mapping for PlStmt or Query respectively that
//		is derived from this interface.
//
//	@test:
//
//
//---------------------------------------------------------------------------

#ifndef GPDXL_CMappingColIdVar_H
#define GPDXL_CMappingColIdVar_H

#include "gpos/base.h"

//fwd decl
struct Var;
struct Param;
struct PlannedStmt;
struct Query;

namespace gpdxl
{
J
Jesse Zhang 已提交
32
using namespace gpos;
33

J
Jesse Zhang 已提交
34 35
// fwd decl
class CDXLScalarIdent;
36

J
Jesse Zhang 已提交
37 38 39 40 41 42 43 44 45 46 47 48 49 50
//---------------------------------------------------------------------------
//	@class:
//		CMappingColIdVar
//
//	@doc:
//		Class providing the interface for ColId in CDXLScalarIdent to Var
//		mapping when translating CDXLScalar nodes
//
//---------------------------------------------------------------------------
class CMappingColIdVar
{
protected:
	// memory pool
	CMemoryPool *m_mp;
51

J
Jesse Zhang 已提交
52 53 54
public:
	// ctor/dtor
	explicit CMappingColIdVar(CMemoryPool *);
55

J
Jesse Zhang 已提交
56 57 58
	virtual ~CMappingColIdVar()
	{
	}
59

J
Jesse Zhang 已提交
60 61 62 63
	// translate DXL ScalarIdent node into GPDB Var node
	virtual Var *VarFromDXLNodeScId(const CDXLScalarIdent *) = 0;
};
}  // namespace gpdxl
64

J
Jesse Zhang 已提交
65
#endif	//GPDXL_CMappingColIdVar_H
66 67

// EOF