Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-16032: [C++] Migrate FlightClient API to Result<> #12719

Closed
wants to merge 18 commits into from

Conversation

zagto
Copy link
Contributor

@zagto zagto commented Mar 25, 2022

No description provided.

@github-actions
Copy link

@zagto zagto marked this pull request as ready for review March 28, 2022 19:03
@lidavidm lidavidm self-requested a review March 30, 2022 14:08
c_glib/arrow-flight-glib/client.cpp Outdated Show resolved Hide resolved
cpp/src/arrow/flight/client.h Outdated Show resolved Hide resolved
cpp/src/arrow/flight/flight_benchmark.cc Outdated Show resolved Hide resolved
cpp/src/arrow/flight/sql/client.h Show resolved Hide resolved
cpp/src/arrow/flight/sql/server_test.cc Outdated Show resolved Hide resolved
cpp/src/arrow/flight/sql/test_app_cli.cc Outdated Show resolved Hide resolved
cpp/src/arrow/flight/test_definitions.cc Outdated Show resolved Hide resolved
cpp/src/arrow/flight/test_definitions.cc Outdated Show resolved Hide resolved
Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

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

Thanks, let's just make sure we keep the GLib code consistently formatted

Comment on lines 254 to 256
arrow::Result<std::unique_ptr<arrow::flight::FlightClient>> result = arrow::flight::FlightClient::Connect(*flight_location,
*flight_options);
status = std::move(result).Value(&flight_client);
Copy link
Member

Choose a reason for hiding this comment

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

A few things:

There's an extra space at the beginning of the line.

Why not use auto as before and keep things aligned, in a consistent style with everything else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For formatting, I thought archery would fix these things. Does it not check GLib code?
The explicit type was left over from when I was debugging why the original suggestion wouldn't work, I'll change it back

Copy link
Member

Choose a reason for hiding this comment

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

GLib doesn't use an auto-formatter, unfortunately. So, sorry for the nit-picking here :(

@kou have we considered automated formatting for the GLib code?

Copy link
Member

Choose a reason for hiding this comment

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

We have considered it a few times but we didn't do any actions for it.
It may be a good time to work on it: https://issues.apache.org/jira/browse/ARROW-16137

c_glib/arrow-flight-glib/client.cpp Outdated Show resolved Hide resolved
@lidavidm lidavidm closed this in 9e08c50 Apr 5, 2022
@ursabot
Copy link

ursabot commented Apr 6, 2022

Benchmark runs are scheduled for baseline = 8eaa995 and contender = 9e08c50. 9e08c50 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️0.29% ⬆️0.0%] test-mac-arm
[Failed ⬇️0.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.04% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/450| 9e08c503 ec2-t3-xlarge-us-east-2>
[Finished] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/435| 9e08c503 test-mac-arm>
[Failed] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/436| 9e08c503 ursa-i9-9960x>
[Finished] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/445| 9e08c503 ursa-thinkcentre-m75q>
[Finished] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/449| 8eaa995f ec2-t3-xlarge-us-east-2>
[Failed] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/434| 8eaa995f test-mac-arm>
[Failed] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/435| 8eaa995f ursa-i9-9960x>
[Finished] <https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/444| 8eaa995f ursa-thinkcentre-m75q>
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@kou
Copy link
Member

kou commented Apr 9, 2022

@github-actions crossbow submit verify-rc-source-cpp-linux-ubuntu-18.04-amd64

@github-actions
Copy link

github-actions bot commented Apr 9, 2022

Revision: 9518ca7

Submitted crossbow builds: ursacomputing/crossbow @ actions-1836

Task Status
verify-rc-source-cpp-linux-ubuntu-18.04-amd64 Github Actions

@kou
Copy link
Member

kou commented Apr 9, 2022

@zagto It seems that this breaks a CI job on Ubuntu 18.04:

https://github.com/ursacomputing/crossbow/runs/5953173410?check_suite_focus=true#step:5:8623

FAILED: src/arrow/flight/CMakeFiles/arrow_flight_objlib.dir/client.cc.o 
/usr/bin/c++  -DARROW_FLIGHT_EXPORTING -DARROW_HAVE_RUNTIME_AVX2 -DARROW_HAVE_RUNTIME_AVX512 -DARROW_HAVE_RUNTIME_BMI2 -DARROW_HAVE_RUNTIME_SSE4_2 -DARROW_HAVE_SSE4_2 -DARROW_HDFS -DARROW_JEMALLOC -DARROW_JEMALLOC_INCLUDE_DIR="" -DARROW_WITH_BROTLI -DARROW_WITH_BZ2 -DARROW_WITH_LZ4 -DARROW_WITH_RE2 -DARROW_WITH_SNAPPY -DARROW_WITH_TIMING_TESTS -DARROW_WITH_UTF8PROC -DARROW_WITH_ZLIB -DARROW_WITH_ZSTD -DGRPC_NAMESPACE_FOR_TLS_CREDENTIALS_OPTIONS=grpc::experimental -DGRPC_USE_TLS_CHANNEL_CREDENTIALS_OPTIONS -DGRPC_USE_TLS_CHANNEL_CREDENTIALS_OPTIONS_ROOT_CERTS -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -DURI_STATIC_BUILD -DUTF8PROC_STATIC -isystem /arrow/cpp/thirdparty/flatbuffers/include -isystem boost_ep-prefix/src/boost_ep -isystem snappy_ep/src/snappy_ep-install/include -isystem brotli_ep/src/brotli_ep-install/include -isystem gflags_ep-prefix/src/gflags_ep/include -isystem thrift_ep-install/include -isystem protobuf_ep-install/include -isystem jemalloc_ep-prefix/src -isystem googletest_ep-prefix/include -isystem rapidjson_ep/src/rapidjson_ep-install/include -isystem xsimd_ep/src/xsimd_ep-install/include -isystem lz4_ep-prefix/include -isystem zstd_ep-install/include -isystem re2_ep-install/include -isystem bzip2_ep-install/include -isystem utf8proc_ep-install/include -isystem cares_ep-install/include -isystem grpc_ep-install/include -isystem /arrow/cpp/thirdparty/hadoop/include -isystem orc_ep-install/include -Isrc -I/arrow/cpp/src -I/arrow/cpp/src/generated -Wno-noexcept-type  -fdiagnostics-color=always -O3 -DNDEBUG  -Wall -fno-semantic-interposition -msse4.2  -O3 -DNDEBUG -fPIC   -std=c++11 -MD -MT src/arrow/flight/CMakeFiles/arrow_flight_objlib.dir/client.cc.o -MF src/arrow/flight/CMakeFiles/arrow_flight_objlib.dir/client.cc.o.d -o src/arrow/flight/CMakeFiles/arrow_flight_objlib.dir/client.cc.o -c /arrow/cpp/src/arrow/flight/client.cc
/arrow/cpp/src/arrow/flight/client.cc: In member function 'arrow::Result<std::unique_ptr<arrow::flight::FlightStreamReader> > arrow::flight::FlightClient::DoGet(const arrow::flight::FlightCallOptions&, const arrow::flight::Ticket&)':
/arrow/cpp/src/arrow/flight/client.cc:618:10: error: could not convert 'stream_reader' from 'std::unique_ptr<arrow::flight::ClientStreamReader, std::default_delete<arrow::flight::ClientStreamReader> >' to 'arrow::Result<std::unique_ptr<arrow::flight::FlightStreamReader> >'
   return stream_reader;
          ^~~~~~~~~~~~~

Could you confirm this?

@lidavidm
Copy link
Member

lidavidm commented Apr 11, 2022

Thank you @kou. I can confirm this. I filed ARROW-16162/#12856.

jcralmeida pushed a commit to rafael-telles/arrow that referenced this pull request Apr 19, 2022
Closes apache#12719 from zagto/flight-api-result-client

Authored-by: Tobias Zagorni <tobias@zagorni.eu>
Signed-off-by: David Li <li.davidm96@gmail.com>
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.

None yet

4 participants