You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alinaliBQ (via GitHub)" <gi...@apache.org> on 2025/12/04 00:25:20 UTC
[PR] GH-48084: [C++][FlightRPC] Replace boost::optional with std::optional [arrow]
alinaliBQ opened a new pull request, #48323:
URL: https://github.com/apache/arrow/pull/48323
### Rationale for this change
Replace boost::optional with std::optional to resolve build failures on MSVC Windows CI. This PR is extracted from https://github.com/apache/arrow/pull/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
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-48084: [C++][FlightRPC] Replace boost::optional with std::optional [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #48323:
URL: https://github.com/apache/arrow/pull/48323#issuecomment-3609385587
:warning: GitHub issue #48084 **has been automatically assigned in GitHub** to PR creator.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-48084: [C++][FlightRPC] Replace boost::optional with std::optional [arrow]
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #48323:
URL: https://github.com/apache/arrow/pull/48323#issuecomment-3669163912
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 90261d61280b20b01a6329fba8ddadec86632ddb.
There was 1 benchmark result indicating a performance regression:
- Commit Run on `amd64-m5-4xlarge-linux` at [2025-12-17 20:36:48Z](https://conbench.arrow-dev.org/compare/runs/abfefd54a0a948f7be7fbf838397732c...8cc17c2c77b64ea1b6ce9444e9cb3601/)
- [`partitioned-dataset-filter` (R) with dataset=dataset-taxi-parquet, language=R, query=vignette](https://conbench.arrow-dev.org/compare/benchmarks/06942dcad2b272118000fd25a637f093...06943348b2a37d05800026bcc5d93657)
The [full Conbench report](https://github.com/apache/arrow/runs/58407110787) has more details.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-48084: [C++][FlightRPC] Replace boost::optional with std::optional [arrow]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on code in PR #48323:
URL: https://github.com/apache/arrow/pull/48323#discussion_r2587040144
##########
cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_stream_chunk_buffer.cc:
##########
@@ -68,11 +68,13 @@ FlightStreamChunkBuffer::FlightStreamChunkBuffer(
// call. temp_flight_sql_client is intentionally null if the list of endpoint
// Locations is empty.
// After all data is fetched from reader, the temp client is closed.
-
- // gh-48084 Replace boost::optional with std::optional
- return boost::make_optional(
- is_not_ok || is_not_empty,
- std::make_pair(std::move(result), temp_flight_sql_client));
+ if (is_not_ok || is_not_empty) {
+ return std::make_optional(
+ std::make_pair(std::move(result), temp_flight_sql_client));
+ } else {
+ return std::optional<std::pair<arrow::Result<FlightStreamChunk>,
+ std::shared_ptr<FlightSqlClient>>>{};
Review Comment:
nit: does nullopt not work here?
##########
cpp/src/arrow/flight/sql/odbc/odbc_impl/types.h:
##########
@@ -172,7 +172,7 @@ enum RowStatus : uint16_t {
};
struct MetadataSettings {
- boost::optional<int32_t> string_column_length{boost::none};
+ std::optional<int32_t> string_column_length{std::nullopt};
Review Comment:
The default initialization is nullopt so there's no need to write it out explicitly
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-48084: [C++][FlightRPC] Replace boost::optional with std::optional [arrow]
Posted by "alinaliBQ (via GitHub)" <gi...@apache.org>.
alinaliBQ commented on code in PR #48323:
URL: https://github.com/apache/arrow/pull/48323#discussion_r2590115505
##########
cpp/src/arrow/flight/sql/odbc/odbc_impl/types.h:
##########
@@ -172,7 +172,7 @@ enum RowStatus : uint16_t {
};
struct MetadataSettings {
- boost::optional<int32_t> string_column_length{boost::none};
+ std::optional<int32_t> string_column_length{std::nullopt};
Review Comment:
yup, good catch, fixed
##########
cpp/src/arrow/flight/sql/odbc/odbc_impl/flight_sql_stream_chunk_buffer.cc:
##########
@@ -68,11 +68,13 @@ FlightStreamChunkBuffer::FlightStreamChunkBuffer(
// call. temp_flight_sql_client is intentionally null if the list of endpoint
// Locations is empty.
// After all data is fetched from reader, the temp client is closed.
-
- // gh-48084 Replace boost::optional with std::optional
- return boost::make_optional(
- is_not_ok || is_not_empty,
- std::make_pair(std::move(result), temp_flight_sql_client));
+ if (is_not_ok || is_not_empty) {
+ return std::make_optional(
+ std::make_pair(std::move(result), temp_flight_sql_client));
+ } else {
+ return std::optional<std::pair<arrow::Result<FlightStreamChunk>,
+ std::shared_ptr<FlightSqlClient>>>{};
Review Comment:
yes `nullopt` works, fixed
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-48084: [C++][FlightRPC] Replace boost::optional with std::optional [arrow]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm merged PR #48323:
URL: https://github.com/apache/arrow/pull/48323
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org