MCPcopy Create free account
hub / github.com/apache/cloudberry / RetrieveObject

Method RetrieveObject

src/backend/gpopt/translate/CTranslatorRelcacheToDXL.cpp:92–152  ·  view source on GitHub ↗

--------------------------------------------------------------------------- @function: CTranslatorRelcacheToDXL::RetrieveObject @doc: Retrieve a metadata object from the relcache given its metadata id. ---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

90//
91//---------------------------------------------------------------------------
92IMDCacheObject *
93CTranslatorRelcacheToDXL::RetrieveObject(CMemoryPool *mp,
94 CMDAccessor *md_accessor, IMDId *mdid,
95 IMDCacheObject::Emdtype mdtype)
96{
97 IMDCacheObject *md_obj = nullptr;
98 GPOS_ASSERT(nullptr != md_accessor);
99
100#ifdef FAULT_INJECTOR
101 gpdb::InjectFaultInOptTasks("opt_relcache_translator_catalog_access");
102#endif // FAULT_INJECTOR
103
104 switch (mdid->MdidType())
105 {
106 case IMDId::EmdidGeneral:
107 md_obj = RetrieveObjectGPDB(mp, mdid, mdtype);
108 break;
109
110 case IMDId::EmdidRelStats:
111 md_obj = RetrieveRelStats(mp, mdid);
112 break;
113
114 case IMDId::EmdidColStats:
115 md_obj = RetrieveColStats(mp, md_accessor, mdid);
116 break;
117
118 case IMDId::EmdidCastFunc:
119 md_obj = RetrieveCast(mp, mdid);
120 break;
121
122 case IMDId::EmdidScCmp:
123 md_obj = RetrieveScCmp(mp, mdid);
124 break;
125
126 case IMDId::EmdidRel:
127 md_obj = RetrieveRel(mp, md_accessor, mdid);
128 break;
129
130 case IMDId::EmdidInd:
131 md_obj = RetrieveIndex(mp, md_accessor, mdid);
132 break;
133
134 case IMDId::EmdidCheckConstraint:
135 md_obj = RetrieveCheckConstraints(mp, md_accessor, mdid);
136 break;
137
138 case IMDId::EmdidExtStats:
139 md_obj = RetrieveExtStats(mp, mdid);
140 break;
141
142 case IMDId::EmdidExtStatsInfo:
143 md_obj = RetrieveExtStatsInfo(mp, mdid);
144 break;
145
146 default:
147 GPOS_RAISE(gpdxl::ExmaMD, gpdxl::ExmiMDCacheEntryNotFound,
148 mdid->GetBuffer());
149 }

Callers

nothing calls this directly

Calls 2

MdidTypeMethod · 0.45
GetBufferMethod · 0.45

Tested by

no test coverage detected