-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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-37861: [C#] Fix StringArray.GetString returning null instead of empty #37862
GH-37861: [C#] Fix StringArray.GetString returning null instead of empty #37862
Conversation
|
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.
This looks good to me. Let's just clarify one thing in the test and then I think it'll be good to merge.
After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit ded3295. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them. |
… of empty (apache#37862) ### Rationale for this change Fixes apache#37861. ### What changes are included in this PR? Add `BinaryArray.GetBytes(int, out bool)` overload that enables `StringArray.GetString` to reliably determine if the value is null or empty without needing an additional call to `IsNull`. ### Are these changes tested? Added a test for `StringArray.GetString` (which didn't appear to have any existing tests). Two of the cases fail without this change. I also updated the tests that call `BinaryArray.GetBytes` to use the new overload instead of a separate call to `IsNull` as extra validation. ### Are there any user-facing changes? New public overload to an existing API. * Closes: apache#37861
… of empty (apache#37862) ### Rationale for this change Fixes apache#37861. ### What changes are included in this PR? Add `BinaryArray.GetBytes(int, out bool)` overload that enables `StringArray.GetString` to reliably determine if the value is null or empty without needing an additional call to `IsNull`. ### Are these changes tested? Added a test for `StringArray.GetString` (which didn't appear to have any existing tests). Two of the cases fail without this change. I also updated the tests that call `BinaryArray.GetBytes` to use the new overload instead of a separate call to `IsNull` as extra validation. ### Are there any user-facing changes? New public overload to an existing API. * Closes: apache#37861
… of empty (apache#37862) ### Rationale for this change Fixes apache#37861. ### What changes are included in this PR? Add `BinaryArray.GetBytes(int, out bool)` overload that enables `StringArray.GetString` to reliably determine if the value is null or empty without needing an additional call to `IsNull`. ### Are these changes tested? Added a test for `StringArray.GetString` (which didn't appear to have any existing tests). Two of the cases fail without this change. I also updated the tests that call `BinaryArray.GetBytes` to use the new overload instead of a separate call to `IsNull` as extra validation. ### Are there any user-facing changes? New public overload to an existing API. * Closes: apache#37861
Rationale for this change
Fixes #37861.
What changes are included in this PR?
Add
BinaryArray.GetBytes(int, out bool)
overload that enablesStringArray.GetString
to reliably determine if the value is null or empty without needing an additional call toIsNull
.Are these changes tested?
Added a test for
StringArray.GetString
(which didn't appear to have any existing tests). Two of the cases fail without this change. I also updated the tests that callBinaryArray.GetBytes
to use the new overload instead of a separate call toIsNull
as extra validation.Are there any user-facing changes?
New public overload to an existing API.