Mryange opened a new pull request, #70856: URL: https://github.com/apache/doris/pull/70856
### Background Doris columns use intrusive reference counting for copy-on-write. A composite column can have a single owner while its child columns are shared. ### What problem does this PR solve? Issue Number: None Related PR: None PR Type: Refactor Problem Summary: The public COW reference count lets callers use the outer object's count to decide whether to reuse a column. Make the count private and route reuse decisions through `is_exclusive()`, which can also check child ownership. The column dump retains the exact count for diagnostics. ### Details - **Moves vs. logic changes:** Move the accessor into COW's private section. Migrate Boolean predicate reuse checks and update ownership assertions in existing tests. - **Behavior change:** None intended. The Boolean predicate reuse path handles non-nullable UInt8 columns. COW mutation retains its shallow ownership check and detaches shared children recursively. - **Compatibility:** Affects the internal C++ API. SQL, storage formats, and the column dump output retain their existing contracts. - **Performance impact:** The scalar ownership predicate uses the same atomic count load. Runtime performance was not measured. - **Rollback:** A plain revert restores the public accessor. ### Testing The BE ASAN build passed with `sh build.sh --be -j48` on the submitted patch. The updated BE unit tests were not run. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Partially verified: the updated BE unit tests were not run, and clang-tidy could not resolve `stddef.h`. ### AI Disclosure - Tool: Codex (GPT-6) - Generated: Code, test updates, and PR description - Human review: The author reviewed the code changes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
