Skip to content

GH-54649: [C++][FlightRPC][ODBC] Fetch on the current connection for arrow-flight-reuse-connection locations - #54652

Open
AbhishekPathania wants to merge 1 commit into
apache:mainfrom
AbhishekPathania:GH-54649-odbc-reuse-connection
Open

AbhishekPathania wants to merge 1 commit into
apache:mainfrom
AbhishekPathania:GH-54649-odbc-reuse-connection

Conversation

@AbhishekPathania

Copy link
Copy Markdown

Rationale for this change

Flight servers can return arrow-flight-reuse-connection://? as an endpoint location (GH-40345) to mean "fetch on the current connection". The ODBC driver passes it to FlightClient::Connect, which fails with "No client transport implementation for arrow-flight-reuse-connection". Result sets and SQLGetInfo, including the DSN dialog's Test Connection, fail against such servers.

What changes are included in this PR?

FlightStreamChunkBuffer treats an endpoint whose first location uses the reuse-connection scheme the same as an endpoint with no locations, and calls DoGet on the existing client. The JDBC driver handles it the same way.

Are these changes tested?

Yes. FlightStreamChunkBufferTest.TestReuseConnectionLocation fails without the fix.

Are there any user-facing changes?

The ODBC driver can read results from servers that return the reuse-connection location.

Was AI used for this PR?

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

…n for arrow-flight-reuse-connection locations
Copilot AI balanced review requested due to automatic review settings October 19, 2026 18:08
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #54649 has been automatically assigned in GitHub to PR creator.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused fix matches the endpoint contract and includes a targeted regression test; no blocking issues were identified.

No open issues 🎉

What changed in this PR

Fixes ODBC result fetching for servers that return arrow-flight-reuse-connection endpoint locations, addressing GH-54649.

Changes:

  • Uses the existing client when the first endpoint location specifies connection reuse.
  • Clarifies the client-lifetime comment and adds a regression test expecting five chunks.
File Description
cpp/​src/​arrow/​flight/​sql/​odbc/​odbc_impl/​flight_sql_stream_chunk_buffer.cc Handles reuse-connection locations using the existing client.
cpp/​src/​arrow/​flight/​sql/​odbc/​odbc_impl/​flight_sql_stream_chunk_buffer_test.cc Adds coverage for fetching through a reuse-connection endpoint.

Review effort: Balanced

@lidavidm lidavidm added the CI: Extra: C++ Run extra C++ CI label Oct 20, 2026
@github-actions github-actions Bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Oct 20, 2026
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.

4 participants