GH-48084: [C++][FlightRPC] Replace boost::optional with std::optional#48323
Merged
lidavidm merged 2 commits intoapache:mainfrom Dec 4, 2025
Merged
GH-48084: [C++][FlightRPC] Replace boost::optional with std::optional#48323lidavidm merged 2 commits intoapache:mainfrom
lidavidm merged 2 commits intoapache:mainfrom
Conversation
|
|
lidavidm
approved these changes
Dec 4, 2025
Comment on lines
75
to
76
| return std::optional<std::pair<arrow::Result<FlightStreamChunk>, | ||
| std::shared_ptr<FlightSqlClient>>>{}; |
Member
There was a problem hiding this comment.
nit: does nullopt not work here?
Collaborator
Author
There was a problem hiding this comment.
yes nullopt works, fixed
|
|
||
| struct MetadataSettings { | ||
| boost::optional<int32_t> string_column_length{boost::none}; | ||
| std::optional<int32_t> string_column_length{std::nullopt}; |
Member
There was a problem hiding this comment.
The default initialization is nullopt so there's no need to write it out explicitly
Collaborator
Author
There was a problem hiding this comment.
yup, good catch, fixed
Use `std::nullopt;` and specify return type.
alinaliBQ
commented
Dec 4, 2025
Comment on lines
75
to
76
| return std::optional<std::pair<arrow::Result<FlightStreamChunk>, | ||
| std::shared_ptr<FlightSqlClient>>>{}; |
Collaborator
Author
There was a problem hiding this comment.
yes nullopt works, fixed
|
|
||
| struct MetadataSettings { | ||
| boost::optional<int32_t> string_column_length{boost::none}; | ||
| std::optional<int32_t> string_column_length{std::nullopt}; |
Collaborator
Author
There was a problem hiding this comment.
yup, good catch, fixed
lidavidm
approved these changes
Dec 4, 2025
|
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 90261d6. There was 1 benchmark result indicating a performance regression:
The full Conbench report has more details. |
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.
Rationale for this change
Replace boost::optional with std::optional to resolve build failures on MSVC Windows CI. This PR is extracted from #48313.
What changes are included in this PR?
Replace boost::optional with std::optional in ODBC.
Are these changes tested?
Yes, locally on MSVC
Are there any user-facing changes?
N/A