-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-44800: [C#] Implement Flight SQL Client #44783
base: main
Are you sure you want to change the base?
Conversation
**GetExportedKeys** - Retrieves a description about the foreign key columns that reference the primary key columns of the given table. - **GetExportedKeysSchema** - Get the exported keys schema from the server. - **GetImportedKeys** - Retrieves the foreign key columns for the given table. - **GetImportedKeysSchema** - Get the imported keys schema from the server. - **GetCrossReference** - Retrieves a description of the foreign key columns in the given foreign key table that reference the primary key or the columns representing a unique constraint of the parent table. - **GetCrossReferenceSchema** - Get the cross reference schema from the server. - **GetTableTypes** - Request a list of table types. - **GetTableTypesSchema** - Get the table types schema from the server. - **GetXdbcTypeInfo** - Request the information about all the data types supported. - **GetXdbcTypeInfo (with data_type parameter)** - Request the information about a specific data type supported. - **GetXdbcTypeInfoSchema** - Get the type info schema from the server. - **GetSqlInfo** - Request a list of SQL information. - **GetSqlInfoSchema**
…t/flight-sql-client
# Conflicts: # csharp/src/Apache.Arrow.Flight/Client/FlightClient.cs # csharp/test/Apache.Arrow.Flight.Tests/FlightTests.cs
…htSqlServer.cs csharp/Apache.Arrow.Flight.Sql.TestWeb/TestFlightSqlServer.cs var batches = flightHolder.GetRecordBatches(); foreach (var batch in batches) { await responseStream.WriteAsync(batch.RecordBatch, batch.Metadata); Add ConfigureAwait(false)
- PreparedStatement implementation - SqlActions adding command requests -- Commit -- Rollback -- BeginTransaction -- CancelFlightInfo
|
I approved the workflows. I don't work on C# sharp but wanted to thank you @HackPoint for such a big first-time contribution! |
Can you please review the code and allow me to close the PR please? |
I will review this tonight. |
Could you revert all |
I’ve haven’t made any changes in c++, but I’ll re-fork and cherry-pick my
code into a new fork and push all the changes.
…On Tue, 26 Nov 2024 at 7:28 Sutou Kouhei ***@***.***> wrote:
Could you revert all cpp/ changes?
—
Reply to this email directly, view it on GitHub
<#44783 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTSBM7DBABI7X26GBOCS7D2CQBGVAVCNFSM6AAAAABSAGSJF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJZGY4TEMRQGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
seems that it's done |
# Conflicts: # csharp/src/Apache.Arrow.Flight.Sql/Apache.Arrow.Flight.Sql.csproj
Any updates on this? We are also looking to use .NET with a Flight SQL client and are eager to get this functionality. |
I'm sorry about the delay; I was very much wanting to get the review done before today's fork but first work, then vacation, then a lengthy internet outage at home got in the way. I will definitely make time for a review later this week. |
Hi Curt, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for such a comprehensive change! I'm very sorry it took me this long to get to it. I've left a bunch of feedback of various degrees of seriousness. You'll also likely need to rebase given the amount of time that has passed (and the presence of a merge conflict).
csharp/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlClientTests.cs
Outdated
Show resolved
Hide resolved
csharp/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlClientTests.cs
Outdated
Show resolved
Hide resolved
csharp/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlPreparedStatementTests.cs
Outdated
Show resolved
Hide resolved
csharp/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlTestUtils.cs
Outdated
Show resolved
Hide resolved
# Conflicts: # csharp/src/Apache.Arrow.Flight.Sql/Apache.Arrow.Flight.Sql.csproj
Resolved all issues mentioned in PR apache#44783 This commit addresses all the concerns raised in PR apache#44783, ensuring correctness, performance improvements, and better maintainability.
GH-44800: [C#] Implement Flight SQL Client
Rationale for this Change
This pull request introduces a new implementation of
FlightSqlClient
andPreparedStatement
in C#. Previously, there was no C# client for Flight SQL, leaving a significant gap for .NET developers who wished to interact with Flight SQL servers.The implementation aligns with the existing C++ Flight SQL client API, ensuring consistent and familiar behavior across languages and providing a robust client for the Apache Arrow ecosystem in .NET.
What's Included in this PR?
Key Features
FlightSqlClient
:ExecuteAsync
,ExecuteUpdateAsync
) and schema retrieval (GetCatalogsAsync
,GetDbSchemasAsync
, etc.).PreparedStatement
:SetParameters
,ExecuteAsync
, andExecuteUpdateAsync
).CloseAsync
) for effective resource handling.API Consistency
This implementation mirrors the C++ Flight SQL client to ensure API alignment across supported languages:
Are These Changes Tested?
Testing Overview
Unit Tests:
PreparedStatement
.GetCatalogsAsync
andGetDbSchemasAsync
.Integration Tests:
End-to-End Tests:
Example Test Cases
ExecuteUpdateAsync
.Are There Any Breaking Changes?
This PR introduces new functionality and does not affect any existing features. There are no breaking changes.
Are There Any User-Facing Changes?
New Capabilities
FlightSqlClient:
PreparedStatement:
API Consistency
Additional Notes
async/await
for non-blocking operations.Resources
Feedback and Suggestions
Thank you for reviewing this contribution! Suggestions and feedback are welcome to ensure the implementation meets the project's standards and requirements.