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 b1aebd3afe01557ceea40801082f9cddb6429a97
Author: Zhenghua Lyu <[email protected]>
AuthorDate: Mon Jun 5 13:35:36 2023 +0000

    Remove deadcode cdbpullup_isExprCoveredByTargetlist.
    
    Commit 93abe741cd67 remove code that calling this function.
---
 src/backend/cdb/cdbpullup.c | 47 ---------------------------------------------
 src/include/cdb/cdbpullup.h | 20 -------------------
 2 files changed, 67 deletions(-)

diff --git a/src/backend/cdb/cdbpullup.c b/src/backend/cdb/cdbpullup.c
index cf1e318ae9..c6f243ae08 100644
--- a/src/backend/cdb/cdbpullup.c
+++ b/src/backend/cdb/cdbpullup.c
@@ -351,52 +351,6 @@ cdbpullup_truncatePathKeysForTargetList(List *pathkeys, 
List *targetlist)
        return new_pathkeys;
 }
 
-/*
- * cdbpullup_isExprCoveredByTargetlist
- *
- * Returns true if 'expr' is in 'targetlist', or if 'expr' contains no
- * Var node of the current query level that is not in 'targetlist'.
- *
- * If 'expr' is a List, returns false if the above condition is false for
- * some member of the list.
- *
- * 'targetlist' is a List of TargetEntry.
- *
- * NB:  A Var in the expr is considered as matching a Var in the targetlist
- * without regard for whether or not there is a RelabelType node atop the
- * targetlist Var.
- *
- * See also: cdbpullup_missing_var_walker
- */
-bool
-cdbpullup_isExprCoveredByTargetlist(Expr *expr, List *targetlist)
-{
-       ListCell   *cell;
-
-       /* List of Expr?  Verify that all items are covered. */
-       if (IsA(expr, List))
-       {
-               foreach(cell, (List *) expr)
-               {
-                       Expr       *item = (Expr *) lfirst(cell);
-
-                       /* The whole expr or all of its Vars must be in 
targetlist. */
-                       if (!tlist_member_ignore_relabel(item, targetlist) &&
-                               cdbpullup_missingVarWalker(item, targetlist))
-                               return false;
-               }
-       }
-
-       /* The whole expr or all of its Vars must be in targetlist. */
-       else if (!tlist_member_ignore_relabel(expr, targetlist) &&
-                        cdbpullup_missingVarWalker(expr, targetlist))
-               return false;
-
-       /* expr is evaluable on rows projected thru targetlist */
-       return true;
-}                                                              /* 
cdbpullup_isExprCoveredByTlist */
-
-
 /*
  * cdbpullup_make_var
  *
@@ -471,7 +425,6 @@ cdbpullup_make_expr(Index varno, AttrNumber varattno, Expr 
*oldexpr, bool modify
  * without regard for whether or not there is a RelabelType node atop the
  * targetlist Var.
  *
- * See also: cdbpullup_isExprCoveredByTargetlist
  */
 static bool
 cdbpullup_missingVarWalker(Expr *node, void *targetlist)
diff --git a/src/include/cdb/cdbpullup.h b/src/include/cdb/cdbpullup.h
index cf5a9a0ff9..535b2987ce 100644
--- a/src/include/cdb/cdbpullup.h
+++ b/src/include/cdb/cdbpullup.h
@@ -59,24 +59,4 @@ extern Expr 
*cdbpullup_findEclassInTargetList(EquivalenceClass *eclass, List *ta
 
 extern List *cdbpullup_truncatePathKeysForTargetList(List *pathkeys, List 
*targetlist);
 
-/*
- * cdbpullup_isExprCoveredByTargetlist
- *
- * Returns true if 'expr' is in 'targetlist', or if 'expr' contains no
- * Var node of the current query level that is not in 'targetlist'.
- *
- * If 'expr' is a List, returns false if the above condition is false for
- * some member of the list.
- *
- * 'targetlist' is a List of TargetEntry.
- *
- * NB:  A Var in the expr is considered as matching a Var in the targetlist
- * without regard for whether or not there is a RelabelType node atop the 
- * targetlist Var.
- *
- * See also: cdbpullup_missing_var_walker
- */
-bool
-cdbpullup_isExprCoveredByTargetlist(Expr *expr, List *targetlist);
-
 #endif   /* CDBPULLUP_H */


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to