Skip to content

Commit 79c4508

Browse files
committed
[ORCA] Fix compile warning.
Fix issue #1112. This is inreoduced by GPDB commits during cherry-pick. But since GPDB don't open -Wcast-function-type check, so there is no warning on GP7. Cloudberry has the flag -Wcast-function-type, use the right warp function to fix. Authored-by: Zhang Mingli avamingli@gmail.com
1 parent 15572b0 commit 79c4508

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/backend/gpopt/gpdbwrappers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2726,11 +2726,11 @@ gpdb::MakeTlistFromPathtarget(PathTarget *target)
27262726
}
27272727

27282728
Node *
2729-
gpdb::Expression_tree_mutator(Node *node, Node *(*mutator)(), void *context)
2729+
gpdb::Expression_tree_mutator(Node *node, Node *(*mutator)(Node*, void*), void *context)
27302730
{
27312731
GP_WRAP_START;
27322732
{
2733-
return expression_tree_mutator(node, mutator, context);
2733+
return expression_tree_mutator_wrapper(node, mutator, context);
27342734
}
27352735
GP_WRAP_END;
27362736

src/backend/gpopt/translate/CTranslatorDXLToPlStmt.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3625,7 +3625,7 @@ SearchTlistForNonVarProjectset(Expr *node, List *itlist, Index newvarno)
36253625
}
36263626

36273627
Node *
3628-
CTranslatorDXLToPlStmt::FixUpperExprMutatorProjectSet(Node *node, List *context)
3628+
CTranslatorDXLToPlStmt::FixUpperExprMutatorProjectSet(Node *node, void *context)
36293629
{
36303630
Var *newvar;
36313631

@@ -3634,16 +3634,16 @@ CTranslatorDXLToPlStmt::FixUpperExprMutatorProjectSet(Node *node, List *context)
36343634
return nullptr;
36353635
}
36363636

3637-
newvar = SearchTlistForNonVarProjectset((Expr *) node, context, OUTER_VAR);
3637+
newvar = SearchTlistForNonVarProjectset((Expr *) node, (List *) context, OUTER_VAR);
36383638
if (nullptr != newvar)
36393639
{
36403640
return (Node *) newvar;
36413641
}
36423642

36433643
return gpdb::Expression_tree_mutator(
36443644
node,
3645-
(Node * (*) ()) CTranslatorDXLToPlStmt::FixUpperExprMutatorProjectSet,
3646-
(void *) context);
3645+
&CTranslatorDXLToPlStmt::FixUpperExprMutatorProjectSet,
3646+
context);
36473647
}
36483648

36493649
//------------------------------------------------------------------------------

src/include/gpopt/gpdbwrappers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ void SplitPathtargetAtSrfs(PlannerInfo *root, PathTarget *target,
667667

668668
List *MakeTlistFromPathtarget(PathTarget *target);
669669

670-
Node *Expression_tree_mutator(Node *node, Node *(*mutator)(), void *context);
670+
Node *Expression_tree_mutator(Node *node, Node *(*mutator)(Node*, void*), void *context);
671671

672672
TargetEntry *TlistMember(Expr *node, List *targetlist);
673673

src/include/gpopt/translate/CTranslatorDXLToPlStmt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ class CTranslatorDXLToPlStmt
639639
// get all non-dropped columns of a relation
640640
static List *GetRelationActiveColums(const IMDRelation *md_rel);
641641

642-
static Node *FixUpperExprMutatorProjectSet(Node *node, List *context);
642+
static Node *FixUpperExprMutatorProjectSet(Node *node, void *context);
643643

644644
// checks if index is used for Order by.
645645
bool IsIndexForOrderBy(

0 commit comments

Comments
 (0)