Skip to content

fix: prevent copying and moving StructLikeAccessor - #993

Merged
wgtmac merged 1 commit into
apache:mainfrom
wgtmac:codex/noncopyable-struct-like-accessor
Oct 10, 2026
Merged

wgtmac merged 1 commit into
apache:mainfrom
wgtmac:codex/noncopyable-struct-like-accessor

Conversation

@wgtmac

@wgtmac wgtmac commented Oct 10, 2026

Copy link
Copy Markdown
Member

Deep-path accessors capture this. Delete copy and move operations to keep the captured address valid.

Copilot AI balanced review requested due to automatic review settings October 10, 2026 06:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The ownership model already uses stable unique_ptr storage, and the declarations correctly enforce the required lifetime invariant.

0 open findings

What changed in this PR

Prevents dangling this captures in deep-path StructLikeAccessor instances.

Changes:

  • Deletes copy and move operations to guarantee stable addresses.
File Description
src/​iceberg/​row/​struct_like.h Makes accessors non-copyable and non-movable.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@wgtmac
wgtmac merged commit 84fb526 into apache:main Oct 10, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants