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

[C#] Flight client does not allow putting zero batches #44363

Closed
adamreeve opened this issue Oct 10, 2024 · 2 comments
Closed

[C#] Flight client does not allow putting zero batches #44363

adamreeve opened this issue Oct 10, 2024 · 2 comments
Assignees
Milestone

Comments

@adamreeve
Copy link
Contributor

adamreeve commented Oct 10, 2024

Describe the bug, including details regarding any error messages, version, and platform.

As part of writing a Flight integration test client for .NET (#44361) I ran into a limitation where the C# client can't handle the primitive_no_batches test case because it doesn't send the schema until you write the first record batch.

For comparison, the PyArrow and C++ implementations require passing the schema when calling do_put, and always send the schema even if no batches are sent: https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightClient.html#pyarrow.flight.FlightClient.do_put

Component(s)

C#

CurtHagenlocher pushed a commit that referenced this issue Oct 15, 2024
…44377)

### Rationale for this change

See #44361. This allows testing compatibility of the .NET Flight implementation with other Flight implementations.

### What changes are included in this PR?

* Adds a new `Apache.Arrow.Flight.IntegrationTest` project that can run in server or client mode for Flight integration tests.
* Includes the integration tests that send then retrieve data defined in JSON files, but doesn't add any of the named scenarios
* Configures archery to include C# in the Flight integration tests, but skip all the named scenarios
* Also skips tests that use dictionary data due to #38045, and the empty data test due to #44363

### Are these changes tested?

These changes are tests.

### Are there any user-facing changes?

No
* GitHub Issue: #44361

Authored-by: Adam Reeve <[email protected]>
Signed-off-by: Curt Hagenlocher <[email protected]>
@adamreeve
Copy link
Contributor Author

Somewhat related, the Java and C++/Python clients also allow sending metadata-only messages without a record batch.

amoeba pushed a commit that referenced this issue Nov 11, 2024
…44377)

### Rationale for this change

See #44361. This allows testing compatibility of the .NET Flight implementation with other Flight implementations.

### What changes are included in this PR?

* Adds a new `Apache.Arrow.Flight.IntegrationTest` project that can run in server or client mode for Flight integration tests.
* Includes the integration tests that send then retrieve data defined in JSON files, but doesn't add any of the named scenarios
* Configures archery to include C# in the Flight integration tests, but skip all the named scenarios
* Also skips tests that use dictionary data due to #38045, and the empty data test due to #44363

### Are these changes tested?

These changes are tests.

### Are there any user-facing changes?

No
* GitHub Issue: #44361

Authored-by: Adam Reeve <[email protected]>
Signed-off-by: Curt Hagenlocher <[email protected]>
@adamreeve adamreeve self-assigned this Jan 21, 2025
CurtHagenlocher pushed a commit that referenced this issue Jan 21, 2025
### Rationale for this change

See #44363. This improves compatibility with other Flight implementations and means user code works with empty data without needing to treat it as a special case to work around this limitation.

### What changes are included in this PR?

* Adds new async overloads of `FlightClient.StartPut` that immediately send the schema, before any data batches are sent.
* Updates the test server to send the schema on `DoGet` even when there are no data batches.
* Enables the `primitive_no_batches` test case for C# Flight.

### Are these changes tested?

Yes, using a new unit test and with the integration tests.

### Are there any user-facing changes?

Yes. New overloads of the `FlightClient.StartPut` method have been added that are async and accept a `Schema` parameter, and ensure the schema is sent when no data batches are sent.

* GitHub Issue: #44363

Authored-by: Adam Reeve <[email protected]>
Signed-off-by: Curt Hagenlocher <[email protected]>
@CurtHagenlocher CurtHagenlocher added this to the 20.0.0 milestone Jan 21, 2025
@CurtHagenlocher
Copy link
Contributor

Issue resolved by pull request 45315
#45315

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants