Repository navigation
refactor(ir): rename OperatorNode::map_children to with_new_children - #648
Merged
Merged
Conversation
The node-level method replaces each child and rebuilds the node, re-deriving its schema; it is not a plain map over children. The generic Operator/ASAPOp/NonASAPOp::map_children, which only maps child references, keeps its name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 7, 2026
zzylol
added a commit
that referenced
this pull request
Oct 7, 2026
Planned summary states no longer declare coverage: it is derived from the node (#646). Node copies use clone + field updates (the coverage cache is private), physical DAG fixtures drop the removed coverage field, and the design example uses with_new_children (#648). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
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.
Why
OperatorNode::map_children(f)does more than map over the children: it replaces the children and rebuilds the node. Each child is replaced byf(child), then the node is rebuilt over the new children withOperatorNode::new, re-deriving its schema and result kind. Output names and qualifiers the caller overrode are kept, andguaranteeandtimingare cleared. The namemap_childrenhides that rebuild, and it is shared withOperator::map_children, which is a plain map over child references (it can change the reference type, e.g.Rc<OperatorNode>→ node id, and derives nothing).This PR renames the node-level method to
with_new_children, the name DataFusion uses for the same "replace the children and rebuild" operation, and says so in its doc comment.Scope
OperatorNode::map_children→OperatorNode::with_new_children. Callers updated:canonicalize.rsand theschema_rebuilding/summary_coveragetests.Operator::map_children,ASAPOp::map_children,NonASAPOp::map_children(plain maps over child references, used by CSE and flattening).Validation: workspace tests (1,625 passed),
cargo fmt --check, workspace/all-target Clippy with warnings denied.Raised in review of #646.
🤖 Generated with Claude Code