提交 c8b08175 编写于 作者: D Dhanashree Kashid and Jesse Zhang 提交者: Dhanashree Kashid

Revert "Only list complete logical indices for a partitioned table [#143522031]"

This reverts commit 83a2f870.
上级 afca2931
......@@ -3042,17 +3042,4 @@ gpdb::FMDCacheNeedsReset
return true;
}
bool
gpdb::FPartialLogicalIndex
(
const LogicalIndexInfo *logicalIndexInfo
)
{
// A logical index is complete when it's on all leaf partitions
// A partial logical index will have part constraints or default levels
// set
// c.f. BuildLogicalIndexInfo in cdbpartindex.c
return logicalIndexInfo->partCons || logicalIndexInfo->defaultLevels;
}
// EOF
......@@ -343,10 +343,7 @@ CTranslatorRelcacheToDXL::PlIndexOidsPartTable
for (ULONG ul = 0; ul < ulIndexes; ul++)
{
LogicalIndexInfo *pidxinfo = (plgidx->logicalIndexInfo)[ul];
if (!gpdb::FPartialLogicalIndex(pidxinfo))
{
plOids = gpdb::PlAppendOid(plOids, pidxinfo->logicalIndexOid);
}
plOids = gpdb::PlAppendOid(plOids, pidxinfo->logicalIndexOid);
}
gpdb::GPDBFree(plgidx);
......@@ -1227,7 +1224,7 @@ CTranslatorRelcacheToDXL::PmdindexPartTable
}
}
BOOL fPartial = gpdb::FPartialLogicalIndex(pidxinfo);
BOOL fPartial = (NULL != pnodePartCnstr || NIL != plDefaultLevels);
if (NULL == pnodePartCnstr)
{
......
......@@ -516,10 +516,6 @@ namespace gpdb {
// close the given relation
void CloseRelation(Relation rel);
// A logical index is partial if it's not present on all leaf partitions
// c.f. BuildLogicalIndexInfo in cdbpartindex.c
bool FPartialLogicalIndex(const LogicalIndexInfo* logicalIndexInfo);
// return the logical indexes for a partitioned table
LogicalIndexes *Plgidx(Oid oid);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册