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

MINOR: [C#] Handle Empty Schema #42132

Conversation

gloomweaver
Copy link
Contributor

@gloomweaver gloomweaver commented Jun 13, 2024

Rationale for this change

While developing SDK encountered this error:

System.ArgumentOutOfRangeException : Specified argument was out of the range of valid values. (Parameter 'length')
   at Apache.Arrow.Flight.FlightMessageSerializer.DecodeSchema(ReadOnlyMemory`1 buffer)

The issue is the schema buffer is empty, and other libraries don't throw the error in this case. This PR makes this consistent with libraries for other languages.

What changes are included in this PR?

Return null if Schema buffer is empty.

Are these changes tested?

Tested against our Flight API.

Are there any user-facing changes?

Fix critical bug this inability to run request against flight service, which doesn't return schema in GetFlightInfo.

Copy link

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

In the case of PARQUET issues on JIRA the title also supports:

PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

See also:

@gloomweaver gloomweaver marked this pull request as ready for review June 13, 2024 05:57
@gloomweaver gloomweaver changed the title Csharp handle empty schema [MINOR]: [C#] Handle Empty Schema Jun 13, 2024
@CurtHagenlocher CurtHagenlocher changed the title [MINOR]: [C#] Handle Empty Schema MINOR]: [C#] Handle Empty Schema Jun 14, 2024
@CurtHagenlocher CurtHagenlocher changed the title MINOR]: [C#] Handle Empty Schema MINOR: [C#] Handle Empty Schema Jun 14, 2024
@CurtHagenlocher CurtHagenlocher merged commit 3333648 into apache:main Jun 14, 2024
15 of 16 checks passed
@CurtHagenlocher CurtHagenlocher removed the awaiting review Awaiting review label Jun 14, 2024
@gloomweaver gloomweaver deleted the gloomweaver/handle-empty-schema-buffer branch June 14, 2024 03:39
@gloomweaver
Copy link
Contributor Author

@CurtHagenlocher When can we expect the next release, this issue is a blocker.

@CurtHagenlocher
Copy link
Contributor

@CurtHagenlocher When can we expect the next release, this issue is a blocker.

Arrow releases roughly every three months. The next release is expected at the beginning of August.

@gloomweaver
Copy link
Contributor Author

Can you do minor release sooner to include this fix?

@CurtHagenlocher
Copy link
Contributor

Can you do minor release sooner to include this fix?

At this time, there's no way to publish a build of just the C# components. An out-of-band release of Arrow (i.e. a "dot one") is quite a heavy process -- effectively the same work as a full release -- and so it's typically reserved for regressions from a previous release. If it turns out that there is a 16.2, I can propose this as a candidate for inclusion.

@gloomweaver
Copy link
Contributor Author

Sure, sounds good.

Copy link

After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit 3333648.

There was 1 benchmark result indicating a performance regression:

The full Conbench report has more details.

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.

2 participants