提交 2c4e0a9d 编写于 作者: B Bhunvesh Chaudhary 提交者: Bhuvnesh

Add OSPrint for Const Table Get

Signed-off-by: NEkta Khanna <ekhanna@pivotal.io>
上级 2c139497
......@@ -304,6 +304,10 @@ namespace gpopt
return dynamic_cast<CPhysicalConstTableGet*>(pop);
}
// debug print
virtual
IOstream &OsPrint(IOstream &) const;
}; // class CPhysicalConstTableGet
}
......
......@@ -395,6 +395,53 @@ CPhysicalConstTableGet::EpetRewindability
return CEnfdProp::EpetUnnecessary;
}
// print values in const table
IOstream &
CPhysicalConstTableGet::OsPrint
(
IOstream &os
)
const
{
if (m_fPattern)
{
return COperator::OsPrint(os);
}
else
{
os << SzId() << " ";
os << "Columns: [";
CUtils::OsPrintDrgPcr(os, m_pdrgpcrOutput);
os << "] ";
os << "Values: [";
for (ULONG ulA = 0; ulA < m_pdrgpdrgpdatum->UlLength(); ulA++)
{
if (0 < ulA)
{
os << "; ";
}
os << "(";
DrgPdatum *pdrgpdatum = (*m_pdrgpdrgpdatum)[ulA];
const ULONG ulLen = pdrgpdatum->UlLength();
for (ULONG ulB = 0; ulB < ulLen; ulB++)
{
IDatum *pdatum = (*pdrgpdatum)[ulB];
pdatum->OsPrint(os);
if (ulB < ulLen-1)
{
os << ", ";
}
}
os << ")";
}
os << "]";
}
return os;
}
// EOF
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册