Repository navigation
Remove unused WalkQueryTree overload in ORCA - #2189
Merged
Merged
Conversation
gpdb::WalkQueryTree() had two overloads: one taking a typed walker, bool (*)(Node *, void *), which calls query_tree_walker_wrapper(), and one taking bool (*)(), added with row level security support in 80a26c8, which passes it straight to the query_tree_walker() macro. In C++ an empty parameter list means no parameters, so the macro's cast to tree_walker_callback trips -Wcast-function-type on every build: nodeFuncs.h:162:35: warning: cast between incompatible function types from 'bool (*)()' to 'tree_walker_callback' Both callers already pass a bool (*)(Node *, void *): CQueryMutators' ExprWalkerFn is BOOL (*)(Node *, void *), and BOOL is bool. They resolve to the typed overload, and the other one has no callers. Remove it. Assisted-by: Claude Code
1 of 13 tasks
Alena0704
approved these changes
Oct 26, 2026
leborchuk
approved these changes
Oct 26, 2026
leborchuk
left a comment
Contributor
There was a problem hiding this comment.
LGTM, right now we use only properly-typed bool (*)(Node *, void *) in src/include/gpopt/gpdbwrappers.h:595 and / src/backend/gpopt/gpdbwrappers.cpp:1758
So unused one could be deleted.
maybe the author want to use it later, but we will never know, let's delete it
yjhjstz
approved these changes
Oct 27, 2026
tuhaihe
enabled auto-merge (rebase)
October 27, 2026 05:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gpdb::WalkQueryTree()had two overloads: one taking a typed walker, bool (*)(Node *, void ), which callsquery_tree_walker_wrapper(), and one taking bool ()(), added with row level security support in 80a26c8, which passes it straight to the query_tree_walker() macro. In C++ an empty parameter list means no parameters, so the macro's cast to tree_walker_callback trips-Wcast-function-typeon every build:Both callers already pass a bool (*)(Node *, void ): CQueryMutators' ExprWalkerFn is BOOL ()(Node *, void *), and BOOL is bool. They resolve to the typed overload, and the other one has no callers. Remove it.
Assisted-by: Claude Code
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions