You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by ma...@apache.org on 2025/01/06 08:19:52 UTC

(cloudberry) 02/12: FIXME: Remove redundant Get/SetStaticPruneResult

This is an automated email from the ASF dual-hosted git repository.

maxyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit f2eafed28d340cb30a1b4371246f02ebc2a9d312
Author: Jingyu Wang <wj...@vmware.com>
AuthorDate: Fri Jan 20 15:51:40 2023 -0800

    FIXME: Remove redundant Get/SetStaticPruneResult
    
    Fixme:
    src/backend/gpopt/translate/CContextDXLToPlStmt.cpp:
    // GPDB_12_MERGE_FIXME: we haven't seen the scan id yet, this scan id is likely
    // for dynamic pruning.
    
    Action:
    Check not used elsewhere. Static partition elimination result now referenced by
    m_part_indexes. Check and redundant declaration removed.
---
 src/backend/gpopt/translate/CContextDXLToPlStmt.cpp | 20 --------------------
 src/include/gpopt/translate/CContextDXLToPlStmt.h   |  6 ------
 2 files changed, 26 deletions(-)

diff --git a/src/backend/gpopt/translate/CContextDXLToPlStmt.cpp b/src/backend/gpopt/translate/CContextDXLToPlStmt.cpp
index 8b7b93896e..21bfc3f6c3 100644
--- a/src/backend/gpopt/translate/CContextDXLToPlStmt.cpp
+++ b/src/backend/gpopt/translate/CContextDXLToPlStmt.cpp
@@ -518,26 +518,6 @@ CContextDXLToPlStmt::GetDistributionHashFuncForType(Oid typid)
 	return hashproc;
 }
 
-List *
-CContextDXLToPlStmt::GetStaticPruneResult(ULONG scanId)
-{
-	// GPDB_12_MERGE_FIXME: we haven't seen the scan id yet, this scan id is likely for dynamic pruning.
-	// When we can, remove this check
-	if ((scanId - 1) >= m_static_prune_results.size())
-	{
-		GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXL2PlStmtConversion,
-				   GPOS_WSZ_LIT("dynamic pruning"));
-	}
-	return m_static_prune_results[scanId - 1];
-}
-void
-CContextDXLToPlStmt::SetStaticPruneResult(ULONG scanId,
-										  List *static_prune_result)
-{
-	m_static_prune_results.resize(scanId);
-	m_static_prune_results[scanId - 1] = static_prune_result;
-}
-
 ULONG
 CContextDXLToPlStmt::GetParamIdForSelector(OID oid_type, ULONG selectorId)
 {
diff --git a/src/include/gpopt/translate/CContextDXLToPlStmt.h b/src/include/gpopt/translate/CContextDXLToPlStmt.h
index 844f4c123d..9a2ebfd443 100644
--- a/src/include/gpopt/translate/CContextDXLToPlStmt.h
+++ b/src/include/gpopt/translate/CContextDXLToPlStmt.h
@@ -132,9 +132,6 @@ private:
 	// CTAS distribution policy
 	GpPolicy *m_distribution_policy;
 
-	// FXIME: this uses NEW/DELETE, should we use palloc/pfree/memory pool?
-	std::vector<List *> m_static_prune_results;
-
 	UlongToUlongMap *m_part_selector_to_param_map;
 
 
@@ -252,9 +249,6 @@ public:
 	Oid GetDistributionHashOpclassForType(Oid typid);
 	Oid GetDistributionHashFuncForType(Oid typid);
 
-	List *GetStaticPruneResult(ULONG scanId);
-	void SetStaticPruneResult(ULONG scanId, List *static_prune_result);
-
 	ULONG GetParamIdForSelector(OID oid_type, const ULONG selectorId);
 
 	Index FindRTE(Oid reloid);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org