コード例 #1
0
//---------------------------------------------------------------------------
//	@function:
//		CPhysicalPartitionSelector::Matches
//
//	@doc:
//		Match operators
//
//---------------------------------------------------------------------------
BOOL
CPhysicalPartitionSelector::Matches
	(
	COperator *pop
	)
	const
{
	if (Eopid() != pop->Eopid())
	{
		return false;
	}

	CPhysicalPartitionSelector *popPartSelector = CPhysicalPartitionSelector::PopConvert(pop);

	BOOL fScanIdCmp = popPartSelector->ScanId() == m_scan_id;
	BOOL fMdidCmp = popPartSelector->MDId()->Equals(MDId());
	BOOL fPartCnstrMapCmp = FMatchPartCnstr(popPartSelector->m_ppartcnstrmap);
	BOOL fColRefCmp = CColRef::Equals(popPartSelector->Pdrgpdrgpcr(), m_pdrgpdrgpcr) ;
	BOOL fPartCnstrEquiv = popPartSelector->m_part_constraint->FEquivalent(m_part_constraint) ;
	BOOL fEqPredCmp = FMatchExprMaps(popPartSelector->m_phmulexprEqPredicates, m_phmulexprEqPredicates) ;
	BOOL fPredCmp = FMatchExprMaps(popPartSelector->m_phmulexprPredicates, m_phmulexprPredicates) ;
	BOOL fResPredCmp = CUtils::Equals(popPartSelector->m_pexprResidual, m_pexprResidual);

	return fScanIdCmp && fMdidCmp && fPartCnstrMapCmp && fColRefCmp && fPartCnstrEquiv && fEqPredCmp && fResPredCmp && fPredCmp;
}
コード例 #2
0
//---------------------------------------------------------------------------
//	@function:
//		CPhysicalPartitionSelector::FMatch
//
//	@doc:
//		Match operators
//
//---------------------------------------------------------------------------
BOOL
CPhysicalPartitionSelector::FMatch
	(
	COperator *pop
	)
	const
{
	if (Eopid() != pop->Eopid())
	{
		return false;
	}

	CPhysicalPartitionSelector *popPartSelector = CPhysicalPartitionSelector::PopConvert(pop);

	return popPartSelector->UlScanId() == m_ulScanId &&
			popPartSelector->Pmdid()->FEquals(Pmdid()) &&
			FMatchPartCnstr(popPartSelector->m_ppartcnstrmap) &&
			popPartSelector->Pdrgpdrgpcr()->FEqual(m_pdrgpdrgpcr) &&
			popPartSelector->m_ppartcnstr->FEquivalent(m_ppartcnstr) &&
			FMatchExprMaps(popPartSelector->m_phmulexprEqPredicates, m_phmulexprEqPredicates) &&
			FMatchExprMaps(popPartSelector->m_phmulexprPredicates, m_phmulexprPredicates) &&
			CUtils::FEqual(popPartSelector->m_pexprResidual, m_pexprResidual);
}