Skip to content

Conversation

@alinaliBQ
Copy link
Contributor

@alinaliBQ alinaliBQ commented Oct 29, 2025

Rationale for this change

GH-46584

What changes are included in this PR?

Iterate over endpoints to get data

Are these changes tested?

Tested in CI and locally on Windows MSVC. Test flight_sql_stream_chunk_buffer_test.cc is added

Are there any user-facing changes?

N/A

@github-actions
Copy link

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

@alinaliBQ alinaliBQ force-pushed the gh-46584-iterate-endpoint branch from 64e84f5 to 488ff8e Compare October 29, 2025 18:53
@alinaliBQ alinaliBQ marked this pull request as ready for review October 29, 2025 20:21
@alinaliBQ alinaliBQ requested a review from lidavidm as a code owner October 29, 2025 20:21
@lidavidm lidavidm changed the title GH-46584: [C++][FlightRPC] Iterate over endpoint GH-46584: [C++][FlightRPC] Iterate over endpoints in ODBC driver Oct 31, 2025
Comment on lines 95 to 104
void VerifyArraysContainIntsOnly(std::shared_ptr<Array> intArray) {
for (int64_t i = 0; i < intArray->length(); ++i) {
// null values are accepted
if (!intArray->IsNull(i)) {
auto scalar_data = intArray->GetScalar(i).ValueOrDie();
std::string scalar_str = ConvertToJson(*scalar_data);
ASSERT_TRUE(std::all_of(scalar_str.begin(), scalar_str.end(), ::isdigit));
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Can't you just check the array type?

Copy link
Contributor

Choose a reason for hiding this comment

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

Done.

std::unique_ptr<FlightClient> temp_flight_client;
util::ThrowIfNotOK(FlightClient::Connect(endpoint_locations[0], client_options)
.Value(&temp_flight_client));
temp_flight_sql_client.reset(new FlightSqlClient(std::move(temp_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.

make_shared?

Copy link
Contributor

Choose a reason for hiding this comment

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

Done.

Comment on lines +68 to +75
return boost::make_optional(
is_not_ok || is_not_empty,
std::make_pair(std::move(result), temp_flight_sql_client));
Copy link
Member

Choose a reason for hiding this comment

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

Can we get rid of boost?

Copy link
Contributor

@justing-bq justing-bq Nov 7, 2025

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since boost-optional is blocking the MSVC CI (for some reason it doesn't block my local MSVC build), I will remove boost-optional in #48067

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Oct 31, 2025
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Nov 10, 2025
@justing-bq
Copy link
Contributor

@lidavidm Please take another look.

@justing-bq justing-bq force-pushed the gh-46584-iterate-endpoint branch from 4d34c4c to 4da0d4a Compare November 12, 2025 18:32

using arrow::internal::checked_pointer_cast;
using std::nullopt;
using std::optional;
Copy link
Member

Choose a reason for hiding this comment

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

not necessarily a blocker here but generally I think we avoid using types from std.

Copy link
Contributor

Choose a reason for hiding this comment

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

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Nov 14, 2025
@lidavidm
Copy link
Member

@alinaliBQ can you rebase here?

Address more feedback

Avoid using "using" in Headers

Add `server->Wait` call

Co-Authored-By: justing-bq <[email protected]>
@alinaliBQ alinaliBQ force-pushed the gh-46584-iterate-endpoint branch from 4da0d4a to 70ba716 Compare November 28, 2025 22:35
@alinaliBQ
Copy link
Contributor Author

@lidavidm Thanks and rebased

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.

3 participants