Skip to content

Conversation

@HyukjinKwon
Copy link
Member

@HyukjinKwon HyukjinKwon commented Dec 30, 2025

Rationale for this change

Fixes compilation error on macOS: -Wpessimizing-move warning. std::move() on a ternary expression prevents copy elision. shared_ptr assignment already handles moves automatically, so std::move is unnecessary and hurts optimization.

What changes are included in this PR?

Removed std::move() from ternary expression in ColumnMetadata constructor (cpp/src/arrow/flight/sql/column_metadata.cc:62). Behavior unchanged - still ensures metadata_map_ is never null.

Are these changes tested?

Yes. Existing tests cover ColumnMetadata functionality. No behavioral changes, so tests continue to pass.

Are there any user-facing changes?

No. Compilation fix only. Behavior identical, may have slight performance improvement from better compiler optimizations.

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Dec 30, 2025
@HyukjinKwon
Copy link
Member Author

Tests passed!

@lidavidm lidavidm merged commit 1b0a220 into apache:main Dec 30, 2025
46 checks passed
@lidavidm lidavidm removed the awaiting merge Awaiting merge label Dec 30, 2025
@github-actions github-actions bot added the awaiting merge Awaiting merge label Dec 30, 2025
@lidavidm
Copy link
Member

Thanks for catching this! Happy New Year!

@HyukjinKwon
Copy link
Member Author

You know what you're super awesomeness 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants