Fix unrecognized node type in ALTER COLUMN DEFAULT int4range expressions#8606
Draft
Copilot wants to merge 4 commits into
Draft
Fix unrecognized node type in ALTER COLUMN DEFAULT int4range expressions#8606Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
Copilot
AI
changed the title
[WIP] Fix unrecognized node type error during ALTER TABLE with int4range
Fix unrecognized node type in ALTER COLUMN DEFAULT int4range expressions
Jun 3, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8606 +/- ##
==========================================
+ Coverage 87.99% 88.73% +0.74%
==========================================
Files 288 288
Lines 64382 64399 +17
Branches 8108 8112 +4
==========================================
+ Hits 56650 57145 +495
+ Misses 5381 4912 -469
+ Partials 2351 2342 -9 🚀 New features to boost your workflow:
|
The previous change made contain_nextval_expression_walker recurse via raw_expression_tree_walker so that raw ALTER COLUMN ... SET DEFAULT expressions (e.g. int4range) could be traversed. However most callers (planner, executor, modification paths) pass fully analyzed expression trees, and raw_expression_tree_walker errors out on analyzed-only nodes such as TargetEntry/OpExpr with "unrecognized node type", breaking a large number of distributed query suites. Route each node to the correct walker instead: raw grammar nodes (and the primitive value nodes they contain) are descended with raw_expression_tree_walker, while shared and fully analyzed nodes go through expression_tree_walker. This keeps the raw FuncCall(nextval) detection working for SET DEFAULT while restoring analyzed-tree traversal for all other callers. Also apply citus_indent formatting to table.c. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
DESCRIPTION: Fix ALTER COLUMN DEFAULT handling for raw/transformed expressions